]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Note interface-removal-from-bridge errors in debug log
authorJouni Malinen <j@w1.fi>
Sun, 30 Dec 2018 23:05:23 +0000 (01:05 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 30 Dec 2018 23:05:23 +0000 (01:05 +0200)
One of the linux_br_del_if() calls did not log nl80211-specific entry.
Make this more consistent with the other cases even though
linux_br_add_if() function itself is logging an error in the ioctl()
failure case (but not in the interface not found case).

Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211.c

index e53dc20b02c800425a7eb2198ffa21eeaf85329e..b887eb2519d636b880c5667ef78d8d822ae8ecd5 100644 (file)
@@ -6738,9 +6738,12 @@ static int i802_set_wds_sta(void *priv, const u8 *addr, int aid, int val,
                }
                return i802_set_sta_vlan(priv, addr, name, 0);
        } else {
-               if (bridge_ifname)
-                       linux_br_del_if(drv->global->ioctl_sock, bridge_ifname,
-                                       name);
+               if (bridge_ifname &&
+                   linux_br_del_if(drv->global->ioctl_sock, bridge_ifname,
+                                   name) < 0)
+                       wpa_printf(MSG_INFO,
+                                  "nl80211: Failed to remove interface %s from bridge %s: %s",
+                                  name, bridge_ifname, strerror(errno));
 
                i802_set_sta_vlan(priv, addr, bss->ifname, 0);
                nl80211_remove_iface(drv, if_nametoindex(name));