Skip to contentSkip to conversation

ipv4: return NET_RX_DROP when arp_rcv drops the received packet.

PATCH In review [email protected] 2 participants 2 messages Nov 15, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipv4: return NET_RX_DROP when arp_rcv drops the received packet.

From: RongQing.Li <[email protected]>

return NET_RX_DROP when arp_rcv drops the received packet.

---
 net/ipv4/arp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/ipv4/arp.c +1 -1
index d732827..9967385 100644
@@ -969,7 +969,7 @@ static int arp_rcv(struct sk_buff *skb, struct net_device *dev,
 freeskb:
 	kfree_skb(skb);
 out_of_mem:
-	return 0;
+	return NET_RX_DROP;
 }
 
 /*
Signature · 1 line
1.7.1
maintainer
#1 lore raw

From: [email protected]
Date: Tue, 15 Nov 2011 10:09:47 +0800

Quoted 5 lines

From: RongQing.Li <[email protected]>

return NET_RX_DROP when arp_rcv drops the received packet.

This is not appropriate.

NET_RX_DROP means that the packet was dropped because something about the packet's contents were not acceptable, or the packet violated our policies so was dropped.

In this arp_rcv() case, we would have accepted the packet, but we had a memory allocation error. This memory allocation error has nothing to do with the packet's contents, and is a transient issue.