From e797b5bf93846b2b5f21bd87baba151d2214c82c Mon Sep 17 00:00:00 2001 From: murray Date: Thu, 6 Sep 2001 10:27:28 +0000 Subject: 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 --- usr.sbin/sysinstall/dhcp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'usr.sbin/sysinstall/dhcp.c') diff --git a/usr.sbin/sysinstall/dhcp.c b/usr.sbin/sysinstall/dhcp.c index 22eeeeb..a74a72b 100644 --- a/usr.sbin/sysinstall/dhcp.c +++ b/usr.sbin/sysinstall/dhcp.c @@ -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); -- cgit v1.1