diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-09-12 17:27:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-12 17:27:37 -0400 |
commit | e21ce8c7c013fb223a002c70bb0a547de6c26c12 (patch) | |
tree | 767b9aae7bdd50cdf867f3cdc1a3e214692146e1 /net/netrom/af_netrom.c | |
parent | d2ce4bc340946d5b78484d638ac10df958c4c3bf (diff) |
[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/af_netrom.c')
-rw-r--r-- | net/netrom/af_netrom.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 02b1ab52dbbf..8c3d3a78481e 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -56,6 +56,7 @@ int sysctl_netrom_transport_requested_window_size = NR_DEFAULT_WINDOW; | |||
56 | int sysctl_netrom_transport_no_activity_timeout = NR_DEFAULT_IDLE; | 56 | int sysctl_netrom_transport_no_activity_timeout = NR_DEFAULT_IDLE; |
57 | int sysctl_netrom_routing_control = NR_DEFAULT_ROUTING; | 57 | int sysctl_netrom_routing_control = NR_DEFAULT_ROUTING; |
58 | int sysctl_netrom_link_fails_count = NR_DEFAULT_FAILS; | 58 | int sysctl_netrom_link_fails_count = NR_DEFAULT_FAILS; |
59 | int sysctl_netrom_reset_circuit = NR_DEFAULT_RESET; | ||
59 | 60 | ||
60 | static unsigned short circuit = 0x101; | 61 | static unsigned short circuit = 0x101; |
61 | 62 | ||
@@ -908,17 +909,17 @@ int nr_rx_frame(struct sk_buff *skb, struct net_device *dev) | |||
908 | if (frametype != NR_CONNREQ) { | 909 | if (frametype != NR_CONNREQ) { |
909 | /* | 910 | /* |
910 | * Here it would be nice to be able to send a reset but | 911 | * Here it would be nice to be able to send a reset but |
911 | * NET/ROM doesn't have one. The following hack would | 912 | * NET/ROM doesn't have one. We've tried to extend the protocol |
912 | * have been a way to extend the protocol but apparently | 913 | * by sending NR_CONNACK | NR_CHOKE_FLAGS replies but that |
913 | * it kills BPQ boxes... :-( | 914 | * apparently kills BPQ boxes... :-( |
915 | * So now we try to follow the established behaviour of | ||
916 | * G8PZT's Xrouter which is sending packets with command type 7 | ||
917 | * as an extension of the protocol. | ||
914 | */ | 918 | */ |
915 | #if 0 | 919 | if (sysctl_netrom_reset_circuit && |
916 | /* | 920 | (frametype != NR_RESET || flags != 0)) |
917 | * Never reply to a CONNACK/CHOKE. | 921 | nr_transmit_reset(skb, 1); |
918 | */ | 922 | |
919 | if (frametype != NR_CONNACK || flags != NR_CHOKE_FLAG) | ||
920 | nr_transmit_refusal(skb, 1); | ||
921 | #endif | ||
922 | return 0; | 923 | return 0; |
923 | } | 924 | } |
924 | 925 | ||