提交 5c91face 编写于 作者: M Mark Smith 提交者: David S. Miller

ipv6: correct return on ipv6_rcv() packet drop

The routine ipv6_rcv() uses magic number 0 for a return when it drops a
packet. This corresponds to NET_RX_SUCCESS, which is obviously
incorrect. Correct this by using NET_RX_DROP instead.

ps. It isn't exactly clear who the IPv6 maintainers are, apologies if
I've missed any.
Signed-off-by: NMark Smith <markzzzsmith@yahoo.com.au>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b7cb8c2c
......@@ -63,7 +63,7 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
if (skb->pkt_type == PACKET_OTHERHOST) {
kfree_skb(skb);
return 0;
return NET_RX_DROP;
}
rcu_read_lock();
......@@ -133,7 +133,7 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
if (ipv6_parse_hopopts(skb) < 0) {
IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_INHDRERRORS);
rcu_read_unlock();
return 0;
return NET_RX_DROP;
}
}
......@@ -149,7 +149,7 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
drop:
rcu_read_unlock();
kfree_skb(skb);
return 0;
return NET_RX_DROP;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册