svn commit: r304322 - head/sys/net80211
Adrian Chadd
adrian at FreeBSD.org
Thu Aug 18 01:25:13 UTC 2016
Author: adrian
Date: Thu Aug 18 01:25:12 2016
New Revision: 304322
URL: https://svnweb.freebsd.org/changeset/base/304322
Log:
[net80211] correctly lock the ifp before accessing the lladdr.
Tested by: dhw
Modified:
head/sys/net80211/ieee80211_ioctl.c
Modified: head/sys/net80211/ieee80211_ioctl.c
==============================================================================
--- head/sys/net80211/ieee80211_ioctl.c Thu Aug 18 00:37:07 2016 (r304321)
+++ head/sys/net80211/ieee80211_ioctl.c Thu Aug 18 01:25:12 2016 (r304322)
@@ -3394,10 +3394,12 @@ ieee80211_ioctl(struct ifnet *ifp, u_lon
* 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:
More information about the svn-src-head
mailing list