Commit Graph

804 Commits

Author SHA1 Message Date
David Cermak 1ad41e589f fix(lwip): Fix appending DHCP option with HW-ID 2025-06-30 12:12:45 +02:00
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
Shu Chen 51cd6e9291 Merge branch 'feat/support_config_to_reply_ns_without_ll_opt' into 'master'
feat(lwip): reply the NS without LL opt

See merge request espressif/esp-idf!32671
2024-08-28 15:19:39 +08:00
zwx fc9175d494 feat(lwip): reply the NS without LL opt 2024-08-27 18:10:23 +08:00
zwx 9c9ae155ba feat(lwip): add a config to set the size of ND6 table cache 2024-08-26 17:48:51 +08:00
Abhik Roy 4873a94b01 Merge branch 'example/ping_invalid_ip6_fix' into 'master'
fix(example): Fixed updating recv addr for invalid packets

Closes IDFGH-13264

See merge request espressif/esp-idf!32275
2024-08-16 17:01:37 +08:00
Abhik Roy 322f22d169 fix(lwip): Fixed incorrect handling of 0.0.0.0 in dns 2024-08-15 19:00:47 +10:00
Abhik Roy 53ba6e97cd fix(example): Fixed updating recv addr for invalid packets for ping
Closes https://github.com/espressif/esp-idf/issues/14197
2024-08-13 21:51:58 +10:00
igor.udot 8691672f03 ci: replace pytest function 2024-07-23 14:07:31 +08:00
David Cermak 48b3e4f76f feat(lwip): Add support for disabling IPv4 in PPP networks 2024-07-17 21:41:09 +08:00