Patchwork ipv6: Netlink notify forwarding change

login
register
mail settings
Submitter Saurabh
Date Jan. 9, 2013, 12:11 a.m.
Message ID <20130109001114.GA3393@debian-saurabh-64.vyatta.com>
Download mbox | patch
Permalink /patch/210585/
State Rejected
Delegated to: David Miller
Headers show

Comments

Saurabh - Jan. 9, 2013, 12:11 a.m.
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>

---
--
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
Nicolas Dichtel - Jan. 9, 2013, 4:27 p.m.
Le 09/01/2013 01:11, Saurabh Mohan a écrit :
>
>
> If the interface is up and the forwarding attribute
> (net.ipv6.conf.eth1.forwarding) is changed then a netlink message is not
> generated.
>
A rtnetlink message RTM_NEWNETCONF is sent (see inet6_netconf_notify_devconf()).
--
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
Saurabh - Jan. 9, 2013, 6:55 p.m.
----- Original Message -----
> Le 09/01/2013 01:11, Saurabh Mohan a écrit :
> >
> >
> > If the interface is up and the forwarding attribute
> > (net.ipv6.conf.eth1.forwarding) is changed then a netlink message
> > is not
> > generated.
> >
> A rtnetlink message RTM_NEWNETCONF is sent (see
> inet6_netconf_notify_devconf()).

yes. The submitted patch is invalid with the
latest version. Thanks.
--
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

Patch

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