mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-2.6.26] [IPV6] Return NET_RX_DROP when a packet is dropped in ipv6_rcv().
@ 2008-04-14 13:15 Rami Rosen
  2008-04-14 13:52 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 1 reply; 2+ messages in thread
From: Rami Rosen @ 2008-04-14 13:15 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki / 吉藤英明
  Cc: David Miller, netdev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

Hi,
- The IPv6 handler for receiving packets is ipv6_rcv() in net/ipv6/ip6_input.c.
It is called by netif_receive_skb() (net/core/dev.c)
According to the documentation, the return value of netif_receive_skb() should
be NET_RX_DROP when the packet is dropped; though this return value
is usually not used (except maybe for congestion), this patch fixes the
ipv6_rcv() to return NET_RX_DROP when the packet is dropped (note that
NET_RX_DROP value **is not** 0 but 1; NET_RX_SUCCESS value is in fact	0).


Regards,
Rami Rosen


Signed-off-by: Rami Rosen <ramirose@gmail.com>

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 255 bytes --]

diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index 4e5c861..3ca041b 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -138,7 +138,7 @@ drop:
 	rcu_read_unlock();
 	kfree_skb(skb);
 out:
-	return 0;
+	return NET_RX_DROP;
 }
 
 /*

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

end of thread, other threads:[~2008-04-14 13:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-14 13:15 [PATCH net-2.6.26] [IPV6] Return NET_RX_DROP when a packet is dropped in ipv6_rcv() Rami Rosen
2008-04-14 13:52 ` YOSHIFUJI Hideaki / 吉藤英明

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®