mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-02 05:43:02 +02:00
confd: Explicitly set operstate to up when bringing interfaces up
This ensures that the operstate is defined for all interface types. Without supplying this, virtual interfaces (e.g. loopback, dummies, tunnels) will report an "UNKNOWN" operstate. For ports backed by physical (or virtualized) hardware, this option has no effect.
This commit is contained in:
committed by
Joachim Wiberg
parent
1afc2adcfc
commit
5978edce94
@@ -1021,7 +1021,7 @@ static sr_error_t netdag_gen_iface(struct dagger *net,
|
||||
/* Bring interface back up, if enabled */
|
||||
attr = lydx_get_cattr(cif, "enabled");
|
||||
if (!attr || !strcmp(attr, "true"))
|
||||
fprintf(ip, "link set dev %s up\n", ifname);
|
||||
fprintf(ip, "link set dev %s up state up\n", ifname);
|
||||
|
||||
err = err ? : netdag_gen_sysctl(net, dif);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user