netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv4: return NET_RX_DROP when arp_rcv drops the received packet.
@ 2011-11-15  2:09 roy.qing.li
  2011-11-15 21:47 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: roy.qing.li @ 2011-11-15  2:09 UTC (permalink / raw)
  To: netdev

From: RongQing.Li <roy.qing.li@gmail.com>

return NET_RX_DROP when arp_rcv drops the received packet.

Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
---
 net/ipv4/arp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index d732827..9967385 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -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;
 }
 
 /*
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ipv4: return NET_RX_DROP when arp_rcv drops the received packet.
  2011-11-15  2:09 [PATCH] ipv4: return NET_RX_DROP when arp_rcv drops the received packet roy.qing.li
@ 2011-11-15 21:47 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-11-15 21:47 UTC (permalink / raw)
  To: roy.qing.li; +Cc: netdev

From: roy.qing.li@gmail.com
Date: Tue, 15 Nov 2011 10:09:47 +0800

> From: RongQing.Li <roy.qing.li@gmail.com>
> 
> return NET_RX_DROP when arp_rcv drops the received packet.
> 
> Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-15 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-15  2:09 [PATCH] ipv4: return NET_RX_DROP when arp_rcv drops the received packet roy.qing.li
2011-11-15 21:47 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).