sysinstall's primitive network configuration expects only one value

for each option in the DHCP lease file.  The DHCP lease parsing code
specifically ignores more than the first nameserver, but it didn't
previously deal with the case of more than one router.  This caused
segfaults and a painful death when installing on a network with
multiple routers.

PR:		misc/16003
This commit is contained in:
Murray Stokely 2001-09-06 10:27:28 +00:00
parent 5693049227
commit 53e1e93595

View File

@ -134,6 +134,8 @@ dhcpParseLeases(char *file, char *hostname, char *domain, char *nameserver,
} else if (!strcasecmp("fixed-address", optname)) {
strcpy(ipaddr, optbuf);
} else if (!strcasecmp("routers", optname)) {
if((tptr = (char *)strchr(optbuf, ',')))
*tptr = NULL;
strcpy(gateway, optbuf);
} else if (!strcasecmp("subnet-mask", optname)) {
strcpy(netmask, optbuf);