From: Andre Heider Date: Tue, 28 Sep 2021 11:29:27 +0000 (+0200) Subject: wireless: fix applying wireless devices attributes on hotplug events X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=4d0c2ad3fd268388b97af0582baa8a89c3639d8b;p=project%2Fnetifd.git wireless: fix applying wireless devices attributes on hotplug events Hotplug events pass their own 'ifname' copy, so we need to compare the strings, not just the pointers. Additionally, the check condition was accidentally inverted Signed-off-by: Andre Heider Signed-off-by: Felix Fietkau --- diff --git a/wireless.c b/wireless.c index fbd42ed..4b1fb8e 100644 --- a/wireless.c +++ b/wireless.c @@ -328,7 +328,7 @@ static void wireless_interface_handle_link(struct wireless_interface *vif, const if (!ifname) ifname = vif->ifname; - if (up && ifname != vif->ifname) { + if (up && !strcmp(ifname, vif->ifname)) { struct device *dev = device_get(ifname, 2); if (dev) { dev->wireless_isolate = vif->isolate;