-
Notifications
You must be signed in to change notification settings - Fork 0
[PW_SID:967123] [v2,1/6] network: make clearing network blacklist a separate operation #473
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
Conversation
This is taken care of by the individual cache items and if none exist, tar fails.
This adds a new API network_clear_blacklist() and removes this functionality from network_connected(). This is done to support BSS iteration when netconfig is enabled. Since a call to network_connected() will happen prior to netconfig completing we cannot clear the blacklist until netconfig has either passed or failed.
When netconfig is enabled the DBus reply was being sent in station_connect_ok(), before netconfig had even started. This would result in a call to Connect() succeeding from a DBus perspective but really netconfig still needed to complete before IWD transitioned to a connected state. Fixes: 72e7d3c ("station: Handle NETCONFIG_EVENT_FAILED")
A netconfig failure results in a failed connection which restarts autoconnect and prevents IWD from retrying the connection on any other BSS's within the network as a whole. When autoconnect restarts IWD will scan and choose the "best" BSS which is likely the same as the prior attempt. If that BSS is somehow misconfigured as far as DHCP goes, it will likely fail indefinitely and in turn cause IWD to retry indefinitely. To improve this netconfig has been adopted into the IWD's BSS retry logic. If netconfig fails this will not result in IWD transitioning to a disconnected state, and instead the BSS will be network blacklisted and the next will be tried. Only once all BSS's have been tried will IWD go into a disconnected state and start autoconnect over.
Let the caller specify the method timeout if there is an expectation that it could take a long time. For the conventional connect call (not the "bssid" debug variant) let them pass their own callback handlers. This is useful if we don't want to wait for the connect call to finish, but later get some indication that it did finish either successfully or not.
Since the method return to Connect() and ConnectBssid() come after netconfig some tests needed to be updated since they were waiting for the method return before continuing. For timeout-based tests specifically this caused them to fail since before they expected the return to come before the connection was actually completed.
Since netconfig is now part of the Connect() call from a DBus perspective add a note indicating that this method has the potential to take a very long time if there are issues with DHCP.
|
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 |
2123adf to
d37ddb0
Compare
This adds a new API network_clear_blacklist() and removes this
functionality from network_connected(). This is done to support BSS
iteration when netconfig is enabled. Since a call to
network_connected() will happen prior to netconfig completing we
cannot clear the blacklist until netconfig has either passed or
failed.
src/network.c | 9 ++++++---
src/network.h | 1 +
2 files changed, 7 insertions(+), 3 deletions(-)