summaryrefslogtreecommitdiffstats
path: root/net/netrom/nr_in.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-09-12 14:27:37 -0700
committerDavid S. Miller <davem@davemloft.net>2005-09-12 14:27:37 -0700
commite21ce8c7c013fb223a002c70bb0a547de6c26c12 (patch)
tree767b9aae7bdd50cdf867f3cdc1a3e214692146e1 /net/netrom/nr_in.c
parentd2ce4bc340946d5b78484d638ac10df958c4c3bf (diff)
downloadop-kernel-dev-e21ce8c7c013fb223a002c70bb0a547de6c26c12.zip
op-kernel-dev-e21ce8c7c013fb223a002c70bb0a547de6c26c12.tar.gz
[NETROM]: Implement G8PZT Circuit reset for NET/ROM
NET/ROM is lacking a connection reset like TCP's RST flag which at times may result in a connecting having to slowly timing out instead of just being reset. An earlier attempt to reset the connection by sending a NR_CONNACK | NR_CHOKE_FLAG transport was inacceptable as it did result in crashes of BPQ systems. An alternative approach of introducing a new transport type 7 (NR_RESET) has be implemented several years ago in Paula Jayne Dowie G8PZT's Xrouter. Implement NR_RESET for Linux's NET/ROM but like any messing with the state engine consider this experimental for now and thus control it by a sysctl (net.netrom.reset) which for the time being defaults to off. Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netrom/nr_in.c')
-rw-r--r--net/netrom/nr_in.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/netrom/nr_in.c b/net/netrom/nr_in.c
index 64b81a7..004e859 100644
--- a/net/netrom/nr_in.c
+++ b/net/netrom/nr_in.c
@@ -98,6 +98,11 @@ static int nr_state1_machine(struct sock *sk, struct sk_buff *skb,
nr_disconnect(sk, ECONNREFUSED);
break;
+ case NR_RESET:
+ if (sysctl_netrom_reset_circuit);
+ nr_disconnect(sk, ECONNRESET);
+ break;
+
default:
break;
}
@@ -124,6 +129,11 @@ static int nr_state2_machine(struct sock *sk, struct sk_buff *skb,
nr_disconnect(sk, 0);
break;
+ case NR_RESET:
+ if (sysctl_netrom_reset_circuit);
+ nr_disconnect(sk, ECONNRESET);
+ break;
+
default:
break;
}
@@ -254,6 +264,11 @@ static int nr_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype
}
break;
+ case NR_RESET:
+ if (sysctl_netrom_reset_circuit);
+ nr_disconnect(sk, ECONNRESET);
+ break;
+
default:
break;
}
OpenPOWER on IntegriCloud