From: Marcin Siodelski Date: Wed, 9 Dec 2020 11:09:20 +0000 (+0100) Subject: [#652] Handle interface-id in config backend X-Git-Tag: Kea-1.9.3~110 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=868813a0e0eec3b69e48b70ff6eadae51110eaa6;p=thirdparty%2Fkea.git [#652] Handle interface-id in config backend The interface-id parameter is now properly set at distinct inheritance levels. For example, if it is specified at shared network level but not at the subnet level, the value stored in the db for the subnet is NULL and it is non-null at shared network level. --- diff --git a/src/hooks/dhcp/mysql_cb/mysql_cb_dhcp6.cc b/src/hooks/dhcp/mysql_cb/mysql_cb_dhcp6.cc index e3672e814d..ebc02ed795 100644 --- a/src/hooks/dhcp/mysql_cb/mysql_cb_dhcp6.cc +++ b/src/hooks/dhcp/mysql_cb/mysql_cb_dhcp6.cc @@ -1269,7 +1269,7 @@ public: // Create the binding holding interface_id. MySqlBindingPtr interface_id_binding = MySqlBinding::createNull(); - auto opt_iface_id = subnet->getInterfaceId(); + auto opt_iface_id = subnet->getInterfaceId(Network::Inheritance::NONE); if (opt_iface_id) { auto iface_id_data = opt_iface_id->getData(); if (!iface_id_data.empty()) { @@ -1964,7 +1964,7 @@ public: // Create the binding holding interface_id. MySqlBindingPtr interface_id_binding = MySqlBinding::createNull(); - auto opt_iface_id = shared_network->getInterfaceId(); + auto opt_iface_id = shared_network->getInterfaceId(Network::Inheritance::NONE); if (opt_iface_id) { auto iface_id_data = opt_iface_id->getData(); if (!iface_id_data.empty()) {