diff options
author | Susant Sahani <ssahani@users.noreply.github.com> | 2016-12-05 15:31:48 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-12-05 15:31:48 +0100 |
commit | e3a7b04848a438f7b5a9a2bf5d7e0e59c5c49a00 (patch) | |
tree | 983dbd7def20f5cc256ae2e92d905a398f40910c /src/network/networkd-link.c | |
parent | journal: make sure to initially populate the space info cache (#4807) (diff) | |
download | systemd-e3a7b04848a438f7b5a9a2bf5d7e0e59c5c49a00.tar.xz systemd-e3a7b04848a438f7b5a9a2bf5d7e0e59c5c49a00.zip |
networkd: link_enter_configured remove assert (#4800)
When we are in link_enter_configured we assume that the
link->state should be LINK_STATE_SETTING_ROUTES but in some
situation it's LINK_STATlE_SETTING_ADDRESSES.
Just ignore the wrong state.
Also since the return value not used any where
make link_enter_configured return type void.
Fixes: #4746
Diffstat (limited to '')
-rw-r--r-- | src/network/networkd-link.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 643578c164..dd0e33a1ce 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -686,18 +686,18 @@ static Address* link_find_dhcp_server_address(Link *link) { return NULL; } -static int link_enter_configured(Link *link) { +static void link_enter_configured(Link *link) { assert(link); assert(link->network); - assert(link->state == LINK_STATE_SETTING_ROUTES); + + if (link->state != LINK_STATE_SETTING_ROUTES) + return; log_link_info(link, "Configured"); link_set_state(link, LINK_STATE_CONFIGURED); link_dirty(link); - - return 0; } void link_check_ready(Link *link) { |