diff --git a/sys/net/if.c b/sys/net/if.c index cb1686117d2..da323cc19a3 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1728,7 +1728,7 @@ ifaof_ifpforaddr(struct sockaddr *addr, struct ifnet *ifp) u_int af = addr->sa_family; if (af >= AF_MAX) - return (0); + return (NULL); IF_ADDR_LOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != af)