Loading net/ipv4/igmp.c +13 −4 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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) 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, Loading Loading @@ -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, Loading Loading
net/ipv4/igmp.c +13 −4 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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) 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, Loading Loading @@ -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, Loading