mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-28 13:22:16 +00:00
fix(xcat-core): a DHCPv6 boot class answers clients of every network
A discovery client on the second IPv6 network received the boot URL of the first network. kea_client_classes6 builds the boot classes of one network. Each URL carries the address of the management node on that network. The classes go to the global client-classes of Dhcp6 without the additional-only flag, so Kea evaluates their tests for the clients of every subnet. The additional-class list of the subnet does not restrict them. kea_client_classes6 now sets additional_only on every class it returns. The Kea backend renders it as only-in-additional-list, or as only-if-required before Kea 2.7.4, the same flag the DHCPv4 network classes use. dhcp6_boot_client_classes.t asserts the rendered flag. It fails without this change. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
@@ -164,6 +164,10 @@ sub kea_client_classes6 {
|
||||
},
|
||||
);
|
||||
|
||||
# The classes are global in Dhcp6. Without this flag Kea evaluates them for the clients of
|
||||
# every subnet, and the subnet list only adds them a second time.
|
||||
$_->{additional_only} = 1 foreach @classes;
|
||||
|
||||
return \@classes;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user