public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH] ipv6: Netlink notify forwarding change
@ 2013-01-09  0:11 Saurabh Mohan
  2013-01-09 16:27 ` Nicolas Dichtel
  0 siblings, 1 reply; 3+ messages in thread
From: Saurabh Mohan @ 2013-01-09  0:11 UTC (permalink / raw)
  To: netdev



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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-09 18:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-09  0:11 [PATCH] ipv6: Netlink notify forwarding change Saurabh Mohan
2013-01-09 16:27 ` Nicolas Dichtel
2013-01-09 18:55   ` Saurabh Mohan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox