Commit d40390bf authored by Li RongQing's avatar Li RongQing Committed by Jiri Slaby

netpoll: fix the skb check in pkt_is_ns

[ Not applicable upstream commit, the code here has been removed
  upstream. ]

Neighbor Solicitation is ipv6 protocol, so we should check
skb->protocol with ETH_P_IPV6
Signed-off-by: default avatarLi RongQing <roy.qing.li@gmail.com>
Cc: WANG Cong <amwang@redhat.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent d8496cba
...@@ -740,7 +740,7 @@ static bool pkt_is_ns(struct sk_buff *skb) ...@@ -740,7 +740,7 @@ static bool pkt_is_ns(struct sk_buff *skb)
struct nd_msg *msg; struct nd_msg *msg;
struct ipv6hdr *hdr; struct ipv6hdr *hdr;
if (skb->protocol != htons(ETH_P_ARP)) if (skb->protocol != htons(ETH_P_IPV6))
return false; return false;
if (!pskb_may_pull(skb, sizeof(struct ipv6hdr) + sizeof(struct nd_msg))) if (!pskb_may_pull(skb, sizeof(struct ipv6hdr) + sizeof(struct nd_msg)))
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment