diff options
author | murray <murray@FreeBSD.org> | 2001-09-06 10:27:28 +0000 |
---|---|---|
committer | murray <murray@FreeBSD.org> | 2001-09-06 10:27:28 +0000 |
commit | e797b5bf93846b2b5f21bd87baba151d2214c82c (patch) | |
tree | c17b9d755297e4408a102bd6cf86fb0c079bc2de /usr.sbin/sysinstall/dhcp.c | |
parent | 9ca10a22d8c34facfa06b5293479e8545864b079 (diff) | |
download | FreeBSD-src-e797b5bf93846b2b5f21bd87baba151d2214c82c.zip FreeBSD-src-e797b5bf93846b2b5f21bd87baba151d2214c82c.tar.gz |
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
Diffstat (limited to 'usr.sbin/sysinstall/dhcp.c')
-rw-r--r-- | usr.sbin/sysinstall/dhcp.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |