diff options
-rw-r--r-- | net/ipv6/addrconf.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 9b96de3ba5eb..cd90f9a6da33 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -456,7 +456,7 @@ static void dev_forward_change(struct inet6_dev *idev) | |||
456 | } | 456 | } |
457 | 457 | ||
458 | 458 | ||
459 | static void addrconf_forward_change(struct net *net) | 459 | static void addrconf_forward_change(struct net *net, __s32 newf) |
460 | { | 460 | { |
461 | struct net_device *dev; | 461 | struct net_device *dev; |
462 | struct inet6_dev *idev; | 462 | struct inet6_dev *idev; |
@@ -466,8 +466,8 @@ static void addrconf_forward_change(struct net *net) | |||
466 | rcu_read_lock(); | 466 | rcu_read_lock(); |
467 | idev = __in6_dev_get(dev); | 467 | idev = __in6_dev_get(dev); |
468 | if (idev) { | 468 | if (idev) { |
469 | int changed = (!idev->cnf.forwarding) ^ (!ipv6_devconf.forwarding); | 469 | int changed = (!idev->cnf.forwarding) ^ (!newf); |
470 | idev->cnf.forwarding = ipv6_devconf.forwarding; | 470 | idev->cnf.forwarding = newf; |
471 | if (changed) | 471 | if (changed) |
472 | dev_forward_change(idev); | 472 | dev_forward_change(idev); |
473 | } | 473 | } |
@@ -484,9 +484,10 @@ static void addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old) | |||
484 | if (p == &net->ipv6.devconf_dflt->forwarding) | 484 | if (p == &net->ipv6.devconf_dflt->forwarding) |
485 | return; | 485 | return; |
486 | 486 | ||
487 | if (p == &ipv6_devconf.forwarding) { | 487 | if (p == &net->ipv6.devconf_all->forwarding) { |
488 | net->ipv6.devconf_dflt->forwarding = ipv6_devconf.forwarding; | 488 | __s32 newf = net->ipv6.devconf_all->forwarding; |
489 | addrconf_forward_change(net); | 489 | net->ipv6.devconf_dflt->forwarding = newf; |
490 | addrconf_forward_change(net, newf); | ||
490 | } else if ((!*p) ^ (!old)) | 491 | } else if ((!*p) ^ (!old)) |
491 | dev_forward_change((struct inet6_dev *)table->extra1); | 492 | dev_forward_change((struct inet6_dev *)table->extra1); |
492 | 493 | ||