diff options
author | Thomas Markwalder <tmark@isc.org> | 2024-10-01 17:31:28 +0200 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2024-10-15 19:51:57 +0200 |
commit | e47064a165497941c8b3c2762be2827f39c45ce5 (patch) | |
tree | cdaa5ce0649e56dbc37674b014961ebeb175abe1 /src/lib | |
parent | [#3583] add client_classes to option tables (diff) | |
download | kea-e47064a165497941c8b3c2762be2827f39c45ce5.tar.xz kea-e47064a165497941c8b3c2762be2827f39c45ce5.zip |
[#3583] MySQL CB V4 supports option class tagging
/src/hooks/dhcp/mysql_cb/mysql_cb_dhcp4.cc
/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc
/src/hooks/dhcp/mysql_cb/mysql_cb_impl.h
/src/hooks/dhcp/mysql_cb/mysql_query_macros_dhcp.h
/src/lib/config_backend/constants.h
/src/lib/dhcpsrv/testutils/generic_cb_dhcp4_unittest.cc
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/config_backend/constants.h | 2 | ||||
-rw-r--r-- | src/lib/dhcpsrv/testutils/generic_cb_dhcp4_unittest.cc | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/config_backend/constants.h b/src/lib/config_backend/constants.h index b869a03128..579f13709f 100644 --- a/src/lib/config_backend/constants.h +++ b/src/lib/config_backend/constants.h @@ -82,6 +82,8 @@ constexpr unsigned long DNS_NAME_BUF_LENGTH = 255; constexpr unsigned long ALLOCATOR_TYPE_BUF_LENGTH = 64; +constexpr unsigned long OPTION_CLIENT_CLASSES_BUF_LENGTH = 65536; + //*} } // end of namespace isc::cb diff --git a/src/lib/dhcpsrv/testutils/generic_cb_dhcp4_unittest.cc b/src/lib/dhcpsrv/testutils/generic_cb_dhcp4_unittest.cc index 87d7e67e90..457f84dea5 100644 --- a/src/lib/dhcpsrv/testutils/generic_cb_dhcp4_unittest.cc +++ b/src/lib/dhcpsrv/testutils/generic_cb_dhcp4_unittest.cc @@ -140,10 +140,7 @@ GenericConfigBackendDHCPv4Test::initTestSubnets() { subnet->addPool(pool2); // Add several options to the subnet. - subnet->getCfgOption()->add(test_options_[0]->option_, - test_options_[0]->persistent_, - test_options_[0]->cancelled_, - test_options_[0]->space_name_); + subnet->getCfgOption()->add(*(test_options_[0]), test_options_[0]->space_name_); subnet->getCfgOption()->add(test_options_[1]->option_, test_options_[1]->persistent_, @@ -337,6 +334,8 @@ GenericConfigBackendDHCPv4Test::initTestOptions() { true, false, false, "my-boot-file"); desc.space_name_ = DHCP4_OPTION_SPACE; desc.setContext(user_context); + desc.addClientClass("class1"); + desc.addClientClass("class2"); test_options_.push_back(OptionDescriptorPtr(new OptionDescriptor(desc))); desc = createOption<OptionUint8>(Option::V4, DHO_DEFAULT_IP_TTL, @@ -368,6 +367,8 @@ GenericConfigBackendDHCPv4Test::initTestOptions() { true, false, false, "my-boot-file-2"); desc.space_name_ = DHCP4_OPTION_SPACE; desc.setContext(user_context); + desc.addClientClass("class3"); + desc.addClientClass("class4"); test_options_.push_back(OptionDescriptorPtr(new OptionDescriptor(desc))); desc = createOption<OptionString>(Option::V4, DHO_BOOT_FILE_NAME, |