Netdev List
 help / color / mirror / Atom feed
From: Saurabh Mohan <saurabh.mohan@vyatta.com>
To: netdev@vger.kernel.org
Subject: [PATCH] ipv6: Netlink notify forwarding change
Date: Tue, 8 Jan 2013 16:11:14 -0800	[thread overview]
Message-ID: <20130109001114.GA3393@debian-saurabh-64.vyatta.com> (raw)



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 <saurabh.mohan@vyatta.com>

---
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;
 			}
 

             reply	other threads:[~2013-01-09  0:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-09  0:11 Saurabh Mohan [this message]
2013-01-09 16:27 ` [PATCH] ipv6: Netlink notify forwarding change Nicolas Dichtel
2013-01-09 18:55   ` Saurabh Mohan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130109001114.GA3393@debian-saurabh-64.vyatta.com \
    --to=saurabh.mohan@vyatta.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox