2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-22 18:07:25 +00:00

[master] Ignore empty host name option when parsing v4 packets

Merges in rt43786
This commit is contained in:
Thomas Markwalder 2017-11-27 13:50:02 -05:00
parent 83f1dd956c
commit 2d542e1ecf
2 changed files with 16 additions and 0 deletions

View File

@ -1168,6 +1168,12 @@ dhcp-users@lists.isc.org.
with implicit function declarations errors for POST() and INSIST(). with implicit function declarations errors for POST() and INSIST().
[ISC-bugs #46332] [ISC-bugs #46332]
- Added to code ignore empty IPv4 host name option (code 12). While RFC 2132
states the option cannot be empty, some clients are apparently capable of
sending it. Prior to this the server was attempting to use it and store it
in the lease file causing issues with DDNS and so forth.
[ISC-bugs #43786]
Changes since 4.2.0 (new features) Changes since 4.2.0 (new features)
- If a client renews before 'dhcp-cache-threshold' percent of its lease - If a client renews before 'dhcp-cache-threshold' percent of its lease

View File

@ -202,6 +202,16 @@ int parse_option_buffer (options, buffer, length, universe)
universe, NULL); universe, NULL);
} }
if (universe == &dhcp_universe && code == DHO_HOST_NAME &&
len == 0) {
/* non-compliant clients can send it
* we'll just drop it and go on */
log_debug ("Ignoring empty DHO_HOST_NAME option");
option_dereference(&option, MDL);
offset += len;
continue;
}
op = lookup_option(universe, options, code); op = lookup_option(universe, options, code);
if (op == NULL) { if (op == NULL) {
/* If we don't have an option create one */ /* If we don't have an option create one */