one of either of those). This resolves a bug where dual stack clients
would not be able to regain their names after either expiration event.
+- Versions 3.0.x syntax with multiple name->code option definitions is now
+ supported. Note that, similarly to 3.0.x, for by-code lookups only the
+ last option definition is used.
+
Changes since 4.1.0a1
- Corrected list of failover state values in dhcpd man page.
return;
}
+ known = 0;
status = parse_option_name(cfile, 1, &known, &option);
if (status != ISC_R_SUCCESS || option == NULL)
return;
option_dereference(&option, MDL);
return;
}
+
+ /*
+ * If the option was known, remove it from the code and name
+ * hash tables before redefining it.
+ */
+ if (known) {
+ option_name_hash_delete(option->universe->name_hash,
+ option->name, 0, MDL);
+ option_code_hash_delete(option->universe->code_hash,
+ &option->code, 0, MDL);
+ }
+
parse_option_code_definition(cfile, option);
option_dereference(&option, MDL);
return;
oldopt = NULL;
option_code_hash_lookup(&oldopt, option->universe->code_hash,
&option->code, 0, MDL);
- if (oldopt) {
+ if (oldopt != NULL) {
+ /*
+ * XXX: This illegalizes a configuration syntax that was
+ * valid in 3.0.x, where multiple name->code mappings are
+ * given, but only one code->name mapping survives. It is
+ * unclear what can or should be done at this point, but it
+ * seems best to retain 3.0.x behaviour for upgrades to go
+ * smoothly.
+ *
option_name_hash_delete(option->universe->name_hash,
oldopt->name, 0, MDL);
+ */
option_code_hash_delete(option->universe->code_hash,
&oldopt->code, 0, MDL);
break;
}
next_token (&val, (unsigned *)0, cfile);
+
+ /*
+ * If the option was known, remove it from the
+ * code and name hashes before redefining it.
+ */
+ if (known) {
+ option_name_hash_delete(
+ option->universe->name_hash,
+ option->name, 0, MDL);
+ option_code_hash_delete(
+ option->universe->code_hash,
+ &option->code, 0, MDL);
+ }
+
parse_option_code_definition(cfile, option);
option_dereference(&option, MDL);
return declaration;