summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-06-05 22:14:16 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-06-05 22:14:16 +0000
commit87ce65fcbcf66e2ebc1d808ec9a77c9bd400fe87 (patch)
tree64d0577687fe9077e4d4fe4d743443bfd55a1a55 /sbin
parent4eecec7b2a7d23e31901e0ab42908cc5b88cf01a (diff)
more correction to RTF_HOST handling.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/route/route.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c
index 111ccd140f7..30a9a4c262b 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.47 2002/06/04 22:22:37 itojun Exp $ */
+/* $OpenBSD: route.c,v 1.48 2002/06/05 22:14:15 itojun Exp $ */
/* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)route.c 8.3 (Berkeley) 3/19/94";
#else
-static char rcsid[] = "$OpenBSD: route.c,v 1.47 2002/06/04 22:22:37 itojun Exp $";
+static char rcsid[] = "$OpenBSD: route.c,v 1.48 2002/06/05 22:14:15 itojun Exp $";
#endif
#endif /* not lint */
@@ -917,12 +917,13 @@ inet6_makenetandmask(sin6)
plen = "64";
}
- if (plen) {
+ if (!plen || strcmp(plen, "128") == 0)
+ return 1;
+ else {
rtm_addrs |= RTA_NETMASK;
- return prefixlen(plen);
+ (void)prefixlen(plen);
+ return 0;
}
-
- return -1;
}
#endif
@@ -1020,8 +1021,7 @@ getaddr(which, s, hpp)
#endif
freeaddrinfo(res);
if (which == RTA_DST)
- if (inet6_makenetandmask(&su->sin6) == 128)
- return (1);
+ return inet6_makenetandmask(&su->sin6);
return (0);
}
#endif