2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 06:15:55 +00:00

- 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.  [ISC-Bugs #17613]
This commit is contained in:
David Hankins
2009-07-16 18:02:28 +00:00
parent a1308b646d
commit 86f1d4b723
4 changed files with 41 additions and 1 deletions

View File

@@ -1757,9 +1757,18 @@ int parse_option_code_definition (cfile, option)
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);