]> git.ipfire.org Git - network.git/commitdiff
ports: Store the parent name
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 8 Jun 2023 15:48:20 +0000 (15:48 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 8 Jun 2023 15:48:20 +0000 (15:48 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/networkd/port-vlan.c

index 8f5372eb85212d97764c6d3414f3a8a52889c6ac..45abebe90e428e50cba76a0a570ba9aa30a71919 100644 (file)
@@ -209,9 +209,13 @@ int nw_port_set_vlan_parent(nw_port* port, nw_port* parent) {
        }
 
        // Store the new parent
-       if (parent)
+       if (parent) {
                port->vlan.parent = nw_port_ref(parent);
 
+               // Store the name
+               nw_string_set(port->vlan.__parent_name, nw_port_name(parent));
+       }
+
        DEBUG("Port %s: Set VLAN parent to %s\n", port->name, nw_port_name(port->vlan.parent));
 
        return 0;