Commit Graph

576 Commits

Author SHA1 Message Date
zhangyanjiao
75b4fb5a66 feat(lwip): add fall back dns config in menuconfig
Closes https://github.com/espressif/esp-idf/issues/12530
2024-01-25 11:21:28 +08:00
Jiang Jiang Jian
2acfd88a47 Merge branch 'bugfix/change_default_value_for_ip_ttl_4.4' into 'release/v4.4'
Fix(lwip):bugfix for change default value for ip ttl 4.4

See merge request espressif/esp-idf!28398
2024-01-18 11:11:02 +08:00
Xue yun fei
d54c947628 Fix(lwip):bugfix for change default value for ip ttl 2024-01-11 14:35:36 +08:00
Xue yun fei
c392dad1dc optimize(lwip):when psram is enable the number of ooseq is not limited 2023-12-15 15:54:31 +08:00
Jiang Jiang Jian
c452233a6e Merge branch 'fix/lwip_dns_fallback_ipv4only' into 'release/v4.4'
lwip: Fix DNS int with FALLBACK_DNS() in IPv4 only (v4.4)

See merge request espressif/esp-idf!27544
2023-12-12 14:38:48 +08:00
xueyunfei
083eb06028 Fix(lwip):bugfix for add config for tcp ooseq bufs 2023-12-08 19:13:11 +01:00
xueyunfei
0a1282bd24 fix(dhcp server):fix set dhcp server poll fail issue 2023-12-04 14:22:35 +08:00
David Cermak
ffddf278f5 lwip: Fix DNS int with FALLBACK_DNS() in IPv4 only
* Update submodule: git log --oneline 90c1e93e40bdfe6718b97e2d95aabc2f0f609ce8..1de11efadd0083469f26c8782be3d55073829767

Detailed description of the changes:
  - dns: fix init with only ipv4 enabled (espressif/esp-lwip@1de11efa)
  - optimize add TCP ooseq buf timeout configuration (espressif/esp-lwip@d3c89e93)
  - bugfix for optimize tcp connection (espressif/esp-lwip@d5093349)
2023-11-30 14:28:10 +01:00
David Cermak
c9de8b1cef feat(lwip): Add sbom descripton file for Software BOM (v4.4)
* Update submodule: git log --oneline 0f2d472722aaa0cab6e8a72896699541e65bd45b..90c1e93e40bdfe6718b97e2d95aabc2f0f609ce8

Detailed description of the changes:
  - Add sbom descripton file for Software BOM (espressif/esp-lwip@90c1e93e4)
2023-10-31 06:49:00 +01:00
Jiang Jiang Jian
0b31c7ab79 Merge branch 'feat/imporve_iperf_performance_v4.4' into 'release/v4.4'
feat(wifi): optimize iperf performance (Backport V4.4)

See merge request espressif/esp-idf!26404
2023-10-19 10:31:40 +08:00
xuxiao
b25e486cd6 feat(wifi): optimize iperf performance (Backport V4.4) 2023-10-13 11:36:03 +08:00
Abhik Roy
ea3dd4c393 napt: restore to the initial state in deinit
This bug casue NAPT not work as normal after deinit then reinit
2023-10-06 20:13:20 +11:00
xueyunfei
6a1ded6302 fix(dhcp server): Fix dhcp server address pool issue 2023-07-26 12:48:20 +08:00
xueyunfei
9a942e6a1b Backport some lwip bugs for 4.4
* Update submodule: git log --oneline 8290c3b8f2adaf82aa45ec992b87f16205f2689b..4f24c9baf9101634b7c690802f424b197b3bb685

Detailed description of the changes:
- lower the dhcp discover and request retry backoff time (esp-lwip@4f24c9ba)
- netdb:fixed bug for getaddrinfo returns null when IPV4 mapped address (esp-lwip@a4d70c7e)
2023-07-26 12:42:57 +08:00
Abhik Roy
c781fda86f lwip/dhcp: Fixed ondemand fine timers leakage bug.
Fixed ondemand fine timers bug, that allowed
only one dhcp client to run at a time without issue.
2023-04-24 18:09:59 +10:00
David Cermak
35eeb04829 lwip: Add missing esp_sntp_enabled() 2023-03-21 10:31:25 +01:00
David Cermak
079611dd16 lwip/sntp: Fix esp_sntp_ API races (v4.4)
Some of the esp_sntp_...() APIs that wrap lwip's SNTP
module use tcpip_callback() to execute the lwip functionality
in the correct state (either with locked TCP/IP core,
or within the TCP/IP thread).
tcpip_callback() however doesn't wait for completion of the callback,
which doesn't prevent from using the stack variables after destroy
if used as a parameter.
Introduced in a71fa82.
Fixed by using of tcpip_api_call() instead of the tcpip_callback().

Closes https://github.com/espressif/esp-idf/issues/10611
2023-03-21 10:31:25 +01:00
David Cermak
29b8a00c0a esp_netif/lwip: Fix core-locking config (v4.4)
* Fix thread safety issues in non-core locking
* Add option to verify thread safety issues in lwip (core-lock assertion)
* Make esp_sntp.h thread safe API
* Fix sntp example
(v4.4 - fixes minor merge issue that duplicated
DHCP_DEFINE_CUSTOM_TIMEOUTS and DHCP_REQUEST_TIMEOUT_SEQUENCE)

Closes https://github.com/espressif/esp-idf/issues/9908
Closes https://github.com/espressif/esp-idf/issues/10502
Closes https://github.com/espressif/esp-idf/issues/10466
2023-03-21 10:31:20 +01:00
xueyunfei
8331ae8586 lwip: solve some routers do not forward multicast packet issue 2023-03-14 19:03:23 +08:00
xueyunfei
9403854bed tcp_in/ooseq: Fix incorrect segment trim when FIN moved
* Update submodule: git log --oneline a7abf28e02282b32479f4bbaf2d90f09d2a60f4c..6bb132e3797d5449a923804c75c57d458920f8ac

Detailed description of the changes:
  - tcp_in/ooseq: Fix incorrect segment trim when FIN moved (esp-lwip@6bb132e3)
  - api_msg: fix tcp_abort thread safety (esp-lwip@53a6e019)
2023-03-14 18:46:00 +08:00
xueyunfei
109eec4033 dhcp server:bugfix softap excedes the range of subnet 2023-03-14 18:45:43 +08:00
xueyunfei
4186c9a0fc lwip:optimization dhcp coarse timer 2023-03-02 08:44:07 +00:00
zhangyanjiao
85bf17d7e2 lwip: fix the bug that long time to get IP 2022-12-07 11:24:13 +08:00
xueyunfei
2e17ad62b8 lwip:optimization dns ipv4 ipv6 timer
* Update submodule: git log --oneline * Update submodule: git log --oneline 6132c9755a43d4e04de4457f1558ced415756e4d..79182163e9e77547e58a6aa34db94902b9812cb3
Detailed description of the changes:
  - dhcp: optimization fine timer when dhcp start(esp-lwip@79182163)
  - ip6 timer: optimization lwip ip6 reassembly timer (esp-lwip@c943fc5a)
  - ip4 timer: optimization lwip ip4 reassembly timer (esp-lwip@17f41c9f)
  - dns timer: optimization lwip dns timer (esp-lwip@7f5ab42c)
2022-12-06 17:30:47 +08:00
xueyunfei
a165866372 Lwip:add TCP Fin2 timeout configuration
* Update submodule: git log --oneline 76303df2386902e0d7873be4217f1d9d1b50f982..6132c9755a43d4e04de4457f1558ced415756e4d

Detailed description of the changes:
  - napt: Fix clean compilation  (espressif/esp-lwip@6132c975)
  - Lwip:add TCP Fin2 timeout configuration (espressif/esp-lwip@15b4400e)
  - napt: Fix IP forwarding when forward netif enable NAPT (espressif/esp-lwip@c950063f)
  - napt/stats: Move some napt counters to stats module (espressif/esp-lwip@475d658a)
  - ip_napt_maint: Fix timestamp overflow handling (espressif/esp-lwip@2e904508)
  - napt: Fixes and improvements (espressif/esp-lwip@fb1f3552)
2022-11-01 10:46:15 +08:00
xueyunfei
8ddc482f28 lwip:bugfix for increase ping task stack size 2022-11-01 10:46:09 +08:00
xueyunfei
f8a4504bc5 Icmp: get tos parameter in icmp reply
bugfix for add ttl for ping socket
2022-07-11 20:24:18 +08:00
Jeff H
101762718a add option to route LWIP logs through ESP_LOG interface
Signed-off-by: xueyunfei <xueyunfei@espressif.com>

Merges https://github.com/espressif/esp-idf/pull/8785
Closes https://github.com/espressif/esp-idf/issues/8361
2022-07-11 19:26:41 +08:00
Jiang Jiang Jian
3a5e9d5ce1 Merge branch 'feature/add_mld6_flag_for_eth_v4.4' into 'release/v4.4'
feat(netif): Add NETIF_FLAG_MLD6 flag for eth netif (backport v4.4)

See merge request espressif/esp-idf!18266
2022-06-09 10:59:21 +08:00
yuanjm
ad176653a0 fix(Kconfig): Fix lw-ip Kconfig display garbled characters 2022-05-30 16:21:09 +08:00
yuanjm
8215bd6670 feat(netif): Add NETIF_FLAG_MLD6 flag for eth netif 2022-05-26 16:07:50 +08:00
David Čermák
677a01851f Merge branch 'bugfix/security_update_pppos_crash_v4.4' into 'release/v4.4'
lw-ip: Apply security fixes from upstream; Fix PPPoS and NAPT ip-forward (v4.4)

See merge request espressif/esp-idf!17419
2022-04-19 15:45:31 +08:00
Ondrej Kosta
ba62cbc04f Fixed Ethernet lwIP netif error indication 2022-04-06 10:44:31 +00:00
David Cermak
47414efe0b lwip: Security fixes; PPPoS null-deref; NAPT ip-forward
* Cherry-pick important fixes to 2.1.2-esp
  - CVE-2020-22283: Attacker could craft a packet that would disclose 8 bytes of some heap memory:
    - icmp6: Don't copy too much data
    - icmp6: Fix copying of chained pbuf in reply
    - icmp6: keep to the RFC and send as much as possible with icmp6 error messages
  - CVE-2020-22284: ZEP - ZigBee Encapsulation Protocol/6LoWPAN is not supported in IDF,
    the netif module (zepif.c) is not included in the build, but users can still inject
    the file into compilation process, implement IO interface and use this.
    - zepif: Copy possibly chained output pbuf properly
    - Add #define for minimum IPv6 MTU length
    - pbuf: Add pbuf_copy_partial_pbuf library function
* PPPoS: Fix null-deref when processing double break packet
  - pppos: fix in_tail null (espressif/esp-lwip@537c69d5)
  - PPP: Add test exhibiting empty packet null-deref (espressif/esp-lwip@202a07da)
* NAPT: Fix PBUF_REF type to clone the pbuf before forwarding
  - IP-FORWARD: If packet-type is PBUF_REF clone it before forwarding
  - Add NAPT unit test to exercise NAT feature for both RAM and REF pbuf types
* version: Update version numbers to match 2.1.2-esp

* Update submodule: 2749568fe1...76303df238
  - test/napt: Add unit test for IP forward with PBUF_REF (espressif/esp-lwip@76303df2)
  - napt: Fix PBUF_REF type to clone the pbuf before forwarding (espressif/esp-lwip@39068263)
  - version: Update version numbers to match 2.1.2-esp (espressif/esp-lwip@2b922919)
  - pppos: fix in_tail null (espressif/esp-lwip@537c69d5)
  - PPP: Add test exhibiting empty packet null-deref (espressif/esp-lwip@202a07da)
  - pbuf: Add pbuf_copy_partial_pbuf library function (espressif/esp-lwip@1c9cd9c1)
  - Add #define for minimum IPv6 MTU length (espressif/esp-lwip@d2dc577b)
  - zepif: Copy possibly chained output pbuf properly (espressif/esp-lwip@64ab7f2a)
  - icmp6: Don't copy too much data (espressif/esp-lwip@4a64731b)
  - icmp6: Fix copying of chained pbuf in reply (espressif/esp-lwip@7c822ff4)
  - icmp6: keep to the RFC and send as much as possible with icmp6 error messages (espressif/esp-lwip@29100ab6)
  - dns: Add API to clear dns cache (espressif/esp-lwip@ee59f77d)
  - CI: Fixed adding gitlab key (espressif/esp-lwip@5a2bdba7)
  - test case: modify test case test_tcp_new_max_num_remove_FIN_WAIT_1 (espressif/esp-lwip@6b090f7d)

Closes https://github.com/espressif/esp-idf/issues/8300
Closes https://github.com/espressif/esp-idf/issues/8451
2022-03-11 06:05:39 +00:00
yuanjm
3ebb1a2a00 lwip: Update LWIP_DHCP_OPTIONS_LEN default value when LWIP_DHCP_DISABLE_VENDOR_CLASS_ID disabled
Closes https://github.com/espressif/esp-idf/issues/7742
2021-12-03 17:23:35 +08:00
Liu Han
89873937eb lwip/dhcp: add configure for enable vendor class identify option
Closes https://github.com/espressif/esp-idf/issues/6786
2021-11-02 18:02:22 +08:00
xueyunfei
e451a9b2e1 add function for deinit lwip timers 2021-10-13 15:49:47 +08:00
David Čermák
d1ac84e68e Merge branch 'bugfix/lwip_move_icmp_tests_from_eth' into 'master'
CI/lw-ip: Move ICMP test cases from eth component

Closes IDF-3863

See merge request espressif/esp-idf!15200
2021-10-01 07:06:32 +00:00
David Cermak
8b45ac0fbc lwip: Add ping test case (moved from eth component) 2021-09-22 15:22:18 +02:00
yuanjm
9e2f15ae51 lwip: Support DHCP option length configuration 2021-09-18 17:24:27 +08:00
Sudeep Mohanty
0912df611f freertos: updated the location of FreeRTOSConfig.h
Moved FreeRTOSConfig.h from include/freertos to include/esp_additions/freertos.
Updated FreeRTOS.h file to include FreeRTOSConfig.h without the
freertos/ prefix to match with the upstream file.
Renamed architecture specific FreeRTOSConfig.h files to FreeRTOSConfig_arch.h

Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2021-09-14 08:46:01 +05:30
yuanjm
f2d32d5c0a dhcpserver: support cplusplus
Closes https://github.com/espressif/esp-idf/issues/7494

Merges https://github.com/espressif/esp-idf/pull/7526
2021-09-08 15:52:12 +08:00
David Cermak
213727c4f2 lwip: IPv6: Add support for DHCPv6 stateless config
Closes https://github.com/espressif/esp-idf/issues/5245
2021-09-07 14:48:21 +08:00
Jiang Jiang Jian
cec0f5edfb Merge branch 'optimization/config_option_LWIP_TCPIP_CORE_LOCKING' into 'master'
optimization config option LWIP_TCPIP_CORE_LOCKING

Closes IDF-2478

See merge request espressif/esp-idf!11809
2021-08-25 08:52:43 +00:00
David Cermak
e54523708d Merge branch 'master' into feature/lwip_sntp_max_servers 2021-08-24 18:16:07 +02:00
David Čermák
756cc4f8dc Merge branch 'bugfix/esp_sntp_declare' into 'master'
lw-ip: Fix sntp custom options if sntp_get_system_time used

Closes FCS-710

See merge request espressif/esp-idf!14556
2021-08-23 15:11:26 +00:00
David Cermak
457d837b40 lwip: Fix sntp custom options if sntp_get_system_time used 2021-08-23 11:47:44 +02:00
David Čermák
ab077df865 Merge branch 'feature/lwip_fstat' into 'master'
lw-ip: Add partial fstat vfs support to set st_mode

Closes IDFGH-5459

See merge request espressif/esp-idf!14854
2021-08-20 13:41:09 +00:00
David Cermak
d55ed5c11b lwip: Add partial fstat vfs support to set st_mode
Closes https://github.com/espressif/esp-idf/issues/7198
2021-08-19 17:29:29 +02:00
ivmarkov
ee531c748a lwip: Fix ICMP Ping on specific iface
Fix broken parentheses in setsockopt call

Merges https://github.com/espressif/esp-idf/pull/7397
2021-08-19 09:55:26 +02:00