bridge: fix removal of present bridge members
authorFelix Fietkau <nbd@openwrt.org>
Mon, 5 Mar 2012 20:09:26 +0000 (21:09 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 5 Mar 2012 20:09:26 +0000 (21:09 +0100)
bridge.c

index d3b28677527eeaf23ade82f6adfd5355057c3e67..035619b02d3e45e6190fda0ea9043b2fc8177565 100644 (file)
--- a/bridge.c
+++ b/bridge.c
@@ -132,11 +132,12 @@ bridge_remove_member(struct bridge_member *bm)
        if (!bm->present)
                return;
 
-       bm->present = false;
-       bm->bst->n_present--;
        if (bst->dev.active)
                bridge_disable_member(bm);
 
+       bm->present = false;
+       bm->bst->n_present--;
+
        bst->force_active = false;
        if (bst->n_present == 0)
                device_set_present(&bst->dev, false);