-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add LWIP IPv6 zone index in chip::Inet::IPAddress #36387
base: master
Are you sure you want to change the base?
Conversation
|
PR #36387: Size comparison from da2b767 to f86577f Increases above 0.2%:
Full report (66 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
@db-shelly please sign the CLA |
It seems that we cannot set an assigment, we should modify all constructors instead....
|
PR #36387: Size comparison from da2b767 to 55e5740 Increases above 0.2%:
Full report (30 builds for linux, nrfconnect, qpg, stm32, telink, tizen)
|
@@ -201,6 +201,9 @@ class DLL_EXPORT IPAddress | |||
* address in network byte order. | |||
*/ | |||
uint32_t Addr[4]; | |||
#if CHIP_SYSTEM_CONFIG_USE_LWIP && LWIP_IPV6_SCOPES | |||
uint8_t Zone = IP6_NO_ZONE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does LwIP use zones for non-link-local bits?
Because for link-local, PeerAddress is supposed to have an interface ID already, which is what the zone bits are, no? Is that not being handled correctly in our LwIP integration? Because if that's what's going on, the right fix is to fix it there, not to add things to IPAddress that are also duplicated-but-unused-it's-a-trap in PeerAddress.
If using LWIP without any patches and with LWIP_IPV6_SCOPES=1, outbound connections cannot be routed to the correct interface, because zone index is missing in chip::Inet::IPAddress.
This is a simple fix to keep the ip6_addr_t zone in IPAddress if needed.