summaryrefslogtreecommitdiffstats
path: root/quicktun.c
diff options
context:
space:
mode:
Diffstat (limited to 'quicktun.c')
-rw-r--r--quicktun.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/quicktun.c b/quicktun.c
index 2887942..f57e480 100644
--- a/quicktun.c
+++ b/quicktun.c
@@ -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;