From: Michael Tremer Date: Fri, 14 Apr 2023 14:29:22 +0000 (+0000) Subject: networkd: ports: Create dummy function to create links X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96b1b84d857124d5b145859e25e3bfe7572eeb73;p=network.git networkd: ports: Create dummy function to create links Signed-off-by: Michael Tremer --- diff --git a/src/networkd/port.c b/src/networkd/port.c index 37ab3a7c..5694024d 100644 --- a/src/networkd/port.c +++ b/src/networkd/port.c @@ -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) {