⬢ DragonFlyBSD Kernel Audit
DF-3370 / fix.diff
← back to finding ↓ download raw
--- a/sys/netinet/ip_output.c	2026-06-29 12:51:19.000000000 +0000
+++ b/sys/netinet/ip_output.c	2026-09-11 14:28:49.641864016 +0000
@@ -709,7 +709,8 @@
 		 * them, there is no way for one to update all its
 		 * routes when the MTU is changed.
 		 */
-		if ((ro->ro_rt->rt_flags & (RTF_UP | RTF_HOST)) &&
+		if (ro->ro_rt != NULL &&
+		    (ro->ro_rt->rt_flags & (RTF_UP | RTF_HOST)) &&
 		    !(ro->ro_rt->rt_rmx.rmx_locks & RTV_MTU) &&
 		    (ro->ro_rt->rt_rmx.rmx_mtu > ifp->if_mtu)) {
 			ro->ro_rt->rt_rmx.rmx_mtu = ifp->if_mtu;