Abhik Roy
6625eb9e44
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.4 via 882843dbf8 . This commit only adds Kconfig documentation
for the DNS_MAX_HOST_IP range and addr_cnt API contract.
2026-07-31 21:21:50 +10:00
David Cermak
882843dbf8
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 09:25:40 +02:00
David Cermak
8c78bd3535
fix(lwip): Adds nullchecks after DHCP server alloc'd pools
2026-07-09 16:09:14 +02:00
David Cermak
4e59b2eacb
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:09:13 +02:00
wangtao@espressif.com
ba19403b31
feat(lwip): dhcp server add support for dhcp inform
2026-05-25 21:07:57 +08:00
David Cermak
aecedc1f10
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:55:20 +02:00
David Cermak
711fa7400d
fix(lwip): Trim to max packet size in dhcp server
2026-05-07 07:34:38 +02:00
David Cermak
2bf4dd1200
fix(lwip): Fix DHCP servver OOB read issue
2026-04-28 17:04:55 +02:00
David Cermak
83e7aa11b0
fix(lwip): Make lwip alloc/free consistend in port layer
...
Merges https://github.com/espressif/esp-idf/pull/11534
2026-04-21 08:57:33 +02:00
Evgeny Torbin
f7395255da
test: format all test scripts
2026-03-11 07:34:34 +01:00
Mahavir Jain
c2390aa3c4
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:58 +05:30
Jiang Jiang Jian
1021335ed9
Merge branch 'fix/fix_dhcp_server_recv_decline_issue_v54' into 'release/v5.4'
...
fix(lwip): fix dhcp arp check issue
See merge request espressif/esp-idf!41771
2025-09-19 01:41:29 +08:00
chendejin
b567f95ea4
lwip: Add IPv6 improvements, NAPT fixes, and ND6 RIO support (v5.4)
...
[LWIP submodule changes]: git log --oneline fa4dffdf..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)
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)
napt: Fixed NULL pointer dereference in ip_napt_enable (esp-lwip@0a44efa1)
napt: Added unit tests for napt (esp-lwip@865d7d0c)
2025-09-15 17:06:43 +02:00
wangtao@espressif.com
a82bc2a4f7
fix(lwip): fix dhcp arp check issue
2025-09-09 16:23:48 +08:00
Abhik Roy
ee34949087
fix(dhcps): Fixed DNS server handling for previous breaking changes
2025-07-28 14:34:27 +08:00
Lorenzo Consolaro
418ed7a575
feat(dhcps): Support for multiple DNS servers
2025-07-28 14:34:27 +08:00
David Cermak
7f07eba674
fix(lwip): Fix appending DHCP option with HW-ID
2025-06-30 12:13:56 +02:00
wanckl
ea03622621
ci(esp32c61): remove c61 support from readme on 5.4
2025-06-17 15:09:40 +08:00
Tomáš Rohlínek
0a9105a406
feat(network/lwip): Add checks for maximum socket count
2025-05-26 19:23:31 +08:00
wuzhenghui
33aca83c63
change(ci): remove esp32c5 from readme since esp32c5 skipped CI build
2025-04-25 17:13:27 +08:00
wangtao@espressif.com
c8e36049b1
fix(dhcp): fix dhcp server recv decline issue
2025-04-24 10:29:26 +08:00
David Cermak
e7a0a93a40
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-29 23:34:18 +08:00
Abhik Roy
eed1e02fdc
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-24 21:35:12 +11:00
Abhik Roy
37657757ba
fix(lwip): Fixed compilation issue with LWIP_DHCP_RESTORE_LAST_IP
...
Closes https://github.com/espressif/esp-idf/issues/14582
2025-01-24 21:35:12 +11:00
David Cermak
d715abb8fd
fix(lwip): Fix ping session calling thread unsafe API
...
Closes https://github.com/espressif/esp-idf/issues/14982
2025-01-14 11:25:31 +01:00
David Cermak
1816632e65
fix(lwip): Fix AUTOIP new address after rate limit
...
submodule update: git log --oneline a587d929..fa4dffdf
- autoip: Choose next address after rate limit (espressif/esp-lwip@fa4dffdfa )
2024-12-20 08:41:17 +01:00
David Cermak
d85744af43
fix(lwip): Fix DHCP lease overlow using u32 type
2024-11-28 10:06:14 +01:00
David Cermak
7d9970590a
fix(lwip): Limit active TCP PCBs and recycle them faster
...
Update submodule: git log --oneline c816f0ee..a587d929
- 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 )
2024-11-22 14:45:36 +01:00
David Cermak
2822cc671a
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-21 11:24:46 +01:00
David Cermak
f75e399139
fix(lwip): Fix IP6 raw socket checksum in IPv6-only configuration
...
* Update submodule: git log --oneline f150e232..c816f0ee
- sockets: Make IPv6 only netconn type IPv6 aware (espressif/esp-lwip@c816f0ee )
- test: Make test application scalable (espressif/esp-lwip@3ec12c3b )
- dns: Handle active DNS entries before clearing cache (espressif/esp-lwip@b15cd2de )
2024-11-21 11:24:30 +01:00
wangtao@espressif.com
e65acc9510
feat(wifi): fix SPIRAM_IGNORE_NOTFOUND releated config
2024-10-24 19:49:57 +08: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