Remove ethernet interface logic for SoftAP and STA #12842
Merged
+82
−0
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.
Modified LwIP mbed-os wrapper LWIPInterface.cpp to add an api remove interface which will be called as part of WhdSoftAPInterface::stop() to support sending UDP IPv6 packet is sent over link-local interface
Issue: udp_sendto() Fails for multicast IPV6 packet when interface is switched from SoftAP to STA mode.
When SoftAP start is called, add_ethernet_interface() will be called internally to add interface details into netif_list.
When switching from SoftAP to STA mode, add_ethernet_interface() will be called again to append the interace details into netif_list.
When udp_sendto() is called, ip6_route() will return interface as NULL since it consider device as single interface.
Summary of changes
LWIPInterface.cpp
LWIP::remove_ethernet_interface() api is added to remove the interface from the netif_list.
WhdSoftAPInterface.cpp
WhdSoftAPInterface::stop(), calling remove_ethernet_interface() from the network list which was added as part of WhdSoftAPInterface::start()
WhdSTAInterface.cpp
WhdSTAInterface::stop(), calling remove_ethernet_interface() from the network list which was added as part of WhdSTAInterface::start()
Impact of changes
Migration actions required
Documentation
--------------------------------------------------------------------------------------------------------------### Pull request type
Test results
Reviewers