diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2005-12-10 03:46:14 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2005-12-10 03:46:14 +0000 |
commit | 82dbbc4120de9c553521586ee901db0cac50ff28 (patch) | |
tree | 5c60003961e7de1ea0732caac36df18610d68d83 | |
parent | 33ffa5853a4b753c70cc82e2204bd47efef44bac (diff) | |
download | src-82dbbc4120de9c553521586ee901db0cac50ff28.tar.gz src-82dbbc4120de9c553521586ee901db0cac50ff28.zip |
When we get a bogus hostname in an option, drop the option rather than
refusing the lease. This allow obtaining leases on misadministered
networks that use host names with underscores in them.
MFC After: 3 days
Notes
Notes:
svn path=/head/; revision=153287
-rw-r--r-- | sbin/dhclient/dhclient.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 36a64788188d..2c722fe3b6f8 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -2252,6 +2252,8 @@ check_option(struct client_lease *l, int option) if (!res_hnok(sbuf)) { warning("Bogus Host Name option %d: %s (%s)", option, sbuf, opbuf); + l->options[option].len = 0; + free(l->options[option].data); return (0); } return (1); @@ -2260,7 +2262,8 @@ check_option(struct client_lease *l, int option) if (!check_search(sbuf)) { warning("Bogus domain search list %d: %s (%s)", option, sbuf, opbuf); - return (0); + l->options[option].len = 0; + free(l->options[option].data); } } return (1); |