Created
April 29, 2022 14:23
-
-
Save shimarin/1bdbecec648d5f65dca5d7e0758981d6 to your computer and use it in GitHub Desktop.
This file contains 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
diff --git a/src/core/ipv6/ip6_addr.c b/src/core/ipv6/ip6_addr.c | |
old mode 100644 | |
new mode 100755 | |
index 687c02f7..ad649761 | |
--- a/src/core/ipv6/ip6_addr.c | |
+++ b/src/core/ipv6/ip6_addr.c | |
@@ -41,6 +41,7 @@ | |
*/ | |
#include "lwip/opt.h" | |
+#include "lwip/netif.h" | |
#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ | |
@@ -185,6 +186,17 @@ fix_byte_order_and_return: | |
} | |
ip6_addr_clear_zone(addr); | |
+#if LWIP_IPV6_SCOPES | |
+ if (*s == '%') { | |
+ const char *scopestr = s + 1; | |
+ if (*scopestr) { | |
+ struct netif *netif = netif_find(scopestr); | |
+ if (netif) { | |
+ ip6_addr_assign_zone(addr, IP6_UNKNOWN, netif); | |
+ } | |
+ } | |
+ } | |
+#endif | |
} | |
if (current_block_index != 7) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://git.savannah.nongnu.org/cgit/lwip.git/commit/src/core/ipv6/ip6_addr.c?id=a9e73bc412b17d80d3b56887aa7e870c4ddf5fcd