]> err.no Git - linux-2.6/commitdiff
[IPV6]: Reset the network header in ip6_nd_hdr
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 15 Mar 2007 00:05:03 +0000 (21:05 -0300)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:26:00 +0000 (22:26 -0700)
ip6_nd_hdr is always called immediately after a alloc_skb + skb_reserve
sequence, i.e. when skb->tail is equal to skb->data, making it correct to use
skb_reset_network_header().

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_output.c

index 49523c2a9f10f4c787af63c0dbee74f5cfa177a4..32e8c3f73c797b96a651924ae9025295cc346d12 100644 (file)
@@ -263,7 +263,8 @@ int ip6_nd_hdr(struct sock *sk, struct sk_buff *skb, struct net_device *dev,
 
        totlen = len + sizeof(struct ipv6hdr);
 
-       skb->nh.raw = skb_put(skb, sizeof(struct ipv6hdr));
+       skb_reset_network_header(skb);
+       skb_put(skb, sizeof(struct ipv6hdr));
        hdr = ipv6_hdr(skb);
 
        *(__be32*)hdr = htonl(0x60000000);