UB warning caused by exceeding enum value
Moving from FreeBSD 13 to 14 in Jenkins results in new UBSAN warnings.
I've also been getting these locally using the Linux clang 18 compiler every time I do sanity checks since 2.7.0.
The warnings can be solved by moving to strongly typed enums.
https://jenkins.aws.isc.org/job/kea-dev/job/ut-ubsan/997/
[2024-10-09T17:51:04.373Z] [ RUN ] NameDhcpv4SrvTest.emptyFqdn
[2024-10-09T17:51:04.373Z] option4_client_fqdn.cc:487:20: runtime error: load of value 1936028416, which is not a valid value for type 'Option4ClientFqdn::DomainNameType'
[2024-10-09T17:51:04.373Z] SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior option4_client_fqdn.cc:487:20 in
[2024-10-09T17:51:04.373Z] option4_client_fqdn.cc:160:32: runtime error: load of value 1936028416, which is not a valid value for type 'Option4ClientFqdn::DomainNameType'
[2024-10-09T17:51:04.373Z] SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior option4_client_fqdn.cc:160:32 in
[2024-10-09T17:51:04.373Z] [ OK ] NameDhcpv4SrvTest.emptyFqdn (28 ms)