Need to use tcpip_api_call() instead of tcpip_callback(), since the
former waits for the tcpip task to complete and thus prevents potential
data races with subsequent TCP/IP tasks.
This fixes a bug where we ping our own IP and the request itself
bounces back to the raw receive function and is incorrectly treated as
reply. (this bug was discovered when fixing ICMPv6 pings with incorrect
checksums, while the ping request was dropped in icmpv6.c due to wrong
checksum, but was also fed to raw layers where it was treated as
"correct" response, so the PINGv6 to ourselves still worked)
Tested under ESP32S3, running 50 tasks, each with a client, and a server
listening to one client, totalizing 150 sockets/files open, forwarding
data from PPP to Ethernet and vice versa.
Reasoning for 255 total sockets/files is VFS local_fd_t being a uint8_t.
Since FD_SETSIZE is defined at tool level, a CMakeLists user definition
is needed in cases above 64 (the default value).
Merges https://github.com/espressif/esp-idf/pull/13866
* Makes LWIP_HOOK_IP6_INPUT default to LWIP_HOOK_IP6_INPUT_DEFAULT
* Updated the stub hook implementation to actually filter out all IPv6
packets if the input netif has no link local address.
Introducing config option `CONFIG_ESP_NETIF_SET_DNS_PER_DEFAULT_NETIF`
to overcome LWIP limitation of using global DNS server info.
This config option enables LWIP callbacks to collect per netif DNS
server info and then restores global DNS servers of whichever network
interface is selected as default.
LWIP submodule update v5.3: git log --oneline f1746813..3a3d1fb3
- dns: Allow storing dnsserver per netif (espressif/esp-lwip@3a3d1fb3)
- api_msg: Fix unused local variable if LWIP_NETCONN_SEM_PER_THREAD=1
(espressif/esp-lwip@aa4f6e78)
- lwip: fix gcc -fanalyzer warnings (espressif/esp-lwip@4297782b)
LWIP submodule update on v5.3: git log --oneline f7922143..f1746813
- feat(lwip): Added multiple dns ip support
(espressif/esp-lwip@f1746813)
- api_msg: Fix crash to fail-safe error if cannot get semaphore
(espressif/esp-lwip@a1bd9e44)
* Users can now use libbsd string.h and sys/cdefs.h functionality
(e.g., strlcpy, containerof) on Linux by just including
string.h or sys/cdefs.h. In other words, the includes are the same
on the Linux target as well as on chips targets (ESP32, etc.).
* libbsd linking is done by the linux component (belongs to common
components) now instead of handling it separately in each component
Only pull in direct dependencies for the test apps, reducing build time
as well making it possible for CI to determine if the test should run or not
when dependencies are changed.
* Update submodule: git log --oneline 542ba299..f5c43549
Detailed description of the changes:
- lwip_debug: Fixed string format error in ip6 and napt (espressif/esp-lwip@f5c43549)
- dns: fix init with only ipv4 enabled (espressif/esp-lwip@5aab73d7)