Skip to content
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

[PW_SID:801182] [1/3] netdev: Remove improper use of netdev_connect_failed #263

Open
wants to merge 11 commits into
base: workflow
Choose a base branch
from

Conversation

IWDTestBot
Copy link
Owner

When a roam event is received, iwd generates a firmware scan request and
notifies its event filter of the ROAMING condition. In cases where the
firmware scan could not be started successfully, netdev_connect_failed
is invoked. This is not a correct use of netev_connect_failed since it
doesn't actually disconnect the underlying netdev and the reflected
state becomes de-synchronized from the underlying kernel device.

The firmware scan request could currently fail for two reasons:

  1. nl80211 genl socket is in a bad state, or
  2. the scan context does not exist

Since both reasons are highly unlikely, simply use L_WARN instead.

The other two cases where netdev_connect_failed is used could only occur
if the kernel message is invalid. The message is ignored in that case
and a warning is printed.

The situation described above also exists in netdev_get_fw_scan_cb. If
the scan could not be completed successfully, there's not much iwd can
do to recover. Have iwd remain in roaming state and print an error.

src/netdev.c | 35 +++++++++++------------------------
1 file changed, 11 insertions(+), 24 deletions(-)

denkenz and others added 11 commits November 14, 2023 21:00
This is taken care of by the individual cache items and
if none exist, tar fails.
When a roam event is received, iwd generates a firmware scan request and
notifies its event filter of the ROAMING condition.  In cases where the
firmware scan could not be started successfully, netdev_connect_failed
is invoked.  This is not a correct use of netev_connect_failed since it
doesn't actually disconnect the underlying netdev and the reflected
state becomes de-synchronized from the underlying kernel device.

The firmware scan request could currently fail for two reasons:
  1. nl80211 genl socket is in a bad state, or
  2. the scan context does not exist

Since both reasons are highly unlikely, simply use L_WARN instead.

The other two cases where netdev_connect_failed is used could only occur
if the kernel message is invalid.  The message is ignored in that case
and a warning is printed.

The situation described above also exists in netdev_get_fw_scan_cb. If
the scan could not be completed successfully, there's not much iwd can
do to recover.  Have iwd remain in roaming state and print an error.
Commit c59669a ("netdev: disambiguate between disconnection types")
introduced different paths for different types of disconnection
notifications from netdev.  Formalize this further by having
netdev_connect_failed only invoke connect_cb.

Disconnections that could be triggered outside of connection
related events are now handled on a different code path.  For this
purpose, netdev_disconnected() is introduced.
@IWDTestBot
Copy link
Owner Author

Fetch PR
Test ID: fetch
Desc: Fetch the PR commits for this CI run
Duration: 3.51 seconds
Result: PASS

Make Distcheck
Test ID: makedistcheck
Desc: Run distcheck to check the distribution
Duration: 75.88 seconds
Result: PASS

Build - Configure
Test ID: build
Desc: Configure the BlueZ source tree
Duration: 17.64 seconds
Result: PASS

Make Check
Test ID: makecheck
Desc: Run 'make check'
Duration: 3.87 seconds
Result: PASS

Make Check w/Valgrind
Test ID: makecheckvalgrind
Desc: Run 'make check' with Valgrind
Duration: 161.98 seconds
Result: PASS

Incremental Build with patches
Test ID: incremental_build
Desc: Incremental build per patch in the series
Duration: 277.91 seconds
Result: PASS

@IWDTestBot
Copy link
Owner Author

Fetch PR
Test ID: fetch
Desc: Fetch the PR commits for this CI run
Duration: 3.67 seconds
Result: PASS

GitLint
Test ID: gitlint
Desc: Run gitlint with rule in .gitlint
Duration: 3.42 seconds
Result: PASS

Make Distcheck
Test ID: makedistcheck
Desc: Run distcheck to check the distribution
Duration: 72.41 seconds
Result: PASS

Build - Configure
Test ID: build
Desc: Configure the BlueZ source tree
Duration: 22.64 seconds
Result: PASS

Make Check
Test ID: makecheck
Desc: Run 'make check'
Duration: 2.43 seconds
Result: PASS

Make Check w/Valgrind
Test ID: makecheckvalgrind
Desc: Run 'make check' with Valgrind
Duration: 195.16 seconds
Result: PASS

Incremental Build with patches
Test ID: incremental_build
Desc: Incremental build per patch in the series
Duration: 338.17 seconds
Result: PASS

Autotest Runner
Test ID: testrunner
Desc: Runs IWD's autotest framework
Duration: 2343.20 seconds
Result: PASS

Output:

Tests testPSK-roam failed, but passed after re-running

Clang Build
Test ID: clang
Desc: Build IWD using clang compiler
Duration: 194.75 seconds
Result: PASS

@github-actions github-actions bot force-pushed the workflow branch 7 times, most recently from a7caf08 to 9c4dc29 Compare November 19, 2023 18:00
@github-actions github-actions bot force-pushed the workflow branch 5 times, most recently from 796f12f to 48509c4 Compare November 27, 2023 16:00
@github-actions github-actions bot force-pushed the workflow branch 2 times, most recently from 6787d1d to 935d6cc Compare December 6, 2023 17:00
@github-actions github-actions bot force-pushed the workflow branch 3 times, most recently from f5b90a9 to ea08c28 Compare December 15, 2023 16:29
@github-actions github-actions bot force-pushed the workflow branch 9 times, most recently from 68c71d2 to 43f4327 Compare March 4, 2024 20:00
@github-actions github-actions bot force-pushed the workflow branch 2 times, most recently from 4170bb4 to c067bc7 Compare March 15, 2024 14:00
@github-actions github-actions bot force-pushed the workflow branch 4 times, most recently from f10f2fc to c2be9ec Compare March 28, 2024 23:30
@github-actions github-actions bot force-pushed the workflow branch 2 times, most recently from ebbbc93 to 089fa9a Compare April 16, 2024 13:02
@github-actions github-actions bot force-pushed the workflow branch 4 times, most recently from 2192e98 to 43a07cc Compare May 9, 2024 15:24
@github-actions github-actions bot force-pushed the workflow branch 3 times, most recently from 2c7b52e to 58d64d4 Compare May 14, 2024 15:45
@github-actions github-actions bot force-pushed the workflow branch 4 times, most recently from 68d5156 to 953fb5e Compare June 4, 2024 13:45
@github-actions github-actions bot force-pushed the workflow branch 2 times, most recently from a123040 to 568d50f Compare June 26, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants