Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/route correct prefixlen handling for IPv4.
details: https://anonhg.NetBSD.org/src/rev/2c7f9565dcb7
branches: trunk
changeset: 538334:2c7f9565dcb7
user: itojun <itojun%NetBSD.org@localhost>
date: Fri Oct 18 00:21:23 2002 +0000
description:
correct prefixlen handling for IPv4.
diffstat:
sbin/route/route.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
diffs (42 lines):
diff -r 77ab9d43d222 -r 2c7f9565dcb7 sbin/route/route.c
--- a/sbin/route/route.c Fri Oct 18 00:16:25 2002 +0000
+++ b/sbin/route/route.c Fri Oct 18 00:21:23 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.60 2002/10/18 00:16:25 itojun Exp $ */
+/* $NetBSD: route.c,v 1.61 2002/10/18 00:21:23 itojun Exp $ */
/*
* Copyright (c) 1983, 1989, 1991, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: route.c,v 1.60 2002/10/18 00:16:25 itojun Exp $");
+__RCSID("$NetBSD: route.c,v 1.61 2002/10/18 00:21:23 itojun Exp $");
#endif
#endif /* not lint */
@@ -936,13 +936,7 @@
case K_PREFIXLEN:
if (!--argc)
usage(1+*argv);
- if (prefixlen(*++argv) == 128) {
- forcenet = 0;
- ishost = 1;
- } else {
- forcenet = 1;
- ishost = 0;
- }
+ ishost = prefixlen(*++argv);
break;
case K_MTU:
case K_HOPCOUNT:
@@ -1371,7 +1365,7 @@
break;
#endif
}
- return(len);
+ return (len == max);
}
#ifndef SMALL
Home |
Main Index |
Thread Index |
Old Index