patch-2.2.8 linux/drivers/net/ethertap.c
Next file: linux/drivers/net/ibmtr.c
Previous file: linux/drivers/net/eql.c
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Tue May 11 08:24:31 1999
- Orig file:
v2.2.7/linux/drivers/net/ethertap.c
- Orig date:
Fri Oct 23 22:01:21 1998
diff -u --recursive --new-file v2.2.7/linux/drivers/net/ethertap.c linux/drivers/net/ethertap.c
@@ -177,11 +177,21 @@
#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)) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)