diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 7f8703ff5c09..572b7919b146 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1268,7 +1268,8 @@ ip_forward(struct mbuf *m, int srcrt) } #endif - if (!srcrt && (ia = ip_rtaddr(ip->ip_dst)) == NULL) { + ia = ip_rtaddr(ip->ip_dst); + if (!srcrt && ia == NULL) { icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, 0); return; }