summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2019-06-20 10:15:47 -0400
committerThomas Markwalder <tmark@isc.org>2019-06-20 10:15:47 -0400
commitd033337751e994a6a1bbfb64ade6460e69fed420 (patch)
treec5dceadd95ee7a6fb54dff0313bb3e4bcb672a16
parentda31a3401cf3bc5a6b3be84cd6c96ec3c7a902d1 (diff)
downloadisc-dhcp-d033337751e994a6a1bbfb64ade6460e69fed420.tar.gz
[v4_1_esv] Ignore empty host name option when parsing v4 packets
Merges in rt43786
-rw-r--r--RELNOTES6
-rw-r--r--common/options.c8
2 files changed, 14 insertions, 0 deletions
diff --git a/RELNOTES b/RELNOTES
index 4eadf767..90456604 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -78,6 +78,12 @@ dhcp-users@lists.isc.org.
even valid values to fail as invalid on some environments.
[ISC-Bugs #46535]
+- 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.1-ESV-R15b1
- None
diff --git a/common/options.c b/common/options.c
index cd232284..a136cd5c 100644
--- a/common/options.c
+++ b/common/options.c
@@ -187,6 +187,14 @@ int parse_option_buffer (options, buffer, length, universe)
return 0;
}
+ 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);
+ }
+
/* If the option contains an encapsulation, parse it. If
the parse fails, or the option isn't an encapsulation (by
far the most common case), or the option isn't entirely