interface: fix "if-down" hotplug event handling
authorMartin Schiller <ms@dev.tdt.de>
Fri, 12 Apr 2019 07:19:14 +0000 (09:19 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Fri, 12 Apr 2019 12:46:58 +0000 (14:46 +0200)
commit a97297d83e42 ("interface: set interface in TEARDOWN state when checking link state")
broke the if-down hotplug event handling, as the iface->state is now IFS_TEARDOWN when
calling the mark_interface_down() function from the IFPEV_DOWN event.

Fixes: a97297d83e42 ("interface: set interface in TEARDOWN state when checking link state")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
interface.c

index fd7a826dc2a52e14594232307b206a7719a094c7..e0652cdb79d0fc957a11db2146242a439c51fbf7 100644 (file)
@@ -269,6 +269,7 @@ mark_interface_down(struct interface *iface)
        iface->state = IFS_DOWN;
        switch (state) {
        case IFS_UP:
+       case IFS_TEARDOWN:
                interface_event(iface, IFEV_DOWN);
                break;
        case IFS_SETUP: