From patchwork Wed Jan 9 00:11:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saurabh X-Patchwork-Id: 210585 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 1F1E92C00C1 for ; Wed, 9 Jan 2013 11:13:05 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755362Ab3AIAMp (ORCPT ); Tue, 8 Jan 2013 19:12:45 -0500 Received: from mail.vyatta.com ([76.74.103.46]:41099 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754869Ab3AIAMo (ORCPT ); Tue, 8 Jan 2013 19:12:44 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.vyatta.com (Postfix) with ESMTP id 0C5B01410365 for ; Tue, 8 Jan 2013 16:12:44 -0800 (PST) X-Virus-Scanned: amavisd-new at tahiti.vyatta.com Received: from mail.vyatta.com ([127.0.0.1]) by localhost (mail.vyatta.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0rpVC7HLm0JE for ; Tue, 8 Jan 2013 16:12:43 -0800 (PST) Received: from localhost (eng-dhcp-109.vyatta.com [10.3.0.109]) by mail.vyatta.com (Postfix) with ESMTP id 39EAF1410363 for ; Tue, 8 Jan 2013 16:12:43 -0800 (PST) Date: Tue, 8 Jan 2013 16:11:14 -0800 From: Saurabh Mohan To: netdev@vger.kernel.org Subject: [PATCH] ipv6: Netlink notify forwarding change Message-ID: <20130109001114.GA3393@debian-saurabh-64.vyatta.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org If the interface is up and the forwarding attribute (net.ipv6.conf.eth1.forwarding) is changed then a netlink message is not generated. Signed-off-by: Saurabh Mohan --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 0f9f15e..a959606 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -130,6 +130,8 @@ static void ipv6_regen_rndid(unsigned long data); static int ipv6_generate_eui64(u8 *eui, struct net_device *dev); static int ipv6_count_addresses(struct inet6_dev *idev); +static int addrconf_notify(struct notifier_block *this, unsigned long event, + void *data); /* * Configured unicast address hash table @@ -467,6 +469,9 @@ static void dev_forward_change(struct inet6_dev *idev) if (!idev) return; + + addrconf_notify(NULL, NETDEV_CHANGE, idev->dev); + dev = idev->dev; if (idev->cnf.forwarding) dev_disable_lro(dev); @@ -2615,9 +2620,11 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, } if (idev) { - if (idev->if_flags & IF_READY) + if (idev->if_flags & IF_READY) { /* device is already configured. */ + inet6_ifinfo_notify(RTM_NEWLINK, idev); break; + } idev->if_flags |= IF_READY; }