nl80211: Note linux_set_iface_flags() failure in debug log
authorJouni Malinen <j@w1.fi>
Fri, 2 Jan 2015 20:54:30 +0000 (22:54 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 2 Jan 2015 20:56:04 +0000 (22:56 +0200)
There was one final remaining linux_set_iface_flags() call that did not
check the result. This specific one does not really matter much, but
anyway, be more consistent by checking the result and log any error in
debug log. (CID 74146)

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

index 9e005e2..05521fb 100644 (file)
@@ -2150,7 +2150,11 @@ static void wpa_driver_nl80211_deinit(struct i802_bss *bss)
                        nl80211_handle_destroy(drv->rtnl_sk);
        }
        if (bss->added_bridge) {
-               linux_set_iface_flags(drv->global->ioctl_sock, bss->brname, 0);
+               if (linux_set_iface_flags(drv->global->ioctl_sock, bss->brname,
+                                         0) < 0)
+                       wpa_printf(MSG_INFO,
+                                  "nl80211: Could not set bridge %s down",
+                                  bss->brname);
                if (linux_br_del(drv->global->ioctl_sock, bss->brname) < 0)
                        wpa_printf(MSG_INFO, "nl80211: Failed to remove "
                                   "bridge %s: %s",