summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethertap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethertap.c')
-rw-r--r--drivers/net/ethertap.c16
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)) {