summaryrefslogtreecommitdiff
path: root/sbin/route
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-10-18 00:27:42 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-10-18 00:27:42 +0000
commite2fcc3b9e1e9415b58471a957358e1f958b392d4 (patch)
tree13c510853331f10b520e838aa7e19f1bb80c163e /sbin/route
parente01395031c8677e35d109e541c2674c4648b76b0 (diff)
correct prefixlen handling (-prefixlen 32 will make it a host route)
Diffstat (limited to 'sbin/route')
-rw-r--r--sbin/route/route.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c
index eedaa2dd383..1f0ca5a9141 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.51 2002/10/17 20:38:03 jason Exp $ */
+/* $OpenBSD: route.c,v 1.52 2002/10/18 00:27:41 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.51 2002/10/17 20:38:03 jason Exp $";
+static char rcsid[] = "$OpenBSD: route.c,v 1.52 2002/10/18 00:27:41 itojun Exp $";
#endif
#endif /* not lint */
@@ -737,7 +737,7 @@ newroute(argc, argv)
case K_PREFIXLEN:
if (!--argc)
usage(1+*argv);
- prefixlen(*++argv);
+ ishost = prefixlen(*++argv);
break;
case K_MTU:
case K_HOPCOUNT:
@@ -1182,7 +1182,7 @@ prefixlen(s)
break;
#endif
}
- return(len);
+ return (len == max);
}
int