From: Felix Fietkau Date: Tue, 3 Sep 2024 08:11:26 +0000 (+0200) Subject: device: do not pull device present state from hotplug events X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=595094f5c213fa301b0304c1e0732811740b4db6;p=project%2Fnetifd.git device: do not pull device present state from hotplug events Use hotplug events as trigger for system_if_check instead. Fixes a race condition in event processing Signed-off-by: Felix Fietkau --- diff --git a/device.c b/device.c index 32e42a6..8513f72 100644 --- a/device.c +++ b/device.c @@ -1472,5 +1472,5 @@ void device_hotplug_event(const char *name, bool add) if (!dev || dev->type != &simple_device_type) return; - device_set_present(dev, add); + system_if_check(dev); }