Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1363154
| From | Haishuang Yan <yanhaishuang@cmss.chinamobile.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] gre: fix return value of gre_rcv |
| Date | 2016-03-23 02:40 +0100 |
| Message-ID | <rfFWa-4tr-19@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Dropped skb's should be documented by an appropriate return value. Use the correct NET_RX_DROP and NET_RX_SUCCESS values for that reason. Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com> --- net/ipv4/ip_gre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 31936d3..1dc0cdb 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -432,12 +432,12 @@ static int gre_rcv(struct sk_buff *skb) goto drop; if (ipgre_rcv(skb, &tpi) == PACKET_RCVD) - return 0; + return NET_RX_SUCCESS; icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0); drop: kfree_skb(skb); - return 0; + return NET_RX_DROP; } static __sum16 gre_checksum(struct sk_buff *skb) -- 1.8.3.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] gre: fix return value of gre_rcv Haishuang Yan <yanhaishuang@cmss.chinamobile.com> - 2016-03-23 02:40 +0100 Re: [PATCH] gre: fix return value of gre_rcv David Miller <davem@davemloft.net> - 2016-03-23 19:30 +0100
csiph-web