Currently, arp_rcv() always return zero on a packet delivery upcall.
To make its behavior more compliant with the way this API should be
used, this patch changes this to let it return NET_RX_SUCCESS when the
packet is proper handled, and NET_RX_DROP otherwise.
Signed-off-by: Zhang Shengju <redacted>
---
net/ipv4/arp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index c102eb5..ae235a1 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -880,7 +880,7 @@ out:
consume_skb(skb);
out_free_dst:
dst_release(reply_dst);
- return 0;
+ return NET_RX_SUCCESS;
}
static void parp_redo(struct sk_buff *skb)
@@ -924,11 +924,11 @@ static int arp_rcv(struct sk_buff *skb, struct net_device *dev,
consumeskb:
consume_skb(skb);
- return 0;
+ return NET_RX_SUCCESS;
freeskb:
kfree_skb(skb);
out_of_mem:
- return 0;
+ return NET_RX_DROP;
}
/*
--
1.8.3.1