Skip to content

Commit

Permalink
ipv6: When we droped a packet, we should return NET_RX_DROP instead of 0
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yang Hongyang authored and David S. Miller committed Aug 29, 2008
1 parent d972405 commit 3cc76ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/ipv6/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 3cc76ca

Please sign in to comment.