summaryrefslogtreecommitdiffstats
path: root/sbin/routed
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1998-04-19 17:53:16 +0000
committerphk <phk@FreeBSD.org>1998-04-19 17:53:16 +0000
commitc85e9550d38f7dce77e104b455f522dfd7a8e665 (patch)
treed99dbaa9e67150e951ad87a5abbc2cf77aa28046 /sbin/routed
parent100f9b99a08f89c8c12aea2b07546fb6326175fb (diff)
downloadFreeBSD-src-c85e9550d38f7dce77e104b455f522dfd7a8e665.zip
FreeBSD-src-c85e9550d38f7dce77e104b455f522dfd7a8e665.tar.gz
Problem whith "subnet=" statement in /etc/gateways.
routed discards the first character of the network address. Example: "subnet=10.0.0.0/24,1" The network address is interpreted as 0.0.0.0/24,1. PR: 4825 Reviewed by: phk Submitted by: Mike E. Matsnev <mike@azog.cs.msu.su>
Diffstat (limited to 'sbin/routed')
-rw-r--r--sbin/routed/parms.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/routed/parms.c b/sbin/routed/parms.c
index 87ca4a8..d6cc1a4 100644
--- a/sbin/routed/parms.c
+++ b/sbin/routed/parms.c
@@ -36,7 +36,7 @@ static char sccsid[] = "@(#)if.c 8.1 (Berkeley) 6/5/93";
#elif defined(__NetBSD__)
static char rcsid[] = "$NetBSD$";
#endif
-#ident "$Revision: 1.12 $"
+#ident "$Revision: 1.1.1.3 $"
#include "defs.h"
#include "pathnames.h"
@@ -557,7 +557,7 @@ parse_parms(char *line,
/* "subnet=x.y.z.u/mask,metric" must be alone on the line */
if (!strncasecmp(line, "subnet=", sizeof("subnet=")-1)
- && *(val = &line[sizeof("subnet=")]) != '\0') {
+ && *(val = &line[sizeof("subnet=")-1]) != '\0') {
intnetp = (struct intnet*)malloc(sizeof(*intnetp));
intnetp->intnet_metric = 1;
if ((p = strrchr(val,','))) {
OpenPOWER on IntegriCloud