wifi: Do not hash BSSIDs to avoid randomness in AP selection
This commit is contained in:
committed by
Stefano Avallone
parent
ceb8957a3b
commit
603ec8b51f
@@ -51,16 +51,15 @@ WifiAssocManager::ApInfoCompare::operator()(const StaWifiMac::ApInfo& lhs,
|
||||
return true;
|
||||
}
|
||||
|
||||
// the Compare method implemented by subclass may be such that the two ApInfo objects
|
||||
// compare equal; in such a case, use the BSSID as tie breaker
|
||||
bool rhsBefore = m_manager.Compare(rhs, lhs);
|
||||
if (rhsBefore)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
WifiAddressHash hash;
|
||||
return hash(lhs.m_bssid) > hash(rhs.m_bssid);
|
||||
// the Compare method implemented by subclass may be such that the two ApInfo objects
|
||||
// compare equal; in such a case, use the BSSID as tie breaker
|
||||
return lhs.m_bssid < rhs.m_bssid;
|
||||
}
|
||||
|
||||
TypeId
|
||||
|
||||
Reference in New Issue
Block a user