diff options
Diffstat (limited to 'net/ipv4/igmp.c')
-rw-r--r-- | net/ipv4/igmp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 8cedb2a2c9df..d17ad09a83e0 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -314,7 +314,9 @@ static struct sk_buff *igmpv3_newpack(struct net_device *dev, int size) | |||
314 | 314 | ||
315 | skb_reserve(skb, LL_RESERVED_SPACE(dev)); | 315 | skb_reserve(skb, LL_RESERVED_SPACE(dev)); |
316 | 316 | ||
317 | skb->nh.iph = pip =(struct iphdr *)skb_put(skb, sizeof(struct iphdr)+4); | 317 | skb_reset_network_header(skb); |
318 | pip = skb->nh.iph; | ||
319 | skb_put(skb, sizeof(struct iphdr) + 4); | ||
318 | 320 | ||
319 | pip->version = 4; | 321 | pip->version = 4; |
320 | pip->ihl = (sizeof(struct iphdr)+4)>>2; | 322 | pip->ihl = (sizeof(struct iphdr)+4)>>2; |
@@ -664,7 +666,9 @@ static int igmp_send_report(struct in_device *in_dev, struct ip_mc_list *pmc, | |||
664 | 666 | ||
665 | skb_reserve(skb, LL_RESERVED_SPACE(dev)); | 667 | skb_reserve(skb, LL_RESERVED_SPACE(dev)); |
666 | 668 | ||
667 | skb->nh.iph = iph = (struct iphdr *)skb_put(skb, sizeof(struct iphdr)+4); | 669 | skb_reset_network_header(skb); |
670 | iph = skb->nh.iph; | ||
671 | skb_put(skb, sizeof(struct iphdr) + 4); | ||
668 | 672 | ||
669 | iph->version = 4; | 673 | iph->version = 4; |
670 | iph->ihl = (sizeof(struct iphdr)+4)>>2; | 674 | iph->ihl = (sizeof(struct iphdr)+4)>>2; |