diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-06-13 16:29:25 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-06-13 16:29:25 +0000 |
commit | db7d4daea91e105e3859cf461d7e53b9b77454b2 (patch) | |
tree | 9bb65b95440af09e8aca63abe56970dd3360cc57 /drivers/net/ethertap.c | |
parent | 9c1c01ead627bdda9211c9abd5b758d6c687d8ac (diff) |
Merge with Linux 2.2.8.
Diffstat (limited to 'drivers/net/ethertap.c')
-rw-r--r-- | drivers/net/ethertap.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/net/ethertap.c b/drivers/net/ethertap.c index 46b7babd4..cc478fb2e 100644 --- a/drivers/net/ethertap.c +++ b/drivers/net/ethertap.c @@ -177,11 +177,21 @@ static int ethertap_start_xmit(struct sk_buff *skb, struct device *dev) #endif if (skb_headroom(skb) < 2) { - printk(KERN_DEBUG "%s : bug --- xmit with head<2\n", dev->name); + static int once; + struct sk_buff *skb2; + + if (!once) { + once = 1; + printk(KERN_DEBUG "%s: not aligned xmit by protocol %04x\n", dev->name, skb->protocol); + } + + skb2 = skb_realloc_headroom(skb, 2); dev_kfree_skb(skb); - return 0; + if (skb2 == NULL) + return 0; + skb = skb2; } - skb_push(skb, 2); + __skb_push(skb, 2); /* Make the same thing, which loopback does. */ if (skb_shared(skb)) { |