From patchwork Tue Aug 30 08:09:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dichtel X-Patchwork-Id: 664042 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3sNh535sqfz9s9N for ; Tue, 30 Aug 2016 18:09:43 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755916AbcH3IJi (ORCPT ); Tue, 30 Aug 2016 04:09:38 -0400 Received: from host.76.145.23.62.rev.coltfrance.com ([62.23.145.76]:57004 "EHLO proxy.6wind.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755504AbcH3IJh (ORCPT ); Tue, 30 Aug 2016 04:09:37 -0400 Received: from elsass.dev.6wind.com (unknown [10.16.0.7]) by proxy.6wind.com (Postfix) with ESMTPS id 2FADC27AF7; Tue, 30 Aug 2016 10:09:35 +0200 (CEST) Received: from root by elsass.dev.6wind.com with local (Exim 4.84_2) (envelope-from ) id 1bee6o-0005tT-Uj; Tue, 30 Aug 2016 10:09:26 +0200 From: Nicolas Dichtel To: davem@davemloft.net Cc: netdev@vger.kernel.org, hideaki.yoshifuji@miraclelinux.com, Nicolas Dichtel Subject: [PATCH net v2 1/2] ipv6: add missing netconf notif when 'all' is updated Date: Tue, 30 Aug 2016 10:09:21 +0200 Message-Id: <1472544562-22581-1-git-send-email-nicolas.dichtel@6wind.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1472465149-1163-1-git-send-email-nicolas.dichtel@6wind.com> References: <1472465149-1163-1-git-send-email-nicolas.dichtel@6wind.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The 'default' value was not advertised. Fixes: f3a1bfb11ccb ("rtnl/ipv6: use netconf msg to advertise forwarding status") Signed-off-by: Nicolas Dichtel --- v2: fix a typo in the variable old_dflt net/ipv6/addrconf.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index f418d2eaeddd..2a688171a188 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -778,7 +778,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,