diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-04-15 17:34:00 +0900 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-04-25 10:44:46 +0200 |
commit | bd08ce56156751d58584a44e766ef61340cdae2d (patch) | |
tree | bff9431752249fd71641cc74b3a1cd73f7a34586 /src/network/networkd-link.h | |
parent | 0beb9542e90ab1c5d1507a1046a326fbcf73861c (diff) | |
download | systemd-bd08ce56156751d58584a44e766ef61340cdae2d.tar.gz |
network: prevent interfaces to be initialized multiple times
When a uevent is received during the relevant interface is in
LINK_STATE_PENDING, then the interface may be initialized twice.
To prevent that, this introduces LINK_STATE_INITIALIZED.
Diffstat (limited to 'src/network/networkd-link.h')
-rw-r--r-- | src/network/networkd-link.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/network/networkd-link.h b/src/network/networkd-link.h index e65246c87d..e322ec2262 100644 --- a/src/network/networkd-link.h +++ b/src/network/networkd-link.h @@ -20,12 +20,13 @@ #include "set.h" typedef enum LinkState { - LINK_STATE_PENDING, - LINK_STATE_CONFIGURING, - LINK_STATE_CONFIGURED, - LINK_STATE_UNMANAGED, - LINK_STATE_FAILED, - LINK_STATE_LINGER, + LINK_STATE_PENDING, /* udev has not initialized the link */ + LINK_STATE_INITIALIZED, /* udev has initialized the link */ + LINK_STATE_CONFIGURING, /* configuring addresses, routes, etc. */ + LINK_STATE_CONFIGURED, /* everything is configured */ + LINK_STATE_UNMANAGED, /* Unmanaged=yes is set */ + LINK_STATE_FAILED, /* at least one configuration process failed */ + LINK_STATE_LINGER, /* RTM_DELLINK for the link has been received */ _LINK_STATE_MAX, _LINK_STATE_INVALID = -1 } LinkState; |