]> git.baikalelectronics.ru Git - kernel.git/commit
icmp: correct return value of icmp_rcv()
authorZhang Shengju <zhangshengju@cmss.chinamobile.com>
Wed, 7 Dec 2016 06:52:53 +0000 (14:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Dec 2016 16:24:23 +0000 (11:24 -0500)
commit6a5ed952c2601abfb5b88980d8549dc7b70400c0
tree4be17facb53f59cb38c6a20a330e0fe42bf0e121
parent1f1e8a215d4ddd0b9a3908a70f23c53caf16bda5
icmp: correct return value of icmp_rcv()

Currently, icmp_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 <zhangshengju@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/icmp.c