Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46979
b: refs/heads/master
c: 39e21c0
h: refs/heads/master
i:
  46977: b75126d
  46975: 78f825a
v: v3
  • Loading branch information
Andrew Hendry authored and David S. Miller committed Feb 8, 2007
1 parent 15b4acd commit 314873e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95a9dc4390c8215d922e0ca2ebb95279261fe795
refs/heads/master: 39e21c0d34fe769d06839679fa920217359a58b0
3 changes: 2 additions & 1 deletion trunk/include/linux/sysctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,8 @@ enum {
NET_X25_CALL_REQUEST_TIMEOUT=2,
NET_X25_RESET_REQUEST_TIMEOUT=3,
NET_X25_CLEAR_REQUEST_TIMEOUT=4,
NET_X25_ACK_HOLD_BACK_TIMEOUT=5
NET_X25_ACK_HOLD_BACK_TIMEOUT=5,
NET_X25_FORWARD=6
};

/* /proc/sys/net/token-ring */
Expand Down
1 change: 1 addition & 0 deletions trunk/include/net/x25.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ extern int sysctl_x25_call_request_timeout;
extern int sysctl_x25_reset_request_timeout;
extern int sysctl_x25_clear_request_timeout;
extern int sysctl_x25_ack_holdback_timeout;
extern int sysctl_x25_forward;

extern int x25_addr_ntoa(unsigned char *, struct x25_address *,
struct x25_address *);
Expand Down
4 changes: 3 additions & 1 deletion trunk/net/x25/af_x25.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ int sysctl_x25_call_request_timeout = X25_DEFAULT_T21;
int sysctl_x25_reset_request_timeout = X25_DEFAULT_T22;
int sysctl_x25_clear_request_timeout = X25_DEFAULT_T23;
int sysctl_x25_ack_holdback_timeout = X25_DEFAULT_T2;
int sysctl_x25_forward = 0;

HLIST_HEAD(x25_list);
DEFINE_RWLOCK(x25_list_lock);
Expand Down Expand Up @@ -884,7 +885,8 @@ int x25_rx_call_request(struct sk_buff *skb, struct x25_neigh *nb,
*/
if (sk == NULL) {
skb_push(skb, addr_len + X25_STD_MIN_LEN);
if (x25_forward_call(&dest_addr, nb, skb, lci) > 0)
if (sysctl_x25_forward &&
x25_forward_call(&dest_addr, nb, skb, lci) > 0)
{
/* Call was forwarded, dont process it any more */
kfree_skb(skb);
Expand Down
8 changes: 8 additions & 0 deletions trunk/net/x25/sysctl_net_x25.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ static struct ctl_table x25_table[] = {
.extra1 = &min_timer,
.extra2 = &max_timer,
},
{
.ctl_name = NET_X25_FORWARD,
.procname = "x25_forward",
.data = &sysctl_x25_forward,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec,
},
{ 0, },
};

Expand Down

0 comments on commit 314873e

Please sign in to comment.