ndisc: Use skb_linearize() instead of pskb_may_pull(skb, skb->len).

Suggested by Eric Dumazet <edumazet@google.com>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
YOSHIFUJI Hideaki / 吉藤英明 2013-01-21 06:48:03 +00:00 committed by David S. Miller
parent c558e9fca8
commit 6bce6b4e16
1 changed files with 1 additions and 1 deletions

View File

@ -1509,7 +1509,7 @@ int ndisc_rcv(struct sk_buff *skb)
{
struct nd_msg *msg;
if (!pskb_may_pull(skb, skb->len))
if (skb_linearize(skb))
return 0;
msg = (struct nd_msg *)skb_transport_header(skb);