mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-29 08:14:02 -05:00
nl80211: Set interface address even if using old interface
If an existing interface is allowed to be used, its address better be updated to match the requested one. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
9b4d9c8bbc
commit
6997f8baab
@ -7660,6 +7660,16 @@ static int nl80211_create_iface(struct wpa_driver_nl80211_data *drv,
|
|||||||
if (use_existing) {
|
if (use_existing) {
|
||||||
wpa_printf(MSG_DEBUG, "nl80211: Continue using existing interface %s",
|
wpa_printf(MSG_DEBUG, "nl80211: Continue using existing interface %s",
|
||||||
ifname);
|
ifname);
|
||||||
|
if (addr && iftype != NL80211_IFTYPE_MONITOR &&
|
||||||
|
linux_set_ifhwaddr(drv->global->ioctl_sock, ifname,
|
||||||
|
addr) < 0 &&
|
||||||
|
(linux_set_iface_flags(drv->global->ioctl_sock,
|
||||||
|
ifname, 0) < 0 ||
|
||||||
|
linux_set_ifhwaddr(drv->global->ioctl_sock, ifname,
|
||||||
|
addr) < 0 ||
|
||||||
|
linux_set_iface_flags(drv->global->ioctl_sock,
|
||||||
|
ifname, 1) < 0))
|
||||||
|
return -1;
|
||||||
return -ENFILE;
|
return -ENFILE;
|
||||||
}
|
}
|
||||||
wpa_printf(MSG_INFO, "Try to remove and re-create %s", ifname);
|
wpa_printf(MSG_INFO, "Try to remove and re-create %s", ifname);
|
||||||
|
Loading…
Reference in New Issue
Block a user