|
Subject: |
[PATCH] fix up bogus length check in output.c |
|
From: |
Lennert Buytenhek <buytenh,AT,gnu,DOT,org> |
|
Date: |
Thu, 1 Nov 2001 22:11:05 +0100 |
Hi,
ethernet packets that are smaller than (IIRC) 60 bytes are padded out to
60 bytes, to enforce an ethernet 'minimum frame length' restriction. This
fact causes the below-patched check in cipe/output.c to be bogus. We
can only conclude that there is a 'packet length problem' is the ethernet
packet is bigger than 60 bytes.
(come to think of it, the check could be made more precise by writing smth
like "if ((length < 60 && ilen > 60) || (length >= 60 && length!=ilen))" )
cheers,
Lennert
--- cipe-1.5.2/cipe/output.c.orig Thu Nov 1 21:41:37 2001
+++ cipe-1.5.2/cipe/output.c Thu Nov 1 21:42:37 2001
@@ -127,7 +127,7 @@
+ETH_HLEN
#endif
;
- if (length!=ilen) {
+ if (length >= 60 && length!=ilen) {
printk(KERN_ERR "%s: cipe_xmit packet length problem %d/%d\n",
dev->name, length, ilen);
goto tx_error_out;