summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2017-11-27 13:50:02 -0500
committerThomas Markwalder <tmark@isc.org>2017-11-27 13:50:02 -0500
commit2d542e1ecfaddb0bcf7cee3ff37b76854b9cea14 (patch)
tree45bf030c36b37da3d67d1ca81770db22b75b18e9
parent83f1dd956ce7cc9ff3f136610824d358a54e7840 (diff)
downloadisc-dhcp-2d542e1ecfaddb0bcf7cee3ff37b76854b9cea14.tar.gz
[master] Ignore empty host name option when parsing v4 packets
Merges in rt43786
-rw-r--r--RELNOTES6
-rw-r--r--common/options.c10
2 files changed, 16 insertions, 0 deletions
diff --git a/RELNOTES b/RELNOTES
index 744c032c..77c0abb7 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -1168,6 +1168,12 @@ dhcp-users@lists.isc.org.
with implicit function declarations errors for POST() and INSIST().
[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)
- If a client renews before 'dhcp-cache-threshold' percent of its lease
diff --git a/common/options.c b/common/options.c
index 78f85f79..ae5b2844 100644
--- a/common/options.c
+++ b/common/options.c
@@ -202,6 +202,16 @@ int parse_option_buffer (options, buffer, length, universe)
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);
if (op == NULL) {
/* If we don't have an option create one */