Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753369AbcCWBew (ORCPT ); Tue, 22 Mar 2016 21:34:52 -0400 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:3946 "EHLO cmccmta2.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752002AbcCWBes (ORCPT ); Tue, 22 Mar 2016 21:34:48 -0400 X-RM-TRANSID: 2ee556f1f2b4eb3-9e17d X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee956f1f2b1b09-aad7e From: Haishuang Yan To: "David S. Miller" , Alexey Kuznetsov , James Morris , Patrick McHardy Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Haishuang Yan Subject: [PATCH] gre: fix return value of gre_rcv Date: Wed, 23 Mar 2016 09:34:43 +0800 Message-Id: <1458696883-15796-1-git-send-email-yanhaishuang@cmss.chinamobile.com> X-Mailer: git-send-email 2.5.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 764 Lines: 31 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 --- 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