From e2fcc3b9e1e9415b58471a957358e1f958b392d4 Mon Sep 17 00:00:00 2001 From: Jun-ichiro itojun Hagino Date: Fri, 18 Oct 2002 00:27:42 +0000 Subject: correct prefixlen handling (-prefixlen 32 will make it a host route) --- sbin/route/route.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sbin') 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 -- cgit v1.2.3