netpoll: fix the skb check in pkt_is_ns
Subsystems (2)
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
Signed-off-by Li RongQing <[email protected]>
Cc WANG Cong <[email protected]>
--- net/core/netpoll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/netpoll.c +1 -1
@@ -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
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->protocolwithETH_P_IPV6Signed-off-by Li RongQing <[email protected]>Cc WANG Cong <[email protected]>--- net/core/netpoll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/core/netpoll.c +1
-2@@ -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