diff options
Diffstat (limited to 'quicktun.c')
-rw-r--r-- | quicktun.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -87,8 +87,9 @@ static netdev_tx_t quicktun_net_xmit(struct sk_buff *skb, struct net_device *dev goto error; } - if (skb_headroom(skb) < (LL_RESERVED_SPACE(rt->dst.dev) + sizeof(struct iphdr) + sizeof(struct udphdr)) || skb_shared(skb) || (skb_cloned(skb) && !skb_clone_writable(skb, 0))) { - struct sk_buff *new_skb = skb_realloc_headroom(skb, sizeof(struct iphdr) + sizeof(struct udphdr)); + if (skb_headroom(skb) < (LL_RESERVED_SPACE(rt->dst.dev) + sizeof(struct iphdr) + sizeof(struct udphdr)) + || skb_shared(skb) || (skb_cloned(skb) && !skb_clone_writable(skb, 0))) { + struct sk_buff *new_skb = skb_realloc_headroom(skb, LL_RESERVED_SPACE(rt->dst.dev) + sizeof(struct iphdr) + sizeof(struct udphdr)); if (!new_skb) { tun->dev->stats.tx_dropped++; goto error; |