Commit Graph

812 Commits

Author SHA1 Message Date
David Čermák
84b969ecea Merge branch 'feat/menuconfig_for_rio_enable' into 'master'
feat(lwip/config): add menuconfig option to enable ND6 RIO support and set the RIO cache size

Closes IDFGH-13888

See merge request espressif/esp-idf!39488
2025-06-26 22:13:57 +08:00
Alexey Lapshin
e82d51a9ee fix(picolibc): fix missed headers in sources 2025-06-25 18:01:50 +07:00
Frantisek Hrbata
0afcc02c47 Merge branch 'fix/cmake_uninitialized_vars' into 'master'
fix(build): do not rely on uninitialized  variables and variables set in parent scope

See merge request espressif/esp-idf!39615
2025-06-20 08:30:30 +02:00
chendejin
271532bbf3 feat(lwip/config): add menuconfig to enable ND6 RIO support and set the cache size 2025-06-18 11:19:09 +08:00
David Čermák
d9457b807c Merge branch 'fix/lwip_dhcp_option_len_assert' into 'master'
fix(lwip): Fix appending DHCP option with HW-ID

Closes IDF-13354

See merge request espressif/esp-idf!39749
2025-06-12 15:01:10 +08:00
David Cermak
a39d38994f fix(lwip): Fix appending DHCP option with HW-ID 2025-06-09 10:29:24 +02:00
Frantisek Hrbata
f50ae95ab5 fix(lwip/cmake): avoid using uninitialized srcs variable
Currently, lwip's CMakeLists.txt might use an uninitialized srcs value
if CONFIG_LWIP_ENABLE is disabled. This means it could use a srcs value
set by another component, involving sources that are entirely
unrelated to the lwip component during registration. Perhaps we
should simply exit when CONFIG_LWIP_ENABLE is not enabled and avoid
registering the component altogether.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-06-04 19:50:27 +08:00
David Čermák
a74725a31b Merge branch 'feat/lwip/ipv6_dup_detect_tries' into 'master'
feat(lwip/config): add menuconfig option for setting LWIP_IPV6_DUP_DETECT_ATTEMPTS

Closes IDFGH-9320

See merge request espressif/esp-idf!39080
2025-05-26 17:00:47 +08:00
Amitesh Singh
201df702da feat(lwip/config): add menuconfig option for setting LWIP_IPV6_DUP_DETECT_ATTEMPTS
In my network, ipv6 address allocation to esp32 was unreliable.
I'd to disable LWIP_IPV6_DUP_DETECT_ATTEMPTS to 0 to actually make
esp32 ipv6 address assignment work reliably.

Signed-off-by: Amitesh Singh <singh.amitesh@gmail.com>
2025-05-06 10:17:59 +05:30
Tomáš Rohlínek
fccd8d1a5b feat(network/lwip): Add checks for maximum socket count 2025-04-23 08:36:43 +02:00
Chen Jichang
c34b4eb882 feat(esp32h4): enable ESP32H4 ci build 2025-03-28 14:41:28 +08:00
David Čermák
0be20a5f22 Merge branch 'feat/lwip_hook_dhcp_extra_opt' into 'master'
feat(lwip): Add DHCP extra option hook

Closes IDFGH-14572

See merge request espressif/esp-idf!36949
2025-03-21 22:06:56 +08:00
David Cermak
54a58c05e6 feat(lwip): Add DHCP extra option hook
Closes https://github.com/espressif/esp-idf/issues/15329
2025-03-21 11:59:58 +01:00
wangtao@espressif.com
40adbf5fa9 fix(dhcp): fix dhcp server recv decline issue 2025-03-14 10:45:48 +08:00
David Čermák
49c9d797de Merge branch 'feat/update_lwip_to_support_ip6_route_clone_buffer' into 'master'
feat(lwip): support cloning pbuf_ref when ipv6 forwarding

See merge request espressif/esp-idf!37402
2025-03-12 17:04:20 +08:00
igor.udot
daf2d31008 test: format all test scripts 2025-03-05 12:08:48 +08:00
Xu Si Yu
8fcac9284e feat(lwip): support cloning pbuf_ref when ipv6 forwarding; add unit tests
[LWIP submodule changes]: git log --oneline 0a44efa1..ebabd6d7

Detailed description of the changes:
  - ip6: add some unit test cases for ip6 forwarding (esp-lwip@ebabd6d7)
  - ip6: clone the buf when forwarding a PBUF_REF packet (esp-lwip@adcd330e)
2025-03-03 14:22:19 +08:00
Abhik Roy
c264d8c580 fix(lwip): Fixed NULL pointer dereference in ip_napt_enable; add unit tests
[LWIP submodule changes]: git log --oneline fa4dffdf..0a44efa1

Detailed description of the changes:
  - napt: Fixed NULL pointer dereference in ip_napt_enable (espressif/esp-lwip@0a44efa1)
  - napt: Added unit tests for napt (espressif/esp-lwip@865d7d0c)

Closes https://github.com/espressif/esp-lwip/issues/69
2025-02-26 00:24:10 +11:00
Abhik Roy
b3523a6fbe fix(dhcps): Fixed DNS server handling for previous breaking changes 2025-02-17 13:19:28 +11:00
Lorenzo Consolaro
0fd3984c72 feat(dhcps): Support for multiple DNS servers 2025-02-17 13:15:03 +11:00
David Cermak
42d2a131f6 fix(lwip): Remove if_indextoname() impl in favor of LWIP_NETIF_API
ESP-IDF already hardcodes LWIP_NETIF_API=1, so the related netif APIs are
defined unconditionally.
2025-02-10 19:34:57 +08:00
David Cermak
86089be928 feat(lwip): Hardcode NETIF_API=1 to support POSIX netif API 2025-02-10 19:34:57 +08:00
gaoxu
5ef4f20778 feat(esp32h21): disable unsupported build test 2025-02-06 15:47:51 +08:00
Abhik Roy
ebef063523 test(lwip): Added LWIP_DHCP_RESTORE_LAST_IP config in lwip test apps
Enabled CONFIG_LWIP_DHCP_RESTORE_LAST_IP configuration to compile and
test the DHCP last IP restore functionality in CI tests.
2025-01-23 21:44:38 +11:00
Abhik Roy
65706be451 fix(lwip): Fixed compilation issue with LWIP_DHCP_RESTORE_LAST_IP
Closes https://github.com/espressif/esp-idf/issues/14582
2025-01-23 21:44:38 +11:00
David Cermak
b46b3d1c1d fix(lwip): Fix potential data-race in ping tcpip callback
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.
2025-01-22 21:13:57 +08:00
David Čermák
ed14b8d3f8 Merge branch 'fix/lwip_ping_getnetif_threadsafe' into 'master'
fix(lwip): Fix ping session calling thread unsafe API

Closes IDFGH-14183

See merge request espressif/esp-idf!35527
2025-01-14 18:16:51 +08:00
David Cermak
c5955f8cf6 fix(lwip): Fix ping session calling thread unsafe API
Closes https://github.com/espressif/esp-idf/issues/14982
2024-12-20 08:09:22 +01:00
David Cermak
4772f51437 feat(lwip): Declare additional POSIX API if available
Add support for socketpair() directly from lwip sockets (if sock-utils included)
Add support for gai_strerror() directly from lwip netdb.h (if sock-utils included)

Closes https://github.com/espressif/esp-idf/issues/13772
Closes https://github.com/espressif/esp-idf/issues/14849

fix(lwip): prevent socket.h to spellcheck
2024-12-17 11:18:42 +01:00
David Čermák
1f4ea21092 Merge branch 'fix/lwip_autoip_next_addr_after_rate_limit' into 'master'
fix(lwip): Fix AUTOIP new address after rate limit

Closes IDF-11285

See merge request espressif/esp-idf!35279
2024-12-11 17:06:50 +08:00
David Cermak
6fe443a6d5 fix(lwip): Fix DHCP lease overlow using u32 type 2024-11-28 13:17:21 +01:00
David Cermak
be6c49f79a fix(lwip): Fix AUTOIP new address after rate limit 2024-11-28 12:58:49 +01:00
Abhik Roy
d846929dc3 feat(lwip): Added wrapper for getaddrinfo to handle AF_UNSPEC 2024-11-22 13:06:34 +11:00
David Cermak
0d99214012 fix(lwip): Limit active TCP PCBs and recycle them faster
* Update submodule: git log --oneline c816f0ee..a587d929
Detailed description of the changes:
  - test: Add tcp-pcb recycle test (espressif/esp-lwip@a587d929)
  - tcp: Apply faster PCB recycling in FIN_WAIT_1 or FIN_WAIT_2 state (espressif/esp-lwip@3bfc85d2)
  - test: Add tcp alloc limitation test (espressif/esp-lwip@0c9c39a9)
  - memp: Employ TCP-PCB allocation limit if libc malloc used (espressif/esp-lwip@9cb96ac1)

Closes https://github.com/espressif/esp-idf/issues/9670
Closes https://github.com/espressif/esp-lwip/pull/63
2024-11-13 08:53:51 +01:00
David Cermak
8b191dd7a1 fix(lwip): Fix ping_v6 receiving to accept only echo replies
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)
2024-11-08 12:21:35 +01:00
David Cermak
f269835865 fix(lwip): Fix IP6 raw socket checksum in IPv6-only configuration 2024-11-08 12:21:35 +01:00
Abhik Roy
e4c92855ee Merge branch 'lwip/dns_clear_cache_fix' into 'master'
fix(lwip):  Fixed active DNS entries before clearing cache

Closes IDFGH-13375

See merge request espressif/esp-idf!33906
2024-10-29 22:36:11 +08:00
wangtao@espressif.com
e65acc9510 feat(wifi): fix SPIRAM_IGNORE_NOTFOUND releated config 2024-10-24 19:49:57 +08:00
Abhik Roy
ff25e646fb fix(lwip): Fixed active DNS entries before clearing cache 2024-10-08 22:03:39 +11:00
David Cermak
649816d9a1 fix(lwip/dhcps): Fallback DNS option to DHCP server's IP by default
Adds backward compatibity option CONFIG_LWIP_DHCPS_ADD_DNS, which
prevents breaking changes.
This option should be removed in IDF v6.0

Merges https://github.com/espressif/esp-idf/pull/14132
2024-10-07 21:07:57 +11:00
Showier Drastic
484a2d6d6c feat(lwip/apps): only hand out DNS in DHCP if explicitly specified 2024-10-07 21:07:01 +11:00
David Čermák
82a29b7d21 Merge branch 'fix/lwip_drop_ipv6_if_no_ll' into 'master'
fix(lwip): Add default IPv6 input filter to drop traffic if ipv6 not assigned

Closes IDF-10472

See merge request espressif/esp-idf!32165
2024-09-20 23:33:49 +08:00
David Cermak
98fdb1a97f fix(lwip): Add default IPv6 input filter to drop traffic if ipv6 not assigned
* 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.
2024-09-20 10:36:43 +02:00
Shu Chen
4d4062a2b8 Merge branch 'feat/thread_dns_ext_resolve' into 'master'
feat(openthread): Replace netconn external resolve hook with dns external hook

See merge request espressif/esp-idf!33344
2024-09-13 15:45:25 +08:00
David Cermak
015ab1d18f fix(lwip): Fix linker/fr symbol for tcp_output_control segment
In lwip-2.1.3 tcp_output_control_segment() is used to send RST, empty
ACK, keepalive or zero window probe.
In lwip-2.2.0 this works the same, but the function is used when we
don't know the interface to send to (and if used it finds it and calls)
tcp_output_control_segment_netif().
When `LWIP_EXTRA_IRAM_OPTIMIZATION=y` we would ideally move both
variants to IRAM, but the pcb variant (tcp_output_control_segment) could
be optimized away on some targets and toolchain versions.
(esp32c6 with riscv32-esp-elf/esp-14.2.0_20240906)
It should be sufficient to keep tcp_output_control_segment_netif in IRAM
for most common performance usecases.
2024-09-12 09:52:13 +02:00
David Cermak
4d046b3732 feat(lwip): Reference official lwip-2.2.0-esp 2024-09-11 16:48:07 +02:00
David Cermak
c098388a2f fix(lwip): Use ACD light module for simple DHCP-ARP check 2024-09-11 16:48:07 +02:00
David Cermak
22f213b518 feat(lwip): Add support for lwip 2.2.0-esp release 2024-09-11 16:48:00 +02:00
WanqQixiang
f62628d334 feat(openthread): Replace netconn external resolve hook with dns external hook 2024-09-11 09:59:06 +08:00
WanqQixiang
9c4ae855bb feat(lwip): Add DNS external hook 2024-09-05 10:09:15 +08:00