summaryrefslogtreecommitdiff
path: root/net/ipv4/raw.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r--net/ipv4/raw.c4
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,
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;