Draft
Conversation
…ctive On boards like ARKV6X (ChibiOS + HAL_USE_MAC), the switch architecture enables AP_NETWORKING_BACKEND_SWITCH with Ethernet switchport, but no backend (PPP/SITL) gets created. This causes null pointer dereferences: 1. announce_address_changes() unconditionally dereferences backend->activeSettings 2. update() calls backend->update() when is_healthy() returns true via hub Also fix two architectural issues: - Enable SWITCHPORT_LWIP for ChibiOS+Ethernet boards (not just gateway clients), so the IP stack works when the old ChibiOS backend is replaced by the switch architecture - Wire get_ip_active/get_netmask_active/get_gateway_active to fall back to the lwIP switchport when backend is null - Call hub->update() from AP_Networking::update() so switch ports (including lwIP) get their periodic update calls Co-authored-by: jschall <jschall@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a boot loop on ARKV6X when
NET_ENABLEis set by addressing null pointer dereferences and enabling the lwIP switchport.The boot loop occurred because on ChibiOS+Ethernet boards like ARKV6X, the
backendobject inAP_Networkingwasnullptrafter the oldAP_Networking_ChibiOSbackend was replaced by the switch architecture. This led to immediate null pointer dereferences inannounce_address_changes()andupdate(). Additionally, theAP_NETWORKING_BACKEND_SWITCHPORT_LWIPwas not enabled for these boards, meaning no IP stack was available. The fix enables the lwIP switchport and adds null checks with fallbacks to the lwIP port for IP settings and updates.