[net80211] correctly lock the ifp before accessing the lladdr.

Tested by: dhw
This commit is contained in:
Adrian Chadd 2016-08-18 01:25:12 +00:00
parent 2c55d0903d
commit c7ee5294ca

View File

@ -3394,10 +3394,12 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
* Check if the MAC address was changed
* via SIOCSIFLLADDR ioctl.
*/
if_addr_rlock(ifp);
if ((ifp->if_flags & IFF_UP) == 0 &&
!IEEE80211_ADDR_EQ(vap->iv_myaddr, IF_LLADDR(ifp)))
IEEE80211_ADDR_COPY(vap->iv_myaddr,
IF_LLADDR(ifp));
if_addr_runlock(ifp);
}
break;
case SIOCADDMULTI: