]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#652] Handle interface-id in config backend
authorMarcin Siodelski <marcin@isc.org>
Wed, 9 Dec 2020 11:09:20 +0000 (12:09 +0100)
committerMarcin Siodelski <marcin@isc.org>
Wed, 9 Dec 2020 15:23:37 +0000 (16:23 +0100)
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.

src/hooks/dhcp/mysql_cb/mysql_cb_dhcp6.cc

index e3672e814de44d68385972d7a1260c6c2bad327b..ebc02ed79568649641d2430764ddc88d4a77e92b 100644 (file)
@@ -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()) {