diff options
author | dg <dg@FreeBSD.org> | 1995-02-24 11:47:31 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-02-24 11:47:31 +0000 |
commit | b6118fb1e49c792969e7ade889266a14f7343600 (patch) | |
tree | 58b3e2abf052d70a6a0577f399784c4a1f0c46f5 /sys/net | |
parent | e813881c5a1ec80c9c0c3d89e0880072d2ae1af1 (diff) | |
download | FreeBSD-src-b6118fb1e49c792969e7ade889266a14f7343600.zip FreeBSD-src-b6118fb1e49c792969e7ade889266a14f7343600.tar.gz |
In ifa_ifwithdstaddr() when walking through ifa structs associated with
a point-to-point link, don't attempt a comparison if the pointer to the
destination sockaddr is NULL (i.e. it has not been set/initialized).
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index b4ca79f..e8a11e9 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.11 1994/12/21 22:56:58 wollman Exp $ + * $Id: if.c,v 1.12 1994/12/30 06:46:20 davidg Exp $ */ #include <sys/param.h> @@ -208,7 +208,7 @@ ifa_ifwithdstaddr(addr) for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next) { if (ifa->ifa_addr->sa_family != addr->sa_family) continue; - if (equal(addr, ifa->ifa_dstaddr)) + if (ifa->ifa_dstaddr && equal(addr, ifa->ifa_dstaddr)) return (ifa); } return ((struct ifaddr *)0); |