diff options
-rw-r--r-- | include/linux/sysctl.h | 3 | ||||
-rw-r--r-- | include/net/x25.h | 1 | ||||
-rw-r--r-- | net/x25/af_x25.c | 4 | ||||
-rw-r--r-- | net/x25/sysctl_net_x25.c | 8 |
4 files changed, 14 insertions, 2 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 81480e613467..665412c4f4b9 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -699,7 +699,8 @@ enum { | |||
699 | NET_X25_CALL_REQUEST_TIMEOUT=2, | 699 | NET_X25_CALL_REQUEST_TIMEOUT=2, |
700 | NET_X25_RESET_REQUEST_TIMEOUT=3, | 700 | NET_X25_RESET_REQUEST_TIMEOUT=3, |
701 | NET_X25_CLEAR_REQUEST_TIMEOUT=4, | 701 | NET_X25_CLEAR_REQUEST_TIMEOUT=4, |
702 | NET_X25_ACK_HOLD_BACK_TIMEOUT=5 | 702 | NET_X25_ACK_HOLD_BACK_TIMEOUT=5, |
703 | NET_X25_FORWARD=6 | ||
703 | }; | 704 | }; |
704 | 705 | ||
705 | /* /proc/sys/net/token-ring */ | 706 | /* /proc/sys/net/token-ring */ |
diff --git a/include/net/x25.h b/include/net/x25.h index 3b1190514d92..fc3f03d976f8 100644 --- a/include/net/x25.h +++ b/include/net/x25.h | |||
@@ -180,6 +180,7 @@ extern int sysctl_x25_call_request_timeout; | |||
180 | extern int sysctl_x25_reset_request_timeout; | 180 | extern int sysctl_x25_reset_request_timeout; |
181 | extern int sysctl_x25_clear_request_timeout; | 181 | extern int sysctl_x25_clear_request_timeout; |
182 | extern int sysctl_x25_ack_holdback_timeout; | 182 | extern int sysctl_x25_ack_holdback_timeout; |
183 | extern int sysctl_x25_forward; | ||
183 | 184 | ||
184 | extern int x25_addr_ntoa(unsigned char *, struct x25_address *, | 185 | extern int x25_addr_ntoa(unsigned char *, struct x25_address *, |
185 | struct x25_address *); | 186 | struct x25_address *); |
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 0872025821c5..b37d894358ec 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c | |||
@@ -63,6 +63,7 @@ int sysctl_x25_call_request_timeout = X25_DEFAULT_T21; | |||
63 | int sysctl_x25_reset_request_timeout = X25_DEFAULT_T22; | 63 | int sysctl_x25_reset_request_timeout = X25_DEFAULT_T22; |
64 | int sysctl_x25_clear_request_timeout = X25_DEFAULT_T23; | 64 | int sysctl_x25_clear_request_timeout = X25_DEFAULT_T23; |
65 | int sysctl_x25_ack_holdback_timeout = X25_DEFAULT_T2; | 65 | int sysctl_x25_ack_holdback_timeout = X25_DEFAULT_T2; |
66 | int sysctl_x25_forward = 0; | ||
66 | 67 | ||
67 | HLIST_HEAD(x25_list); | 68 | HLIST_HEAD(x25_list); |
68 | DEFINE_RWLOCK(x25_list_lock); | 69 | DEFINE_RWLOCK(x25_list_lock); |
@@ -884,7 +885,8 @@ int x25_rx_call_request(struct sk_buff *skb, struct x25_neigh *nb, | |||
884 | */ | 885 | */ |
885 | if (sk == NULL) { | 886 | if (sk == NULL) { |
886 | skb_push(skb, addr_len + X25_STD_MIN_LEN); | 887 | skb_push(skb, addr_len + X25_STD_MIN_LEN); |
887 | if (x25_forward_call(&dest_addr, nb, skb, lci) > 0) | 888 | if (sysctl_x25_forward && |
889 | x25_forward_call(&dest_addr, nb, skb, lci) > 0) | ||
888 | { | 890 | { |
889 | /* Call was forwarded, dont process it any more */ | 891 | /* Call was forwarded, dont process it any more */ |
890 | kfree_skb(skb); | 892 | kfree_skb(skb); |
diff --git a/net/x25/sysctl_net_x25.c b/net/x25/sysctl_net_x25.c index aabda59c824e..2b2e7fd689f3 100644 --- a/net/x25/sysctl_net_x25.c +++ b/net/x25/sysctl_net_x25.c | |||
@@ -73,6 +73,14 @@ static struct ctl_table x25_table[] = { | |||
73 | .extra1 = &min_timer, | 73 | .extra1 = &min_timer, |
74 | .extra2 = &max_timer, | 74 | .extra2 = &max_timer, |
75 | }, | 75 | }, |
76 | { | ||
77 | .ctl_name = NET_X25_FORWARD, | ||
78 | .procname = "x25_forward", | ||
79 | .data = &sysctl_x25_forward, | ||
80 | .maxlen = sizeof(int), | ||
81 | .mode = 0644, | ||
82 | .proc_handler = &proc_dointvec, | ||
83 | }, | ||
76 | { 0, }, | 84 | { 0, }, |
77 | }; | 85 | }; |
78 | 86 | ||