Skip to contentSkip to conversation

netpoll: fix the skb check in pkt_is_ns

PATCH Applied [email protected] 3 participants 4 messages Mar 21, 2014 – Mar 24, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netpoll: fix the skb check in pkt_is_ns

From: Li RongQing <[email protected]>

Neighbor Solicitation is ipv6 protocol, so we should check skb->protocol with ETH_P_IPV6

---
 net/core/netpoll.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/netpoll.c +1 -1
index a664f78..df9e6b1 100644
@@ -742,7 +742,7 @@ static bool pkt_is_ns(struct sk_buff *skb)
 	struct nd_msg *msg;
 	struct ipv6hdr *hdr;
 
-	if (skb->protocol != htons(ETH_P_ARP))
+	if (skb->protocol != htons(ETH_P_IPV6))
 		return false;
 	if (!pskb_may_pull(skb, sizeof(struct ipv6hdr) + sizeof(struct nd_msg)))
 		return false;
Signature · 1 line
1.7.10.4
#1 lore raw

net/core/netpoll.c static bool pkt_is_ns(struct sk_buff *skb) · line 745

Quoted 10 lines · On Fri, Mar 21, 2014 at 5:53 AM, <[email protected]> wrote:
net/core/netpoll.c +1 -1
index a664f78..df9e6b1 100644
@@ -742,7 +742,7 @@ static bool pkt_is_ns(struct sk_buff *skb)
        struct nd_msg *msg;
        struct ipv6hdr *hdr;
 
-       if (skb->protocol != htons(ETH_P_ARP))
+       if (skb->protocol != htons(ETH_P_IPV6))

But this code was just removed by:

commit 9c62a68d13119a1ca9718381d97b0cb415ff4e9d

Author: Eric W. Biederman <[email protected]>
Date:   Fri Mar 14 20:51:52 2014 -0700

netpoll: Remove dead packet receive code (CONFIG_NETPOLL_TRAP)

Or your patch is for -net? But CONFIG_NETPOLL_TRAP doesn't have any in-tree users, so we probably don't care.

#2 lore raw
Quoted 11 lines · Cong Wang

But this code was just removed by:

commit 9c62a68d13119a1ca9718381d97b0cb415ff4e9d

Author: Eric W. Biederman <[email protected]>
Date:   Fri Mar 14 20:51:52 2014 -0700

netpoll: Remove dead packet receive code (CONFIG_NETPOLL_TRAP)

Or your patch is for -net? But CONFIG_NETPOLL_TRAP doesn't have any in-tree users, so we probably don't care

Yes, for net;
This bug is so dazzle before 9c62a68d13119a1ca9718381d97b0cb415ff4e9d is merged into net

-Roy