From 9ca1f77c285387d6bcbe2eba1a888a95231f6569 Mon Sep 17 00:00:00 2001 From: wollman Date: Wed, 24 Jul 1996 19:59:53 +0000 Subject: Fix a bug in ifa_ifwithnet() which caused a page fault in bcmp() when attepmting to add certain types of routes. This problem only manifested itself in the presence of unconfigured point-to-point interfaces. Noticed by: Chuck Cranor --- sys/net/if.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/net') diff --git a/sys/net/if.c b/sys/net/if.c index bfcd1eb..59f568d 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if.c 8.3 (Berkeley) 1/4/94 - * $Id: if.c,v 1.32 1996/06/12 19:23:59 gpalmer Exp $ + * $Id: if.c,v 1.33 1996/07/11 16:32:26 wollman Exp $ */ #include @@ -236,7 +236,8 @@ ifa_ifwithnet(addr) if (ifa->ifa_addr->sa_family != af) next: continue; if (ifp->if_flags & IFF_POINTOPOINT) { - if (equal(addr, ifa->ifa_dstaddr)) + if (ifa->ifa_dstaddr != 0 + && equal(addr, ifa->ifa_dstaddr)) return (ifa); } else { if (ifa->ifa_netmask == 0) -- cgit v1.1