git: 8ea4e92945d3 - main - net: don't panic on ifconfig pfsync0 mtu 9000
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 08 Aug 2026 09:07:23 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=8ea4e92945d312bd5d19714e070f695230037660
commit 8ea4e92945d312bd5d19714e070f695230037660
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-08-07 12:39:59 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-08-08 09:02:34 +0000
net: don't panic on ifconfig pfsync0 mtu 9000
pfsync interfaces do not have ifp->if_inet6 set, so when we update the
MTU for those interfaces we panicked.
Add an explicit check for this. This should be temporary, until pfsync
is no longer a struct ifnet (as we've already done for pflog).
Reviewed by: glebius
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D58701
---
sys/net/route.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sys/net/route.c b/sys/net/route.c
index cbe84ba5fba9..2034c298d273 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -516,7 +516,9 @@ rt_updatemtu(struct ifnet *ifp)
#ifdef INET6
uint32_t in6mtu;
- in6mtu = in6_ifmtu(ifp);
+ /* For IFT_PFSYNC */
+ if (ifp->if_inet6 != NULL)
+ in6mtu = in6_ifmtu(ifp);
#endif
for (u_int j = 0; j < rt_numfibs; j++) {