ipv4: correct dropwatch false positive in ip_local_deliver_finish
Subsystems (3)
PATCH 1/1 ipv4: correct dropwatch false positive in ip_local_deliver_finish
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
--- net/ipv4/ip_input.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
net/ipv4/ip_input.c +4 -2
@@ -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:
Signature · 1 line
1.7.11.7
Quoted 26 lines · Neil Horman
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 <[email protected]>Reported-by William Reich <[email protected]>Tested-by William Reich <[email protected]>CC "David S. Miller" <[email protected]>CC William Reich <[email protected]>--- net/ipv4/ip_input.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)net/ipv4/ip_input.c +0
-0@@ -228,9 +228,11 @@ static int ip_local_deliver_finish(struct sk_buff *skb)icmp_send (skb,ICMP_DEST_UNREACH ,ICMP_PROT_UNREACH ,0 ); }
net/ipv4/ip_input.c static int ip_local_deliver_finish(struct sk_buff *skb) · line 238
Quoted 10 lines
net/ipv4/ip_input.c +4
-2- }else +kfree_skb (skb); + }else {IP_INC_STATS_BH (net,IPSTATS_MIB_INDELIVERS ); -kfree_skb (skb); +consume_skb (skb); + } } } out:
Quoted 9 lines · Neil Horman
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
Quoted 8 lines
Signed-off-by Neil Horman <[email protected]>Reported-by William Reich <[email protected]>Tested-by William Reich <[email protected]>CC "David S. Miller" <[email protected]>CC William Reich <[email protected]>--- 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 !
Quoted 19 lines · Eric Dumazet
Quoted 9 lines · Neil Horman
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
Quoted 8 lines
Signed-off-by Neil Horman <[email protected]>Reported-by William Reich <[email protected]>Tested-by William Reich <[email protected]>CC "David S. Miller" <[email protected]>CC William Reich <[email protected]>--- net/ipv4/ip_input.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Quoted 4 lines
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
Quoted 6 lines
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html