Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224439
b: refs/heads/master
c: 57e1ab6
h: refs/heads/master
i:
  224437: 0978b78
  224435: a7ae5c2
  224431: 9bd8045
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 18, 2010
1 parent bd2db2d commit 030dec5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c3710afbc333c33100739dec10662b4ee64e219
refs/heads/master: 57e1ab6eaddc9f2c358cd4afb497cda6e3c6821a
17 changes: 13 additions & 4 deletions trunk/net/ipv4/igmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ igmp_scount(struct ip_mc_list *pmc, int type, int gdeleted, int sdeleted)
return scount;
}

#define igmp_skb_size(skb) (*(unsigned int *)((skb)->cb))

static struct sk_buff *igmpv3_newpack(struct net_device *dev, int size)
{
struct sk_buff *skb;
Expand All @@ -308,9 +310,16 @@ static struct sk_buff *igmpv3_newpack(struct net_device *dev, int size)
struct igmpv3_report *pig;
struct net *net = dev_net(dev);

skb = alloc_skb(size + LL_ALLOCATED_SPACE(dev), GFP_ATOMIC);
if (skb == NULL)
return NULL;
while (1) {
skb = alloc_skb(size + LL_ALLOCATED_SPACE(dev),
GFP_ATOMIC | __GFP_NOWARN);
if (skb)
break;
size >>= 1;
if (size < 256)
return NULL;
}
igmp_skb_size(skb) = size;

{
struct flowi fl = { .oif = dev->ifindex,
Expand Down Expand Up @@ -399,7 +408,7 @@ static struct sk_buff *add_grhead(struct sk_buff *skb, struct ip_mc_list *pmc,
return skb;
}

#define AVAILABLE(skb) ((skb) ? ((skb)->dev ? (skb)->dev->mtu - (skb)->len : \
#define AVAILABLE(skb) ((skb) ? ((skb)->dev ? igmp_skb_size(skb) - (skb)->len : \
skb_tailroom(skb)) : 0)

static struct sk_buff *add_grec(struct sk_buff *skb, struct ip_mc_list *pmc,
Expand Down

0 comments on commit 030dec5

Please sign in to comment.