[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] [PATCH] Fix wrong size of outgoing packets in the FEC driver



Hello.

As promised, here is the patch for the FEC driver.
It fixes ping with packet size > 1500 and the NFS server in UDP mode.

Alan, please commit!

fec.patch
Fix wrong size of fragmented outgoing packets. Contributed by Vincent Riviere.

--
Vincent Rivière
diff -aurN -x CVS freemint.orig/sys/sockets/xif/fec/fec.c freemint/sys/sockets/xif/fec/fec.c
--- freemint.orig/sys/sockets/xif/fec/fec.c	2012-10-25 20:07:10.765625000 +0200
+++ freemint/sys/sockets/xif/fec/fec.c	2014-09-04 00:22:23.828125000 +0200
@@ -1280,7 +1280,7 @@
         goto out_err0;
     }
     /* packet is resized, recalculate len: */
-    len = ((unsigned long)buf->dend) - ((unsigned long)buf->dstart);
+    len = ((unsigned long)nbuf->dend) - ((unsigned long)nbuf->dstart);
 
     /* FEC needs at least ETH_MIN_FRM: */
     lenpad = MAX(len, ETH_MIN_FRM );