lkml.org 
[lkml]   [2008]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH net-2.6.26] [IPV6] Return NET_RX_DROP when a packet is dropped in ipv6_rcv().
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>
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;
}

/*
\
 
 \ /
  Last update: 2008-04-14 15:19    [W:0.034 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site