* [PATCH net-next] ipv4: correct dropwatch false positive in ip_local_deliver_finish
@ 2013-03-01 16:18 Neil Horman
2013-03-01 16:37 ` Eric Dumazet
2013-03-01 16:38 ` Eric Dumazet
0 siblings, 2 replies; 4+ messages in thread
From: Neil Horman @ 2013-03-01 16:18 UTC (permalink / raw)
To: netdev; +Cc: Neil Horman, David S. Miller, William Reich
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:
--
1.7.11.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] ipv4: correct dropwatch false positive in ip_local_deliver_finish
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
2013-03-01 16:38 ` Eric Dumazet
1 sibling, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2013-03-01 16:37 UTC (permalink / raw)
To: Neil Horman; +Cc: netdev, David S. Miller, William Reich
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] ipv4: correct dropwatch false positive in ip_local_deliver_finish
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
@ 2013-03-01 16:38 ` Eric Dumazet
2013-03-01 17:12 ` Neil Horman
1 sibling, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2013-03-01 16:38 UTC (permalink / raw)
To: Neil Horman; +Cc: netdev, David S. Miller, William Reich
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(-)
Hmm, could you perhaps do the similar fix for IPv6 in the same patch ?
Thanks !
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] ipv4: correct dropwatch false positive in ip_local_deliver_finish
2013-03-01 16:38 ` Eric Dumazet
@ 2013-03-01 17:12 ` Neil Horman
0 siblings, 0 replies; 4+ messages in thread
From: Neil Horman @ 2013-03-01 17:12 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev, David S. Miller, William Reich
On Fri, Mar 01, 2013 at 08:38:32AM -0800, Eric Dumazet wrote:
> 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(-)
>
> Hmm, could you perhaps do the similar fix for IPv6 in the same patch ?
>
> Thanks !
>
Sure, give me a moment, and I'll respin it.
Neil
>
> --
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-01 17:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2013-03-01 16:38 ` Eric Dumazet
2013-03-01 17:12 ` Neil Horman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.