Skip to content

Commit

Permalink
ndisc: Use skb_linearize() instead of pskb_may_pull(skb, skb->len).
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
YOSHIFUJI Hideaki / 吉藤英明 authored and David S. Miller committed Jan 21, 2013
1 parent c558e9f commit 6bce6b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/ndisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6bce6b4

Please sign in to comment.