Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Knut Tidemann <knut.andre.tidemann@jotron.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: kernel 2.6.39 eats multicast packets
Date: Sat, 18 Jun 2011 12:25:24 +0200	[thread overview]
Message-ID: <1308392724.3539.48.camel@edumazet-laptop> (raw)
In-Reply-To: <op.vw7on9im1qh6di@localhost.localdomain>

Le vendredi 17 juin 2011 à 10:32 +0200, Knut Tidemann a écrit :
> Hello.
> 
> We're seeing an issue where a listening UDP socket in a multicast group  
> doesn't receive some multicast packets.
>  From simple testing it seems that the first packet from a new host is not  
> passed through the kernel and down to the socket, but the next packets  
> are. The packets can be
> seen with a tool such as tcpdump, but they never reach the user space  
> socket. It is worth noting, that the packet loss does not occur when  
> sending to and from the same host,
> to a multicast address. The address and port we have been using in our  
> tests are 224.0.1.75:5060. I've also attached the testing code at the end  
> of this email. The issue was also present in 3.0-rc1.
> 
> This issue is not present in 2.6.38 and I've bisected the issue to the  
> following commit:
> 
> ----
> b23dd4fe42b455af5c6e20966b7d6959fa8352ea is the first bad commit
> commit b23dd4fe42b455af5c6e20966b7d6959fa8352ea
> Author: David S. Miller <davem@davemloft.net>
> Date:   Wed Mar 2 14:31:35 2011 -0800
> 
>      ipv4: Make output route lookup return rtable directly.
> 
>      Instead of on the stack.
> 
>      Signed-off-by: David S. Miller <davem@davemloft.net>
> ----
> 

Knut, this is awesome, your bug report is perfect and was really helpful
to let me fix the bug in maybe 15 minutes, including reboot and tests ;)

Many thanks !

[PATCH] ipv4: fix multicast losses

Knut Tidemann found that first packet of a multicast flow was not
correctly received, and bisected the regression to commit b23dd4fe42b4
(Make output route lookup return rtable directly.)

Special thanks to Knut, who provided a very nice bug report, including
sample programs to demonstrate the bug.

Reported-and-bisectedby: Knut Tidemann <knut.andre.tidemann@jotron.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 net/ipv4/route.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 045f0ec..aa13ef1 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1902,9 +1902,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,
 
 	hash = rt_hash(daddr, saddr, dev->ifindex, rt_genid(dev_net(dev)));
 	rth = rt_intern_hash(hash, rth, skb, dev->ifindex);
-	err = 0;
-	if (IS_ERR(rth))
-		err = PTR_ERR(rth);
+	return IS_ERR(rth) ? PTR_ERR(rth) : 0;
 
 e_nobufs:
 	return -ENOBUFS;



  reply	other threads:[~2011-06-18 10:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17  8:32 kernel 2.6.39 eats multicast packets Knut Tidemann
2011-06-18 10:25 ` Eric Dumazet [this message]
2011-06-18 18:59   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1308392724.3539.48.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=knut.andre.tidemann@jotron.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox