git: a44c11974c82 - main - loopback: set MTU to IF_MAXMTU
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 16 Oct 2026 21:17:24 UTC
The branch main has been updated by glebius:
URL: https://cgit.FreeBSD.org/src/commit/?id=a44c11974c82a01c767a33332177a39fd65616fe
commit a44c11974c82a01c767a33332177a39fd65616fe
Author: Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2026-10-16 21:08:36 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2026-10-16 21:08:36 +0000
loopback: set MTU to IF_MAXMTU
It was temporarily reduced in af78195e0024 in 1994 to hide some bugs with
signed short overflow. We believe all these bugs were sorted out by
today. :)
Note that earlier ba582a82b0e36 reduced the MTU be rounded to a longword
with a reference "NFS likes it to be rounded". We have had several
refactors of the NFS code since that.
Reviewed by: pouria, zlei, tuexen
Differential Revision: https://reviews.freebsd.org/D59450
---
sys/net/if_loop.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index 647dbe79e229..9231ec6dab85 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -73,14 +73,6 @@
#include <security/mac/mac_framework.h>
-#ifdef TINY_LOMTU
-#define LOMTU (1024+512)
-#elif defined(LARGE_LOMTU)
-#define LOMTU 131072
-#else
-#define LOMTU 16384
-#endif
-
#define LO_CSUM_FEATURES (CSUM_IP | CSUM_IP_TCP | CSUM_IP_UDP | \
CSUM_IP_SCTP)
#define LO_CSUM_FEATURES6 (CSUM_IP6_TCP | CSUM_IP6_UDP | CSUM_IP6_SCTP)
@@ -123,7 +115,7 @@ lo_clone_create(struct if_clone *ifc, char *name, size_t len,
ifp = if_alloc(IFT_LOOP);
if_initname(ifp, loname, ifd->unit);
- ifp->if_mtu = LOMTU;
+ ifp->if_mtu = IF_MAXMTU;
ifp->if_flags = IFF_LOOPBACK | IFF_MULTICAST;
ifp->if_ioctl = loioctl;
ifp->if_output = looutput;