From: tholo Date: Thu, 14 Mar 1996 08:35:35 +0000 (+0000) Subject: From Lite2; only try to match a destination address on a point-to-point X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7ff321ece6d401a97b6615fb380715e29748ea34;p=openbsd From Lite2; only try to match a destination address on a point-to-point interface if the destination address has been set --- diff --git a/sys/net/if.c b/sys/net/if.c index a13a6307d57..23d2d3c6b71 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.5 1996/03/05 02:29:37 dm Exp $ */ +/* $OpenBSD: if.c,v 1.6 1996/03/14 08:35:35 tholo Exp $ */ /* $NetBSD: if.c,v 1.24 1996/02/13 22:00:09 christos Exp $ */ /* @@ -180,7 +180,8 @@ ifa_ifwithdstaddr(addr) for (ifp = ifnet.tqh_first; ifp != 0; ifp = ifp->if_list.tqe_next) if (ifp->if_flags & IFF_POINTOPOINT) for (ifa = ifp->if_addrlist.tqh_first; ifa != 0; ifa = ifa->ifa_list.tqe_next) { - if (ifa->ifa_addr->sa_family != addr->sa_family) + if (ifa->ifa_addr->sa_family != addr->sa_family || + ifa->ifa_dstaddr == NULL) continue; if (equal(addr, ifa->ifa_dstaddr)) return (ifa);