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

This commit is contained in:
Simon Kelley
2012-08-29 14:15:25 +01:00
parent bc54ae392b
commit 2e34ac1403
2 changed files with 9 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
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.

View File

@@ -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,
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;