wireless: fix premature removal of hotplug devices due to down state
[project/netifd.git] / bonding.c
index 1f13148fea41c929bb5dcf5db6771de722d6f072..532308cb94468baf054c018781a8b3af699b8828 100644 (file)
--- a/bonding.c
+++ b/bonding.c
@@ -303,7 +303,7 @@ bonding_port_cb(struct device_user *dep, enum device_event ev)
                bonding_disable_port(bp, true);
                break;
        case DEV_EVENT_REMOVE:
-               if (dep->hotplug) {
+               if (dep->hotplug && !dev->sys_present) {
                        vlist_delete(&bdev->ports, &bp->node);
                        return;
                }