From: Nicolas Dichtel Date: Tue, 30 Aug 2016 08:09:21 +0000 (+0200) Subject: ipv6: add missing netconf notif when 'all' is updated X-Git-Tag: v3.16.39~110 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=37129ea3ee0718f26ec3c6a8b10c1372cc4aec17;p=thirdparty%2Fkernel%2Fstable.git ipv6: add missing netconf notif when 'all' is updated commit d26c638c16cb54f6fb1507e27df93ede692db572 upstream. The 'default' value was not advertised. Fixes: f3a1bfb11ccb ("rtnl/ipv6: use netconf msg to advertise forwarding status") Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 0002aa9ca91a9..4163bea0eb9b3 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -723,7 +723,14 @@ static int addrconf_fixup_forwarding(struct ctl_table *table, int *p, int newf) } if (p == &net->ipv6.devconf_all->forwarding) { + int old_dflt = net->ipv6.devconf_dflt->forwarding; + net->ipv6.devconf_dflt->forwarding = newf; + if ((!newf) ^ (!old_dflt)) + inet6_netconf_notify_devconf(net, NETCONFA_FORWARDING, + NETCONFA_IFINDEX_DEFAULT, + net->ipv6.devconf_dflt); + addrconf_forward_change(net, newf); if ((!newf) ^ (!old)) inet6_netconf_notify_devconf(net, NETCONFA_FORWARDING,