diff options
author | David Stevens <dlstevens@us.ibm.com> | 2005-09-15 13:46:06 -0600 |
---|---|---|
committer | Chris Wright <chrisw@osdl.org> | 2005-10-03 16:27:17 -0700 |
commit | 6ce0c8dfdfdacc4d370ccd51fa5d4cd28118a9cf (patch) | |
tree | ac02658ff3b3ba440e898785b4a6e9da063a61ac | |
parent | 99e56fc6ee51c66c0d248c6dea7a45d70e15604e (diff) |
[PATCH] fix IPv6 per-socket multicast filtering in exact-match case
per-socket multicast filters were not being applied to all sockets
in the case of an exact-match bound address, due to an over-exuberant
"return" in the look-up code. Fix below. IPv4 does not have this problem.
Thanks to Hoerdt Mickael for reporting the bug.
Signed-off-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: Chris Wright <chrisw@osdl.org>
-rw-r--r-- | net/ipv6/udp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index eff050ac704..377f71ccf11 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -404,9 +404,8 @@ static struct sock *udp_v6_mcast_next(struct sock *sk, continue; if (!ipv6_addr_any(&np->rcv_saddr)) { - if (ipv6_addr_equal(&np->rcv_saddr, loc_addr)) - return s; - continue; + if (!ipv6_addr_equal(&np->rcv_saddr, loc_addr)) + continue; } if(!inet6_mc_check(s, loc_addr, rmt_addr)) continue; |