]> git.ipfire.org Git - network.git/commitdiff
networkd: ports: Create dummy function to create links
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 14 Apr 2023 14:29:22 +0000 (14:29 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 14 Apr 2023 14:29:22 +0000 (14:29 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/networkd/port.c

index 37ab3a7c1b1aa58e23512267d3b79a0beadb858e..5694024d5838f1a18d3f19ec592737d31c254b9e 100644 (file)
@@ -321,6 +321,10 @@ static int nw_port_is_disabled(nw_port* port) {
        return nw_config_get_bool(port->config, "DISABLED");
 }
 
+static int nw_port_create_link(nw_port* port) {
+       return 0; // XXX TODO
+}
+
 int nw_port_reconfigure(nw_port* port) {
        int r;
 
@@ -335,7 +339,16 @@ int nw_port_reconfigure(nw_port* port) {
                return 0;
        }
 
+       // If there is no link, we will try to create it
+       if (!port->link) {
+               r = nw_port_create_link(port);
+               if (r)
+                       return r;
+       }
+
        // XXX TODO
+
+       return 0;
 }
 
 int nw_port_has_carrier(nw_port* port) {