public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	William Reich <reich@ulticom.com>
Subject: Re: [PATCH net-next] ipv4: correct dropwatch false positive in ip_local_deliver_finish
Date: Fri, 01 Mar 2013 08:37:25 -0800	[thread overview]
Message-ID: <1362155845.15793.55.camel@edumazet-glaptop> (raw)
In-Reply-To: <1362154680-4331-1-git-send-email-nhorman@tuxdriver.com>

On Fri, 2013-03-01 at 11:18 -0500, Neil Horman wrote:
> I had a report recently of a user trying to use dropwatch to localise some frame
> loss, and they were getting false positives.  Turned out they were using a user
> space SCTP stack that used raw sockets to grab frames.  When we don't have a
> registered protocol for a given packet, we record it as a drop, even if a raw
> socket receieves the frame.  We should only record the drop in the event a raw
> socket doesnt exist to receive the frames
> 
> Tested by the reported successfully
> 
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> Reported-by: William Reich <reich@ulticom.com>
> Tested-by: William Reich <reich@ulticom.com>
> CC: "David S. Miller" <davem@davemloft.net>
> CC: William Reich <reich@ulticom.com>
> ---
>  net/ipv4/ip_input.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
> index 87abd3e..2bdf802 100644
> --- a/net/ipv4/ip_input.c
> +++ b/net/ipv4/ip_input.c
> @@ -228,9 +228,11 @@ static int ip_local_deliver_finish(struct sk_buff *skb)
>  					icmp_send(skb, ICMP_DEST_UNREACH,
>  						  ICMP_PROT_UNREACH, 0);
>  				}
> -			} else
> +				kfree_skb(skb);
> +			} else {
>  				IP_INC_STATS_BH(net, IPSTATS_MIB_INDELIVERS);
> -			kfree_skb(skb);
> +				consume_skb(skb);
> +			}
>  		}
>  	}
>   out:

Acked-by: Eric Dumazet <edumazet@google.com>

  reply	other threads:[~2013-03-01 16:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-01 16:18 [PATCH net-next] ipv4: correct dropwatch false positive in ip_local_deliver_finish Neil Horman
2013-03-01 16:37 ` Eric Dumazet [this message]
2013-03-01 16:38 ` Eric Dumazet
2013-03-01 17:12   ` Neil Horman

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=1362155845.15793.55.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=reich@ulticom.com \
    /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