From 7ff321ece6d401a97b6615fb380715e29748ea34 Mon Sep 17 00:00:00 2001 From: tholo Date: Thu, 14 Mar 1996 08:35:35 +0000 Subject: [PATCH] From Lite2; only try to match a destination address on a point-to-point interface if the destination address has been set --- sys/net/if.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 2.20.1