summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-06-28 05:31:03 +0000
committerdg <dg@FreeBSD.org>1995-06-28 05:31:03 +0000
commitb8d2a7b0229e9328b0b52cbd38d1517c31da02c2 (patch)
tree1346edb0bffb4b0eba3199b472c532842417f3ed /sys/net
parent2bc3a773d63a6a1193ae7a6c8f5b5a9379ae87b5 (diff)
downloadFreeBSD-src-b8d2a7b0229e9328b0b52cbd38d1517c31da02c2.zip
FreeBSD-src-b8d2a7b0229e9328b0b52cbd38d1517c31da02c2.tar.gz
Don't skip point-to-point interfaces if the netmask==0 (the netmask
should be completely ignored for point-to-point interfaces). For point-to-point interfaces, route based on the destination address, not the local address. Submitted by: Peter Wemm
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index a9085d5..65ef003 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.15 1995/05/30 08:07:58 rgrimes Exp $
+ * $Id: if.c,v 1.16 1995/06/15 00:19:56 davidg Exp $
*/
#include <sys/param.h>
@@ -237,12 +237,14 @@ ifa_ifwithnet(addr)
for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next) {
register char *cp, *cp2, *cp3;
- if (ifa->ifa_addr->sa_family != af || ifa->ifa_netmask == 0)
+ if (ifa->ifa_addr->sa_family != af)
next: continue;
if (ifp->if_flags & IFF_POINTOPOINT) {
- if (equal(addr, ifa->ifa_addr))
+ if (equal(addr, ifa->ifa_dstaddr))
return (ifa);
} else {
+ if (ifa->ifa_netmask == 0)
+ continue;
cp = addr_data;
cp2 = ifa->ifa_addr->sa_data;
cp3 = ifa->ifa_netmask->sa_data;
OpenPOWER on IntegriCloud