783 Commits

Author SHA1 Message Date
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
wanlei
3cf069c7d8 feat(esp32c61): disable unsupported build test 2024-07-16 16:06:19 +08:00
David Cermak
1f14018c30 feat(lwip): Add support for PPP Auth using mbedTLS
Closes https://github.com/espressif/esp-idf/issues/13597
2024-07-12 10:43:57 +02:00
David Čermák
6a75241bf1 Merge branch 'feat/esp_netif_dns_switch' into 'master'
fix(esp_netif): Restore DNS servers when choosing the default netif

Closes IDFGH-4440

See merge request espressif/esp-idf!30996
2024-07-08 16:41:16 +08:00
David Cermak
6acdb384f6 fix(esp_netif): Restore DNS servers per netif when setting it default
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: git log --oneline aa4f6e78..3a3d1fb3
- dns: Allow storing dnsserver per netif (espressif/esp-lwip@3a3d1fb3)
2024-07-04 10:37:22 +02:00
Rodrigo Silva
48295d31ca change: bump max sockets in lwip Kconfig
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
2024-06-28 21:19:47 +08:00
David Čermák
06c685fc96 Merge branch 'fix/lwip_eth_deps' into 'master'
fix(lwip): Cleanup lwip -> Ethernet dependencies

See merge request espressif/esp-idf!31649
2024-06-28 19:08:47 +08:00
David Cermak
72c389f771 fix(lwip): Cleanup lwip -> ethernet dependencies 2024-06-20 17:00:19 +02:00
David Cermak
70645836fc fix(lwip): Cleanup freertos port to use more readable checks
It also removes incorrect comment that's not valid any more (leftover from 6933c103e54)
It also removes ESP_THREAD_SAFE macro and sys_mbox_set_owner() which were not used
It also fixes CID 460613: Uninitialized pointer read in api_lib.c, netconn_gethostbyname_addrtype
Updated lwip submodule: git log --oneline 4297782b..aa4f6e78
* api_msg: Fix unused local variable if LWIP_NETCONN_SEM_PER_THREAD=1 (espressif/esp-lwip@aa4f6e78)
2024-06-20 08:57:25 +02:00
Alexey Lapshin
23b726acbd fix(lwip): fix gcc -fanalyzer warnings 2024-06-07 15:00:44 +07:00
Jiang Jiang Jian
2324dbdcae Merge branch 'bugfix/fix_dhcp_pool_issue_on_dhcp_server' into 'master'
fix(lwip): fixed the dhcp pool error on dhcp server

Closes IDF-9977

See merge request espressif/esp-idf!30987
2024-06-03 11:18:01 +08:00
Abhik Roy
7b25f38fd4 feat(lwip): Added multiple dns ip support 2024-05-27 20:56:01 +10:00
zhangyanjiao
eaef3a2683 fix(lwip): fixed the dhcp pool error on dhcp server 2024-05-27 14:51:00 +08:00
Abhik Roy
67440fa4e9 fix(lwip): Fixed compilation error referencing undefined POSIX interface API
Closes https://github.com/espressif/esp-idf/issues/13577
2024-05-10 23:05:36 +10:00
David Cermak
a8eed53bc2 fix(lwip): Fix null dereference if we cannot allocate semaphore
* Update submodule: git log --oneline f7922143..a1bd9e44
Detailed description of the changes:
  - api_msg: Fix crash to fail-safe error if cannot get semaphore (espressif/esp-lwip@a1bd9e44)
2024-05-09 21:48:00 +08:00
David Čermák
31253679d9 Merge branch 'bugfix/bind_dhcps_netif' into 'master'
fix(lwip/dhcp_server): Bind dhcps netif to avoid handling the dhcp packet from other netif

See merge request espressif/esp-idf!30537
2024-05-09 19:44:19 +08:00
jkingsman
3035ce294d feat(esp_netif): add support for DHCP Option 114 captive portal URI
DHCP Option 114 provides a modern method of indicating a captive
portal redirect to DHCP client. This introduces Option 114 to
the DHCPS component as well as provides examples for usage.
2024-05-02 22:50:09 +08:00
Xu Chun Guang
294b418686 docs: Correct spell error in comment 2024-04-28 17:48:04 +08:00
Xu Chun Guang
226c7772b8 fix(lwip/dhcp_server): Bind dhcps netif to avoid handling the dhcp packet from other netifs 2024-04-28 16:28:48 +08:00
laokaiyao
65b1fd33d3 ci(esp32c5mp): disable the unsupported tests 2024-04-07 12:13:29 +08:00
Jiang Jiang Jian
fde8c8d0f8 Merge branch 'feat/sntp_init_delay' into 'master'
feat(lwip): SNTP: Add support for adjusting startup delay

Closes IDF-8790

See merge request espressif/esp-idf!29688
2024-04-01 17:16:28 +08:00
David Cermak
199d416bc5 feat(lwip): SNTP: Add support for adjusting startup delay 2024-03-15 16:58:54 +01:00