reversing the priority of allocated resources in client classes would allow template-spawned inheritance
The current behavior for client classes is that any resource (lease times, option data, v4 option definitions, v4 fields) defined in a client class is taken from the first matching class. In the following example (don't worry about its uselessness, it's only there to prove a point), the valid lifetime of 100 is always given to clients.
{
"Dhcp6": {
"client-classes": [
{
"name": "foo",
"test": "0 == 0",
"valid-lifetime": 100
},
{
"name": "bar",
"test": "0 == 0",
"valid-lifetime": 200
}
]
}
}
Since template classes always need to be defined first relative to their spawned class, that means that template classes always have priority over spawned classes. If a user wanted to have a value overwritten in the spawned class, they cannot do it. Having values overwritten for a more specific set of clients is a legitimate reason. Furthermore, it matches the inheritance priority in other parts of the configuration, see the global - shared network - subnet
relationship. To exemplify, in the following configuration, nobody would ever get valid lifetime 200.
{
"Dhcp6": {
"client-classes": [
{
"name": "oui-vendor",
"template-test": "hexstring(substring(option[1].hex, 4, 3), ':')",
"valid-lifetime": 100
},
{
"name": "SPAWN_oui-vendor_01:02:03",
"valid-lifetime": 200
}
]
}
}