Message ID | 1401395226-10304-2-git-send-email-sven.wegener@stealer.net |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Thu, 2014-05-29 at 20:27 +0000, Sven Wegener wrote: > Commit efe4208 ("ipv6: make lookups simpler and faster") introduced a > regression in udp_v6_mcast_next(), resulting in multicast packets not > reaching the destination sockets under certain conditions. > > The packet's IPv6 addresses are wrongly compared to the IPv6 addresses > from the function's socket argument, which indicates the starting point > for looping, instead of the loop variable. If the addresses from the > first socket do not match the packet's addresses, no socket in the list > will match. > > Cc: Eric Dumazet <edumazet@google.com> > Cc: stable@vger.kernel.org # 3.13+ > Signed-off-by: Sven Wegener <sven.wegener@stealer.net> > --- > net/ipv6/udp.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) Acked-by: Eric Dumazet <edumazet@google.com> I removed the CC stable@ , as you should not have use it. 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
From: Eric Dumazet <eric.dumazet@gmail.com> Date: Thu, 29 May 2014 13:37:35 -0700 > On Thu, 2014-05-29 at 20:27 +0000, Sven Wegener wrote: >> Commit efe4208 ("ipv6: make lookups simpler and faster") introduced a >> regression in udp_v6_mcast_next(), resulting in multicast packets not >> reaching the destination sockets under certain conditions. >> >> The packet's IPv6 addresses are wrongly compared to the IPv6 addresses >> from the function's socket argument, which indicates the starting point >> for looping, instead of the loop variable. If the addresses from the >> first socket do not match the packet's addresses, no socket in the list >> will match. >> >> Cc: Eric Dumazet <edumazet@google.com> >> Cc: stable@vger.kernel.org # 3.13+ >> Signed-off-by: Sven Wegener <sven.wegener@stealer.net> >> --- >> net/ipv6/udp.c | 8 ++++---- >> 1 file changed, 4 insertions(+), 4 deletions(-) > > Acked-by: Eric Dumazet <edumazet@google.com> > > I removed the CC stable@ , as you should not have use it. I'll apply this to 'net' and queue it up for -stable, thanks. The next time I merge 'net' into 'net-next' I'll add the second patch there. Thanks again. -- 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
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 1e586d9..20b63d2 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -716,15 +716,15 @@ static struct sock *udp_v6_mcast_next(struct net *net, struct sock *sk, if (inet->inet_dport != rmt_port) continue; } - if (!ipv6_addr_any(&sk->sk_v6_daddr) && - !ipv6_addr_equal(&sk->sk_v6_daddr, rmt_addr)) + if (!ipv6_addr_any(&s->sk_v6_daddr) && + !ipv6_addr_equal(&s->sk_v6_daddr, rmt_addr)) continue; if (s->sk_bound_dev_if && s->sk_bound_dev_if != dif) continue; - if (!ipv6_addr_any(&sk->sk_v6_rcv_saddr)) { - if (!ipv6_addr_equal(&sk->sk_v6_rcv_saddr, loc_addr)) + if (!ipv6_addr_any(&s->sk_v6_rcv_saddr)) { + if (!ipv6_addr_equal(&s->sk_v6_rcv_saddr, loc_addr)) continue; } if (!inet6_mc_check(s, loc_addr, rmt_addr))
Commit efe4208 ("ipv6: make lookups simpler and faster") introduced a regression in udp_v6_mcast_next(), resulting in multicast packets not reaching the destination sockets under certain conditions. The packet's IPv6 addresses are wrongly compared to the IPv6 addresses from the function's socket argument, which indicates the starting point for looping, instead of the loop variable. If the addresses from the first socket do not match the packet's addresses, no socket in the list will match. Cc: Eric Dumazet <edumazet@google.com> Cc: stable@vger.kernel.org # 3.13+ Signed-off-by: Sven Wegener <sven.wegener@stealer.net> --- net/ipv6/udp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)