Re: [PATCH] 2.[45] eexpress.c skb_padto fixes broke pppoe

Shane Shrybman (shrybman@sympatico.ca)
22 Jun 2003 10:20:00 -0400


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-24360-1056291662-0001-2
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

Hi,

On Sat, 2003-06-21 at 08:46, Alan Cox wrote:
[..SNIP..]
>
> Cleaner is to set buf->len = ETH_ZLEN for the padto path IMHO, that
> keeps the old horrible length compute stuff dead
>

Attached is a better patch that also removes a duplicate comment. I have
tested it on 2.4 but it applies to 2.5 as well (with offset).

Regards,

Shane

--=_courier-24360-1056291662-0001-2
Content-Type: text/x-diff; name="eexpress_skb_padto_fix3.diff"; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=eexpress_skb_padto_fix3.diff

--- linux-2.4.21aarc8A/drivers/net/eexpress.c.broken Fri Jun 13 10:51:34 2003
+++ linux-2.4.21aarc8A/drivers/net/eexpress.c Sat Jun 21 18:50:03 2003
@@ -654,7 +654,7 @@
buf = skb_padto(buf, ETH_ZLEN);
if(buf == NULL)
return 0;
- length = buf->len;
+ length = ETH_ZLEN;
}

disable_irq(dev->irq);
@@ -682,13 +682,6 @@
enable_irq(dev->irq);
return 0;
}
-
-/*
- * Handle an EtherExpress interrupt
- * If we've finished initializing, start the RU and CU up.
- * If we've already started, reap tx buffers, handle any received packets,
- * check to make sure we've not become wedged.
- */

/*
* Handle an EtherExpress interrupt

--=_courier-24360-1056291662-0001-2--