Commit Graph

69 Commits

Author SHA1 Message Date
David Cermak
c005b04d1c lwip/dhcps: Support for dynamic dhcp server instances 2022-03-13 19:39:21 +01:00
David Cermak
92f7ecd632 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-08 09:38:42 +01:00
Sudeep Mohanty
a9fda54d39 esp_hw_support/esp_system: Re-evaluate header inclusions and include directories
This commit updates the visibility of various header files and cleans up
some unnecessary inclusions. Also, this commit removes certain header
include paths which were maintained for backward compatibility.
2022-03-07 11:18:08 +05:30
David Cermak
5d7489eae4 lwip: Fix minor lwip dependency issue
Clean-up config option rename file
2022-01-14 16:41:38 +01:00
David Cermak
cfc52bacbc lwip: Cleanup lwipopts flags and options
* Removed unused and flags
* Fixed comments
* Order of flags lwip/esp-specific
* Used 1/0 logic for boolean flags
2022-01-14 16:41:38 +01:00
Liu Han
49cd81ccf3 lwip/dhcp: add configure for enable vendor class identify option
Closes https://github.com/espressif/esp-idf/issues/6786
2021-10-22 11:17:59 +08:00
yuanjm
9e2f15ae51 lwip: Support DHCP option length configuration 2021-09-18 17:24:27 +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 Cermak
457d837b40 lwip: Fix sntp custom options if sntp_get_system_time used 2021-08-23 11:47:44 +02:00
xueyunfei
0d07569fff optimization config option LWIP_TCPIP_CORE_LOCKING 2021-08-18 21:32:13 +08:00
Emil Muratov
34be62665c lwip: menuconfig option to enable ntp servers option request via DHCP
This could be toggled on/off, off is the default.
SNTP debug option. Example update for ntp via DHCP

Signed-off-by: Emil Muratov <gpm@hotplug.ru>
2021-08-02 01:21:35 +03:00
Emil Muratov
80810971c8 lwip menuconfig option for max number of SNTP servers
LWIP has two definess for setting max number of sntp servers:
 - Total number of handled servers
 - max number of sntp's picked via DHCP

by default both values are equal to 1, but could be set separately

Signed-off-by: Emil Muratov <gpm@hotplug.ru>
2021-07-27 22:38:36 +03:00
David Čermák
f86140eb8d Merge branch 'feature/add_rdnss_kconfig' into 'master'
lw-ip: Add ND6 RDNSS DNS server Kconfig option

Closes IDFGH-5209

See merge request espressif/esp-idf!14090
2021-06-24 18:51:43 +00:00
liuhan
7d5ae1ee26 esp_netif: Add CONFIG_LWIP_DHCPS to sperate the code 2021-06-24 09:49:45 +08:00
yuanjm
b0e1a8e752 lwip: Add ND6 RDNSS DNS server Kconfig option
Closes https://github.com/espressif/esp-idf/issues/6982
2021-06-23 10:09:26 +08:00
liuhan
2d80c122b1 lwip: Add CONFIG_LWIP_ICMP and CONFIG_LWIP_ICMP6 to sperate the code 2021-06-21 15:14:19 +08:00
David Cermak
49022e99f5 lwip: Add config for DHCP client id; Fix DNS server idx assert issue
This commit brings two esp-lwip fixes to IDF:

1) Add configuration to disable DHCP client identification
2195f7416f
This config could be used to disable option 61 in DHCP packets, so that
clients will be identified by their  chaddr only.
(This is the lwip upstream original behaviour)

2) Fix server_idx increasing to DNS_MAX_SERVERS and trigger the LWIP_ASSERT
5a567d52f7
When lwip doesn't have DNS server and resolve a domain address, the server_idx
will increase to DNS_MAX_SERVERS, which will trigger the LWIP_ASSERT and make device crash.

Closes https://github.com/espressif/esp-idf/issues/6878
2021-05-07 14:11:51 +02:00
Jiacheng Guo
fd3553b66d lwip: add config options for Thread IPv6 border routing 2021-04-22 06:13:47 +00:00
yuanjm
ef7583517d lwip: Fix LWIP_DEBUG define which is always defined 2021-04-12 14:41:46 +00:00
David Cermak
d6f66465ff lwip: Made LCP ECHO bool for better user experience 2021-04-09 06:53:30 +00:00
xueyunfei
181e87d700 bugfix for assert when tcp send data 2021-03-31 08:59:22 +00:00
David Čermák
3bc3407aeb Merge branch 'bugfix/lwip_ppp_echo_interval_config' into 'master'
lw-IP: added configuration values for echo interval

Closes IDFGH-3098

See merge request espressif/esp-idf!12487
2021-03-18 11:59:07 +00:00
Jiri Schiebel
ece7cb4545 lwip: added configuration values for echo interval 2021-03-17 17:54:30 +00:00
Jiri Schiebel
0c58d5fc6a lwip: added config option to enable LWIP_NETIF_API 2021-03-17 17:53:07 +00:00
yuanjm
d80db218da lwip: Add LWIP_IPV6 macro to strip IPv6 function in LWIP component 2021-02-23 18:26:03 +08:00
xueyunfei
b50fca4aa0 optimization dhcp key state transition message 2021-01-25 03:54:20 +00:00
Krzysztof Budzynski
e277d8ef23 Merge branch 'bugfix/esp_sntp_header' into 'master'
docs: Add esp_sntp to API reference as it's default idf header

Closes DOC-854

See merge request espressif/esp-idf!11796
2021-01-13 10:28:39 +08:00
David Čermák
76f6dd6214 lwip: Moved default SNTP API to esp_sntp.h
and make sntp.h in port folders of lwip component obsoleted
2021-01-13 10:28:34 +08:00
David Cermak
9ffa9cce73 lwip: Add warning to use ESP_IDF_LWIP_HOOK_FILENAME if LWIP_HOOK_FILENAME defined 2021-01-08 14:28:21 +00:00
ryan kurte
85083ddc3d lwip: Added debug config options for DHCP and TCP 2020-12-18 16:38:59 +00:00
ryan kurte
5d91a27a1e lwip: Added KConfig option to control checksum validation on IP/UDP/ICMP
This maintains the current default, but could be swapped if desired

Merges https://github.com/espressif/esp-idf/pull/6187
2020-12-18 16:38:59 +00:00
Jiang Jiang Jian
a16d1e8f1a Merge branch 'fixbug/baidu_tcp_recv_assert' into 'master'
lw-ip:fixbug/baidu tcp recv assert

Closes WIFI-2802

See merge request espressif/esp-idf!11287
2020-12-14 16:48:24 +08:00
Paweł pidpawel Kozubal
cf60ec0ffc lwip: Added support for configurable LwIP hooks
Added lwIP hooks which could be optionally overwritten in the
application code. These three options are provided in Kconfig:
* NONE: No hook support
* DEFAULT: Default implementation is provided. If IDF doesn't
have a specific hook implementation, an empty stub is provided, which
could be overwritten by strong implementation in application code.
* CUSTOM: Hooks are declared only to be implemented in application code.

Merges https://github.com/espressif/esp-idf/pull/6034
2020-11-26 12:02:00 +00:00
xueyunfei
3b6014f5a0 fix bug for tcp recv assert 2020-11-19 12:16:49 +08:00
Mahavir Jain
58c33f3bdf lwip: provide configuration option to enable TCP ISN hook 2020-10-23 05:11:33 +00:00
ChenJianxing
bf48acc284 lwip: fix IPv6 ND6 queue too much pkts cause no mem issue and add menuconfig item for this params. 2020-08-16 22:08:07 +08:00
David Cermak
1a41545c3e esp-netif: SLIP interface refactor to isolate interface from drivers 2020-07-15 15:46:46 +02:00
David Cermak
13de11fb32 lwip: Added debug config options to enable lwIP low level debugging 2020-07-15 15:46:46 +02:00
ryan
266be00254 esp-netif: Added esp_netif slip support, slip_modem component and example
Merges https://github.com/espressif/esp-idf/pull/4985
2020-07-15 15:46:46 +02:00
xueyunfei
a202bfe78e fix bug for ipv6 fragment 2020-06-30 08:58:08 +00:00
yuanjm
533bb3c46d feat(lwip): make LWIP TCP rto time configurable 2020-06-16 13:16:17 +00:00
xueyunfei
df43a1affc add LINGER to menuconfig 2020-05-25 11:23:03 +08:00
David Čermák
d043674b2b Merge branch 'feature/lwip_napt_forward' into 'master'
lw-IP: NAT support

Closes WIFI-931

See merge request espressif/esp-idf!7681
2020-04-16 03:03:00 +08:00
David Cermak
6aabfd50d5 pppos_client: support for PPPAUTHTYPE_NONE
Closes https://github.com/espressif/esp-idf/issues/4616
Closes WIFI-1652
2020-04-14 21:46:07 +02:00
David Cermak
94d320473c LwIP: NAPT functionality
Adds Kconfig option to enable experimental NAPT feature for IP packet
forwarding across interfaces.

Closes https://github.com/espressif/esp-idf/issues/1527
2020-04-14 16:04:37 +02:00
Francesco Giancane
872272e23a lwip: make IPV6 link-local support over PPP configurable
Make the link local negotiation for IPV6 in PPP optional and
configurable.
This is because some modems do not support the IPV6 negotiation and
sending IPV6CP frames would in some cases break the network
configuration phase, resulting in a timeout during the Phase Network.

Please note that this does not disable the IPV6 support for the outgoing
communication (IPV6 is still enabled even if this option is not
selected) but just for the local link between lwIP and modem.

Signed-off-by: Francesco Giancane <francesco.giancane@accenture.com>

Merges https://github.com/espressif/esp-idf/pull/4782
Closes https://github.com/espressif/esp-idf/issues/1065
2020-03-05 18:46:48 +00:00
xiehang
a4b16213ad lw-ip: Add option to ipv6 stateless address configuration 2020-02-20 14:30:21 +08:00
xueyunfei
d8d2991692 feature for add tcp sack 2020-01-09 13:58:08 +08:00