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

Fix crash on access point presence events #127

Merged
merged 3 commits into from
Jan 24, 2024
Merged

Conversation

abeltrano
Copy link
Contributor

Type

  • Bug fix
  • Feature addition
  • Feature update
  • Documentation
  • Build Infrastructure

Side Effects

  • Breaking change
  • Non-functional change

Goals

Technical Details

  • Re-use Nl80211Interface parsing code for decoding nl80211 event info on presence change events.
  • Pass AccessPointCreateArgsLinux args when constructing access points in response to presence change events (this is the bug fix).
  • Emit info-level log messages on access point presence events.
  • Make Nl80211Interface suitable for use in unique containers.
  • Replace use of std::unordered_map of utility structure with std::unordered_set<Nl80211Interface> for the "seen" cache.

Test Results

  • All unit tests pass.
  • Toggled the hostapd service for an interface while netremote-server was running and validated log output was expected:
Netremote server starting
Netremote server started listening on 0.0.0.0:5047
Handling netlink socket read availabilty
Received netlink message callback
Received NL80211_CMD_SET_INTERFACE nl80211 command message
Invoking access point presence event callback with event args 'interface=wls1, presence=Arrived'
Access Point Discovery Event: Interface wls1 Arrived
Processed netlink message with result 0
Successfully processed netlink messages
Handling netlink socket read availabilty
Received netlink message callback
Received NL80211_CMD_SET_INTERFACE nl80211 command message
Invoking access point presence event callback with event args 'interface=wls1, presence=Departed'
Access Point Discovery Event: Interface wls1 Departed
Processed netlink message with result 0
Successfully processed netlink messages
Handling netlink socket read availabilty
Received netlink message callback
Received NL80211_CMD_SET_INTERFACE nl80211 command message
Invoking access point presence event callback with event args 'interface=wls1, presence=Arrived'
Access Point Discovery Event: Interface wls1 Arrived
Processed netlink message with result 0
Successfully processed netlink messages

Reviewer Focus

  • None

Future Work

  • None

Checklist

  • Build target all compiles cleanly.
  • clang-format and clang-tidy deltas produced no new output.
  • Newly added functions include doxygen-style comment block.

@abeltrano abeltrano requested a review from a team as a code owner January 24, 2024 22:27
@abeltrano abeltrano merged commit 76fdd15 into develop Jan 24, 2024
4 checks passed
@abeltrano abeltrano deleted the fixpresenceeventcrash branch January 24, 2024 23:07
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.

Bug: New AP arrival causes crash in netremote-server
1 participant