nl80211: Be more consistent with linux_set_iface_flags() result
Check the return value and write a debug message if this operation failes (CID 74146). Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
4debeb42a6
commit
93da049851
1 changed files with 5 additions and 1 deletions
|
@ -5008,7 +5008,11 @@ static void wpa_driver_nl80211_deinit(struct i802_bss *bss)
|
||||||
(void) i802_set_iface_flags(bss, 0);
|
(void) i802_set_iface_flags(bss, 0);
|
||||||
|
|
||||||
if (drv->addr_changed) {
|
if (drv->addr_changed) {
|
||||||
linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 0);
|
if (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname,
|
||||||
|
0) < 0) {
|
||||||
|
wpa_printf(MSG_DEBUG,
|
||||||
|
"nl80211: Could not set interface down to restore permanent MAC address");
|
||||||
|
}
|
||||||
if (linux_set_ifhwaddr(drv->global->ioctl_sock, bss->ifname,
|
if (linux_set_ifhwaddr(drv->global->ioctl_sock, bss->ifname,
|
||||||
drv->perm_addr) < 0) {
|
drv->perm_addr) < 0) {
|
||||||
wpa_printf(MSG_DEBUG,
|
wpa_printf(MSG_DEBUG,
|
||||||
|
|
Loading…
Reference in a new issue