From d033337751e994a6a1bbfb64ade6460e69fed420 Mon Sep 17 00:00:00 2001 From: Thomas Markwalder Date: Thu, 20 Jun 2019 10:15:47 -0400 Subject: [v4_1_esv] Ignore empty host name option when parsing v4 packets Merges in rt43786 --- RELNOTES | 6 ++++++ common/options.c | 8 ++++++++ 2 files changed, 14 insertions(+) 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 -- cgit v1.2.1