diff options
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r-- | net/ipv4/devinet.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 4c01c55c381d..1f21f4a2df86 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -1258,9 +1258,9 @@ static void devinet_copy_dflt_conf(struct net *net, int i) | |||
1258 | static void inet_forward_change(struct net *net) | 1258 | static void inet_forward_change(struct net *net) |
1259 | { | 1259 | { |
1260 | struct net_device *dev; | 1260 | struct net_device *dev; |
1261 | int on = IPV4_DEVCONF_ALL(FORWARDING); | 1261 | int on = IPV4_DEVCONF_ALL(net, FORWARDING); |
1262 | 1262 | ||
1263 | IPV4_DEVCONF_ALL(ACCEPT_REDIRECTS) = !on; | 1263 | IPV4_DEVCONF_ALL(net, ACCEPT_REDIRECTS) = !on; |
1264 | IPV4_DEVCONF_DFLT(net, FORWARDING) = on; | 1264 | IPV4_DEVCONF_DFLT(net, FORWARDING) = on; |
1265 | 1265 | ||
1266 | read_lock(&dev_base_lock); | 1266 | read_lock(&dev_base_lock); |
@@ -1360,7 +1360,7 @@ static int devinet_sysctl_forward(ctl_table *ctl, int write, | |||
1360 | if (write && *valp != val) { | 1360 | if (write && *valp != val) { |
1361 | struct net *net = ctl->extra2; | 1361 | struct net *net = ctl->extra2; |
1362 | 1362 | ||
1363 | if (valp == &IPV4_DEVCONF_ALL(FORWARDING)) | 1363 | if (valp == &IPV4_DEVCONF_ALL(net, FORWARDING)) |
1364 | inet_forward_change(net); | 1364 | inet_forward_change(net); |
1365 | else if (valp != &IPV4_DEVCONF_DFLT(net, FORWARDING)) | 1365 | else if (valp != &IPV4_DEVCONF_DFLT(net, FORWARDING)) |
1366 | rt_cache_flush(0); | 1366 | rt_cache_flush(0); |