public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Yang Hongyang <yanghy@cn•fujitsu.com>
To: "David S. Miller" <davem@davemloft•net>, netdev@vger•kernel.org
Subject: [PATCH]ipv6:When we droped a package,we should return NET_RX_DROP instead of 0
Date: Fri, 29 Aug 2008 15:40:17 +0800	[thread overview]
Message-ID: <48B7A7E1.70307@cn.fujitsu.com> (raw)

When we droped a package,we should return NET_RX_DROP instead of 0

Signed-off-by: Yang Hongyang<yanghy@cn•fujitsu.com>

---
 net/ipv6/raw.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 01d4767..e53e493 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -377,14 +377,14 @@ static inline int rawv6_rcv_skb(struct sock * sk, struct sk_buff * skb)
 	    skb_checksum_complete(skb)) {
 		atomic_inc(&sk->sk_drops);
 		kfree_skb(skb);
-		return 0;
+		return NET_RX_DROP;
 	}
 
 	/* Charge it to the socket. */
 	if (sock_queue_rcv_skb(sk,skb)<0) {
 		atomic_inc(&sk->sk_drops);
 		kfree_skb(skb);
-		return 0;
+		return NET_RX_DROP;
 	}
 
 	return 0;
@@ -429,7 +429,7 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
 		if (skb_checksum_complete(skb)) {
 			atomic_inc(&sk->sk_drops);
 			kfree_skb(skb);
-			return 0;
+			return NET_RX_DROP;
 		}
 	}
 
-- 
1.5.3.8



             reply	other threads:[~2008-08-29  7:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-29  7:40 Yang Hongyang [this message]
2008-08-29 21:07 ` [PATCH]ipv6:When we droped a package,we should return NET_RX_DROP instead of 0 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48B7A7E1.70307@cn.fujitsu.com \
    --to=yanghy@cn$(echo .)fujitsu.com \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox