Commit 2e34ac14 authored by Simon Kelley's avatar Simon Kelley

Handle DHCP FQDN option with all flags zero and --dhcp-client-update

parent bc54ae39
version 2.64
Handle DHCP FQDN options with all flag bits zero and
--dhcp-client-update set. Thanks to Bernd Krumbroeck for
spotting the problem.
version 2.63 version 2.63
Do duplicate dhcp-host address check in --test mode. Do duplicate dhcp-host address check in --test mode.
......
...@@ -510,7 +510,8 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index, ...@@ -510,7 +510,8 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
char *pq = daemon->dhcp_buff; char *pq = daemon->dhcp_buff;
unsigned char *pp, *op = option_ptr(opt, 0); unsigned char *pp, *op = option_ptr(opt, 0);
fqdn_flags = *op; /* Set an MBZ bit to indicate receipt of FQDN option - cleared later */
fqdn_flags = *op | 0x10;
len -= 3; len -= 3;
op += 3; op += 3;
pp = op; pp = op;
...@@ -2261,7 +2262,7 @@ static void do_options(struct dhcp_context *context, ...@@ -2261,7 +2262,7 @@ static void do_options(struct dhcp_context *context,
if ((p = free_space(mess, end, OPTION_CLIENT_FQDN, len))) if ((p = free_space(mess, end, OPTION_CLIENT_FQDN, len)))
{ {
*(p++) = fqdn_flags; *(p++) = fqdn_flags & 0x0f; /* MBZ bits to zero */
*(p++) = 255; *(p++) = 255;
*(p++) = 255; *(p++) = 255;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment