Commit Graph
822 Commits
Author SHA1 Message Date
Abhik Roy 6e984611c9 docs(lwip): document LWIP_DNS_MAX_HOST_IP range and addr_cnt usage
The DNS buffer overflow fix (esp-lwip@6233a1561) is already included in
release/v5.5 via af7543d00a. This commit only adds Kconfig documentation
for the DNS_MAX_HOST_IP range and addr_cnt API contract.
2026-07-31 21:10:07 +10:00
David Cermak af7543d00a fix(lwip): tcp/ooseq: do not accept empty fin seg (+ other fixes)
* Update submodule: git log --oneline fd432e4e..c6f2f878
  - test(lwip): add DHCP MTU validation unit test (espressif/esp-lwip@c6f2f878e)
  - ppp: fix potential oob read in VJ decompression (espressif/esp-lwip@2ff439e61)
  - ip6-frag: Fix incorrect memcpy size to the actual struct (espressif/esp-lwip@91ad363ba)
  - tcp/ooseq: do not accept empty fin seg (espressif/esp-lwip@fe4fb18c1)
  - Address review comments (espressif/esp-lwip@9d2d80412)
  - nd6: add static neighbor cache entry support (espressif/esp-lwip@a05a5cf3b)
  - dns: add addr_cnt to DNS resolution to fix multi-IP buffer overflow (espressif/esp-lwip@6233a1561)
  - ci: Add jira sync github workflows (espressif/esp-lwip@a4e2409d0)
  - feat(lwip): migrate to to PSA API interface (espressif/esp-lwip@20f8b0739)
  - test: Fix multiple defs of util vars (espressif/esp-lwip@e9b8482e7)
  - ci: Add support for building tests/apps with both gcc and clang (espressif/esp-lwip@2a14051bf)
  - try to fix unit test compiling with clang (espressif/esp-lwip@6933a63cb)
  - apps/snmp: Remove @retval tags on void methods (espressif/esp-lwip@b6209dcf8)
  - snmp: Mention struct field removal in UPGRADING (espressif/esp-lwip@6659cf1f2)
  - snmp: remove unused prev field from snmp_varbind (espressif/esp-lwip@f32188001)
  - snmp: remove handling of varbind->prev because it is never used (espressif/esp-lwip@46660d5cf)
  - snmp: fix dangling pointer in snmp_traps (espressif/esp-lwip@0e3e97f8d)
2026-07-14 08:11:17 +02:00
David Cermak 26c44b765f fix(lwip): Adds nullchecks after DHCP server alloc'd pools 2026-07-09 16:08:11 +02:00
David Cermak 279b117202 fix(lwip): reject invalid DHCP MTU option values
Validate MTU from DHCP option 26 against RFC 2132 minimum (68 bytes)
before applying to netif->mtu, preventing rogue DHCP servers from
setting MTU to 0 or other dangerously low values that cause integer
wraparound in IPv4 fragmentation.
2026-07-09 16:08:11 +02:00
Jiang Jiang Jian fd76b1619c Merge branch 'fix/lwip_dhcps_max_size_v5.5' into 'release/v5.5'
fix(lwip): Trim to max packet size in dhcp server (v5.5)

See merge request espressif/esp-idf!48221
2026-05-11 10:52:56 +08:00
Jiang Jiang Jian 2656dc81ac Merge branch 'fix/fix_lost_ip_event_issue_v55' into 'release/v5.5'
fix(lwip): add some feature for dhcp and improve api v55

See merge request espressif/esp-idf!48105
2026-05-09 19:52:11 +08:00
David Cermak 95cc19674d fix(lwip): Fix DHCP server potentially incomplete pbuf copy
handle_dhcp: use pbuf_copy_partial for safe chain traversal

The manual two-segment copy loop was replaced with a single call
to pbuf_copy_partial(p, p_dhcps_msg, tlen, 0), which correctly
walks the entire pbuf chain regardless of segmentation.
A return-value check rejects truncated copies.
2026-05-07 09:54:17 +02:00
David Cermak 9b8a8e5b2d fix(lwip): Trim to max packet size in dhcp server 2026-05-07 07:34:29 +02:00
wangtao@espressif.com 2720d05f9c feat(lwip): dhcp server add support for dhcp inform 2026-04-30 12:10:23 +08:00
David Cermak d51b107609 fix(lwip): Fix DHCP servver OOB read issue 2026-04-28 17:00:55 +02:00
David Cermak 73d2569909 fix(lwip): Make lwip alloc/free consistend in port layer
Merges https://github.com/espressif/esp-idf/pull/11534
2026-04-15 11:36:11 +02:00
Evgeny Torbin d412f4b858 ci: remove unused test cases 2026-03-13 16:06:08 +08:00
Alexey Lapshin 7b1100db2d fix(newlib): adapt changes 2026-02-05 13:40:11 +07:00
Alexey Lapshin 0b3929d0d9 feat(esp_libc): add full support for picolibc 2026-01-30 23:39:53 +07:00
Mahavir Jain 89d2585a62 fix(lwip): allow task stack from SPIRAM except for ESP32 ECO2 and below
Closes https://github.com/espressif/esp-idf/issues/17827
2025-11-13 09:41:52 +05:30
Jiang Jiang Jian 93603cd3a3 Merge branch 'fix/fix_dhcp_server_recv_decline_issue_v55' into 'release/v5.5'
fix(lwip): fix dhcp arp check issue v55

See merge request espressif/esp-idf!41770
2025-10-09 13:00:33 +08:00
chendejin 95da85651e lwip: Add ND6 RIO support (v5.5)
[LWIP submodule changes]: git log --oneline ebabd6d..fd432e4e
nd6: add a unit test case for nd6 rio support (esp-lwip@fd432e4e)
nd6: support route information option in router advertisement (esp-lwip@1adc49f9)
2025-09-23 16:00:41 +08:00
wangtao@espressif.com cbbcae32c1 fix(lwip): fix dhcp arp check issue 2025-09-19 10:36:44 +08:00
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