[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>
This commit is contained in:
Arnaldo Carvalho de Melo
2007-03-10 18:40:59 -03:00
committed by David S. Miller
parent e2d1bca7e6
commit 7e28ecc282
5 changed files with 24 additions and 8 deletions

View File

@@ -291,7 +291,9 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length,
skb->priority = sk->sk_priority;
skb->dst = dst_clone(&rt->u.dst);
skb->nh.iph = iph = (struct iphdr *)skb_put(skb, length);
skb_reset_network_header(skb);
iph = skb->nh.iph;
skb_put(skb, length);
skb->ip_summed = CHECKSUM_NONE;