aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/igmp.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-10 16:40:59 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:24:48 -0400
commit7e28ecc282574a7d72ace365fc9bc86e27ba880f (patch)
tree6321d16c591694d6405b723f7bea80855b8040ce /net/ipv4/igmp.c
parente2d1bca7e6134671bcb19810d004a252aa6a644d (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/igmp.c')
-rw-r--r--net/ipv4/igmp.c8
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;