proto-shell: fix spurious interface teardowns with host deps
authorFelix Fietkau <nbd@nbd.name>
Mon, 18 Nov 2024 19:59:27 +0000 (20:59 +0100)
committerFelix Fietkau <nbd@nbd.name>
Mon, 18 Nov 2024 20:00:10 +0000 (21:00 +0100)
Only treat IFEV_UP_FAILED, IFEV_DOWN and IFEV_FREE as down indicators

Signed-off-by: Felix Fietkau <nbd@nbd.name>
proto-shell.c

index 4039d9e690a25ee72946aff188b8c9671e39e886..931a59ea61116ef032339d713a1b53a1b15e7a20 100644 (file)
@@ -269,7 +269,7 @@ proto_shell_if_down_cb(struct interface_user *dep, struct interface *iface,
        struct proto_shell_dependency *pdep;
        struct proto_shell_state *state;
 
-       if (ev == IFEV_UP || ev == IFEV_UPDATE)
+       if (ev != IFEV_UP_FAILED && ev != IFEV_DOWN && ev != IFEV_FREE)
                return;
 
        pdep = container_of(dep, struct proto_shell_dependency, dep);