Skip to contentSkip to conversation

netpoll: fix the skb check in pkt_is_ns

PATCH In review [email protected] 1 participant 2 messages Mar 17, 2014 – Mar 18, 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 570eb40..159f160 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

this patch can be dropped since other patch has been merged into net-next[netpoll: Remove dead packet receive code (CONFIG_NETPOLL_TRAP)]

Quoted 27 lines · On Mon, Mar 17, 2014 at 4:53 PM, <[email protected]> wrote:

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 -2
index 570eb40..159f160 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;
--

1.7.10.4