-
Notifications
You must be signed in to change notification settings - Fork 0
[PW_SID:942442] [1/8] blacklist: include a blacklist reason when adding/finding #453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: workflow
Are you sure you want to change the base?
Conversation
This is taken care of by the individual cache items and if none exist, tar fails.
To both prepare for some new blacklisting behavior and allow for easier consolidation of the network-specific blacklist include a reason enum for each entry. This allows IWD to differentiate between multiple blacklist types. For now only the existing "permanent" type is being added which prevents connections to that BSS via autoconnect until it expires. By including a type into each entry we now have additional search criteria and can have multiple entires of the same BSS with different reasons. This was done versus a bitmask because each blacklist reason may have a different expiration time. We want to maintain individual expirations to have the best "memory" of past events rather than overwriting them. Future patches will lump in the temporary network blacklist as well as a new roaming blacklist type.
When pruning the list check_if_expired was comparing to the maximum amount of time a BSS can be blacklisted, not if the current time had exceeded the expirationt time. This results in blacklist entries hanging around longer than they should, which would result in them poentially being blacklisted even longer if there was another reason to blacklist in the future. Instead on prune check the actual expiration and remove the entry if its expired. Doing this removes the need to check any of the times in blacklist_contains_bss since prune will remove any expired entries correctly.
This is meant to replace the blacklist held in network objects, known as the temporary blacklist. For these entires there is no expiration as it will be up to network.c to remove them as it does now internally.
Remove the temporary blacklist from network.c and use the new BLACKLIST_REASON_TEMPORARY type.
This adds a new blacklist reason as well as an option to configure the timeout. This blacklist reason will be used in cases where a BSS has requested IWD roam elsewhere. At that time a new blacklist entry will be added which will be used along with some other criteria to determine if IWD should connect/roam to that BSS again.
This introduces a higher level grouping to BSS's to improve sorting
as opposed to purely rank based sorting. The reason for this is to
handle roam request-based blacklisting where we want to encourage
IWD to avoid BSS's that have requested we roam elsewhere, but also
not fully ban these BSS's (i.e. BLACKLIST_REASON_PERMANENT).
This new concept introduces 4 group types, in order of worse to
best:
- Blacklisted - the BSS has a permanent timeout blacklist
- Under threshold - the BSS is under the set RSSI threshold
- Above threshold - the BSS is above the set RSSI threshold
- Optimal - The BSS is not "roam blacklisted" and is above the
set RSSI threshold.
When sorting the BSS group will be considered before rank. This
means we will still prefer roam blacklisted BSS's above those that
are under the set RSSI threshold. BSS's within the same group are
still compared by their rank/signal.
The new group sorting logic was added via a macro
__scan_bss_rank_compare. This was done since station uses a separate
roam_bss structure to sort roam candidates which can also take
advantage of this new sorting. The macro is agnostic to the type as
long as the structure member names match.
If the BSS is requesting IWD roam elsewhere add this BSS to the blacklist using BLACKLIST_REASON_ROAM_REQUESTED. This will lower the chances of IWD roaming/connecting back to this BSS in the future. In addition we also needed to update the roam_bss sorting to use __scan_bss_rank_compare so we sort based on the new groupings rather than only rank/rssi.
|
Fetch PR Prep - Setup ELL Make Distcheck Build - Configure Make Check Make Check w/Valgrind Incremental Build with patches |
|
Fetch PR GitLint Prep - Setup ELL Make Distcheck Build - Configure Make Check Make Check w/Valgrind Incremental Build with patches Autotest Runner Clang Build |
6a6b0cc to
55901fd
Compare
55901fd to
8713461
Compare
a2c9985 to
624cea8
Compare
6c81fca to
f77997d
Compare
f77997d to
bc55824
Compare
bc55824 to
1d29908
Compare
0e6ebfd to
9ab928a
Compare
2123adf to
d37ddb0
Compare
d37ddb0 to
ba43a37
Compare
5d04e8d to
b29a924
Compare
e4aa359 to
0e452d2
Compare
0e452d2 to
d035ebb
Compare
d035ebb to
25a40e4
Compare
To both prepare for some new blacklisting behavior and allow for
easier consolidation of the network-specific blacklist include a
reason enum for each entry. This allows IWD to differentiate
between multiple blacklist types. For now only the existing
"permanent" type is being added which prevents connections to that
BSS via autoconnect until it expires.
By including a type into each entry we now have additional search
criteria and can have multiple entires of the same BSS with
different reasons. This was done versus a bitmask because each
blacklist reason may have a different expiration time. We want to
maintain individual expirations to have the best "memory" of past
events rather than overwriting them.
Future patches will lump in the temporary network blacklist as well
as a new roaming blacklist type.
src/blacklist.c | 81 +++++++++++++++++++++++++++++++++++++------------
src/blacklist.h | 14 +++++++--
src/network.c | 3 +-
src/station.c | 12 +++++---
4 files changed, 83 insertions(+), 27 deletions(-)