From e21ce8c7c013fb223a002c70bb0a547de6c26c12 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 12 Sep 2005 14:27:37 -0700 Subject: [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 Signed-off-by: David S. Miller --- net/netrom/sysctl_net_netrom.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'net/netrom/sysctl_net_netrom.c') diff --git a/net/netrom/sysctl_net_netrom.c b/net/netrom/sysctl_net_netrom.c index c9ed50382ea..6bb8dda849d 100644 --- a/net/netrom/sysctl_net_netrom.c +++ b/net/netrom/sysctl_net_netrom.c @@ -30,6 +30,7 @@ static int min_idle[] = {0 * HZ}; static int max_idle[] = {65535 * HZ}; static int min_route[] = {0}, max_route[] = {1}; static int min_fails[] = {1}, max_fails[] = {10}; +static int min_reset[] = {0}, max_reset[] = {1}; static struct ctl_table_header *nr_table_header; @@ -155,6 +156,17 @@ static ctl_table nr_table[] = { .extra1 = &min_fails, .extra2 = &max_fails }, + { + .ctl_name = NET_NETROM_RESET, + .procname = "reset", + .data = &sysctl_netrom_reset_circuit, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_minmax, + .strategy = &sysctl_intvec, + .extra1 = &min_reset, + .extra2 = &max_reset + }, { .ctl_name = 0 } }; -- cgit v1.2.3-70-g09d2