Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Subject | [PATCH] 2.[45] eexpress.c skb_padto fixes broke pppoe | From | Shane Shrybman <> | Date | 18 Jun 2003 18:28:46 -0400 |
| |
Hi,
I posted this to linux-net and didn't get a reply so I am posting it here. Please cc any replies.
The attached patch fixes the breakage caused by the recent skb_padto security fixes. It applies to both 2.4.21 and 2.5.72 (with a little fuzz). I have tested it on 2.4.21 but not on 2.5.
If it looks ok can it be included in 2.4 and 2.5?
Regards,
Shane --- linux-2.4.21aarc8A/drivers/net/eexpress.c.broken Fri Jun 13 10:51:34 2003 +++ linux-2.4.21aarc8A/drivers/net/eexpress.c Mon Jun 16 22:05:55 2003 @@ -640,7 +640,9 @@ static int eexp_xmit(struct sk_buff *buf, struct net_device *dev) { struct net_local *lp = (struct net_local *)dev->priv; - short length = buf->len; + unsigned short length = (ETH_ZLEN < buf->len) ? buf->len : + ETH_ZLEN; + #ifdef CONFIG_SMP unsigned long flags; #endif @@ -654,7 +656,6 @@ buf = skb_padto(buf, ETH_ZLEN); if(buf == NULL) return 0; - length = buf->len; } disable_irq(dev->irq); | ![\](/images/icornerr.gif) |