* [PATCH] IPv6: Fix not join all-router mcast group when forwarding set.
@ 2012-03-05 9:54 Li Wei
2012-03-05 20:11 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Li Wei @ 2012-03-05 9:54 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
When forwarding was set and a new net device is register,
we need add this device to the all-router mcast group.
Signed-off-by: Li Wei <lw@cn.fujitsu.com>
---
net/ipv6/addrconf.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index c02280a..1e09591 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -434,6 +434,10 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
/* Join all-node multicast group */
ipv6_dev_mc_inc(dev, &in6addr_linklocal_allnodes);
+ /* Join all-router multicast group if forwarding is set */
+ if (ndev->cnf.forwarding && dev && (dev->flags & IFF_MULTICAST))
+ ipv6_dev_mc_inc(dev, &in6addr_linklocal_allrouters);
+
return ndev;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] IPv6: Fix not join all-router mcast group when forwarding set.
2012-03-05 9:54 [PATCH] IPv6: Fix not join all-router mcast group when forwarding set Li Wei
@ 2012-03-05 20:11 ` David Miller
2012-03-06 0:45 ` [PATCH v2] " Li Wei
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2012-03-05 20:11 UTC (permalink / raw)
To: lw; +Cc: netdev
From: Li Wei <lw@cn.fujitsu.com>
Date: Mon, 05 Mar 2012 17:54:33 +0800
> + /* Join all-router multicast group if forwarding is set */
> + if (ndev->cnf.forwarding && dev && (dev->flags & IFF_MULTICAST))
> + ipv6_dev_mc_inc(dev, &in6addr_linklocal_allrouters);
Whitespace damaged. First line properly uses a TAB, the next uses
spaces and indents too far.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] IPv6: Fix not join all-router mcast group when forwarding set.
2012-03-05 20:11 ` David Miller
@ 2012-03-06 0:45 ` Li Wei
2012-03-06 22:00 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Li Wei @ 2012-03-06 0:45 UTC (permalink / raw)
To: David Miller; +Cc: netdev
When forwarding was set and a new net device is register,
we need add this device to the all-router mcast group.
Signed-off-by: Li Wei <lw@cn.fujitsu.com>
---
net/ipv6/addrconf.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index c02280a..6b8ebc5 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -434,6 +434,10 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
/* Join all-node multicast group */
ipv6_dev_mc_inc(dev, &in6addr_linklocal_allnodes);
+ /* Join all-router multicast group if forwarding is set */
+ if (ndev->cnf.forwarding && dev && (dev->flags & IFF_MULTICAST))
+ ipv6_dev_mc_inc(dev, &in6addr_linklocal_allrouters);
+
return ndev;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] IPv6: Fix not join all-router mcast group when forwarding set.
2012-03-06 0:45 ` [PATCH v2] " Li Wei
@ 2012-03-06 22:00 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-03-06 22:00 UTC (permalink / raw)
To: lw; +Cc: netdev
From: Li Wei <lw@cn.fujitsu.com>
Date: Tue, 06 Mar 2012 08:45:17 +0800
> When forwarding was set and a new net device is register,
> we need add this device to the all-router mcast group.
>
> Signed-off-by: Li Wei <lw@cn.fujitsu.com>
Ok, since all the necessary code paths hold the rtnl mutex, this should
be safe and race free.
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-06 22:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-05 9:54 [PATCH] IPv6: Fix not join all-router mcast group when forwarding set Li Wei
2012-03-05 20:11 ` David Miller
2012-03-06 0:45 ` [PATCH v2] " Li Wei
2012-03-06 22:00 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).