Commit 8269561d authored by David Hankins's avatar David Hankins
Browse files

- A bug was fixed where the length of a hostname was miscalculated, so that

  hosts were given odd-looking domain names ("foo.bar.ba.example.com").
  [ISC-Bugs #17732]
parent 27905a7d
...@@ -61,6 +61,9 @@ work on other platforms. Please report any problems and suggested fixes to ...@@ -61,6 +61,9 @@ work on other platforms. Please report any problems and suggested fixes to
fsync()'s, it can be configured by the max-ack-delay configuration fsync()'s, it can be configured by the max-ack-delay configuration
parameter. parameter.
- A bug was fixed where the length of a hostname was miscalculated, so that
hosts were given odd-looking domain names ("foo.bar.ba.example.com").
Changes since 4.0.0 (new features) Changes since 4.0.0 (new features)
- Added DHCPv6 rapid commit support. - Added DHCPv6 rapid commit support.
......
...@@ -3363,14 +3363,16 @@ fqdn6_universe_decode(struct option_state *options, ...@@ -3363,14 +3363,16 @@ fqdn6_universe_decode(struct option_state *options,
/* Save the domain name. */ /* Save the domain name. */
if (len > 0) { if (len > 0) {
unsigned char *fqdn_start = bp->data + 3;
if (!save_option_buffer(&fqdn_universe, options, bp, if (!save_option_buffer(&fqdn_universe, options, bp,
bp->data + 3, len, FQDN_FQDN, 1)) fqdn_start, len, FQDN_FQDN, 1))
goto error; goto error;
first_dot = (unsigned char *)strchr((char *)bp->data + 3, '.'); first_dot = (unsigned char *)strchr((char *)fqdn_start, '.');
if (first_dot != NULL) { if (first_dot != NULL) {
hlen = first_dot - bp->data + 3; hlen = first_dot - fqdn_start;
dlen = len - hlen; dlen = len - hlen;
} else { } else {
hlen = len; hlen = len;
...@@ -3378,14 +3380,14 @@ fqdn6_universe_decode(struct option_state *options, ...@@ -3378,14 +3380,14 @@ fqdn6_universe_decode(struct option_state *options,
} }
if (!save_option_buffer(&fqdn_universe, options, bp, if (!save_option_buffer(&fqdn_universe, options, bp,
bp->data + 3, len, FQDN_FQDN, 1) || fqdn_start, len, FQDN_FQDN, 1) ||
((hlen > 0) && ((hlen > 0) &&
!save_option_buffer(&fqdn_universe, options, bp, !save_option_buffer(&fqdn_universe, options, bp,
bp->data + 3, hlen, fqdn_start, hlen,
FQDN_HOSTNAME, 0)) || FQDN_HOSTNAME, 0)) ||
((dlen > 0) && ((dlen > 0) &&
!save_option_buffer(&fqdn_universe, options, bp, first_dot, !save_option_buffer(&fqdn_universe, options, bp,
dlen, FQDN_DOMAINNAME, 0))) first_dot, dlen, FQDN_DOMAINNAME, 0)))
goto error; goto error;
} }
......
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