From b6e8a4580ec5b48f343984a26acfe15b0dc4d30f Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Mon, 9 Nov 2026 18:11:18 -0300 Subject: [PATCH] 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> --- perl-xCAT/xCAT/DHCP/BootPolicy.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/perl-xCAT/xCAT/DHCP/BootPolicy.pm b/perl-xCAT/xCAT/DHCP/BootPolicy.pm index 9465d40acc..ed5c1549af 100644 --- a/perl-xCAT/xCAT/DHCP/BootPolicy.pm +++ b/perl-xCAT/xCAT/DHCP/BootPolicy.pm @@ -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; }