diff options
author | wollman <wollman@FreeBSD.org> | 1996-07-24 19:59:53 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1996-07-24 19:59:53 +0000 |
commit | 9ca1f77c285387d6bcbe2eba1a888a95231f6569 (patch) | |
tree | 4ababe432d77532cdb62adca9cdda04d55b7106e /sys | |
parent | 730d9ea60bbd736aa6e38d5414dbd231e32a2605 (diff) | |
download | FreeBSD-src-9ca1f77c285387d6bcbe2eba1a888a95231f6569.zip FreeBSD-src-9ca1f77c285387d6bcbe2eba1a888a95231f6569.tar.gz |
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 <chuck@maria.wustl.edu>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 <sys/param.h> @@ -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) |