mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
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>
This commit is contained in:
parent
f934279d20
commit
0a61a2c2ce
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=35306
|
@ -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,','))) {
|
||||
|
|
Loading…
Reference in a new issue