From: Felix Fietkau Date: Sun, 4 Mar 2012 00:18:45 +0000 (+0100) Subject: bridge: fix hotplug device removal X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6920c566c1d4e18ac0ece6b25642f8b4b139cedf;p=oweals%2Fnetifd.git bridge: fix hotplug device removal --- diff --git a/bridge.c b/bridge.c index f2c73b0..dbfd470 100644 --- a/bridge.c +++ b/bridge.c @@ -156,12 +156,12 @@ bridge_member_cb(struct device_user *dev, enum device_event ev) break; case DEV_EVENT_REMOVE: - if (!bm->present) + if (dev->hotplug) { + vlist_delete(&bst->members, &bm->node); return; + } - if (dev->hotplug) - vlist_delete(&bst->members, &bm->node); - else + if (bm->present) bridge_remove_member(bm); break;