summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_output.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo2007-03-15 01:05:03 +0100
committerDavid S. Miller2007-04-26 07:26:00 +0200
commit55f79cc0c02f9ce8f85e965e9679796f62b790f5 (patch)
tree084c727a90562de1b31eff84a1b1804edcd11100 /net/ipv6/ip6_output.c
parent[SK_BUFF]: More skb_put related conversions to skb_reset_transport_header (diff)
downloadkernel-qcow2-linux-55f79cc0c02f9ce8f85e965e9679796f62b790f5.tar.gz
kernel-qcow2-linux-55f79cc0c02f9ce8f85e965e9679796f62b790f5.tar.xz
kernel-qcow2-linux-55f79cc0c02f9ce8f85e965e9679796f62b790f5.zip
[IPV6]: Reset the network header in ip6_nd_hdr
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>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r--net/ipv6/ip6_output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 49523c2a9f10..32e8c3f73c79 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -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);