diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-10 16:40:59 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:24:48 -0400 |
commit | 7e28ecc282574a7d72ace365fc9bc86e27ba880f (patch) | |
tree | 6321d16c591694d6405b723f7bea80855b8040ce /net/ipv4/raw.c | |
parent | e2d1bca7e6134671bcb19810d004a252aa6a644d (diff) |
[SK_BUFF]: Use skb_reset_network_header where the skb_pull return was being used
But only in the cases where its a newly allocated skb, i.e. one where skb->tail
is equal to skb->data, or just after skb_reserve, where this requirement is
maintained.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 87e9c1618100..67e5e3c035c1 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -291,7 +291,9 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length, | |||
291 | skb->priority = sk->sk_priority; | 291 | skb->priority = sk->sk_priority; |
292 | skb->dst = dst_clone(&rt->u.dst); | 292 | skb->dst = dst_clone(&rt->u.dst); |
293 | 293 | ||
294 | skb->nh.iph = iph = (struct iphdr *)skb_put(skb, length); | 294 | skb_reset_network_header(skb); |
295 | iph = skb->nh.iph; | ||
296 | skb_put(skb, length); | ||
295 | 297 | ||
296 | skb->ip_summed = CHECKSUM_NONE; | 298 | skb->ip_summed = CHECKSUM_NONE; |
297 | 299 | ||