diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 49e8b4289d1..4140edac546 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -941,7 +941,8 @@ ip_forward(struct mbuf *m, int srcrt) if (ro.ro_rt != NULL) { ia = ifatoia(ro.ro_rt->rt_ifa); ifa_ref(&ia->ia_ifa); - } + } else + ia = NULL; #ifndef IPSEC /* * 'ia' may be NULL if there is no route for this destination.