Commit Graph

6309 Commits

Author SHA1 Message Date
Jacques_Zhao 424a1d02c3 Add dhcp option 61
If OPTION 61 is not included during DHCP lease renewal, some routers
will close the link.
2025-02-17 10:27:55 +08:00
xueyunfei 2c9c531f0a bugfix for assert when tcp send data 2021-03-24 17:46:29 +08:00
yuanjm 9ba867277a lwip_selscan: lwip_selscan return -1 without setting errno number
Closes https://github.com/espressif/esp-lwip/issues/27

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2021-01-29 10:28:22 +08:00
David Cermak d050c33133 tcp_in: Flag the pcb as closing if TCP_EVENT_CLOSED refused
Closes https://github.com/espressif/esp-lwip/issues/18
2021-01-27 15:24:57 +08:00
Erik Ekman 9f382dc34d netdb: Accept '0' as service in lwip_getaddrinfo
Closes https://github.com/espressif/esp-lwip/issues/28
2021-01-26 11:32:49 +08:00
xueyunfei 2117f049dc Add dhcp option 61 2021-01-25 15:57:24 +08:00
xueyunfei 9c62fd4e22 optimization dhcp key state transition message 2021-01-20 14:29:50 +08:00
xueyunfei 595aef0d20 Add feature for dhcp MTU judgement 2020-12-22 10:33:27 +08:00
Rob Connolly 01d0ecff2d Fix SLIP RX linked list append.
Append to the linked list of pbuf objects was broken so that the second
(and subsequent) packets received in a SLIP transaction would be
appended to themselves and consequently lost.

This resulted in these packets being dropped and the system suffering
extreme memory leakage.

Merges https://github.com/espressif/esp-lwip/pull/25
2020-12-15 16:17:02 +08:00
xueyunfei 7285b846a2 fix bug for tcp recv assert 2020-11-19 11:02:59 +08:00
xueyunfei 889c3875bf bugfix for ipv6 ping error when src ip miss 2020-09-29 17:15:06 +08:00
xueyunfei 4fd84abace ipv6 send multicast data fail when src address is nul 2020-09-18 14:23:33 +08:00
yuanjm de3e942f4b fix(dhcp): Fix dhcp renew fail in t1 and will renew ip in t2 every 1s util renew successful. 2020-09-18 11:12:16 +08:00
Angus Gratton f13c986a20 tcp: Fix assertion if tcp_kill_state() is called from tcp_alloc() to clean FIN_WAIT sockets
As reported on GitHub: https://github.com/espressif/esp-idf/issues/1194#issuecomment-585251932
2020-08-21 01:43:32 +08:00
Axel Lin b1eec77be7 igmp/mld6: Fix build warnings when !ESP_LWIP_IGMP/MLD6_TIMERS_ONDEMAND
Fix below build warnings:
warning: 'igmp_timeout_cb' defined but not used [-Wunused-function]
warning: 'mld6_timeout_cb' defined but not used [-Wunused-function]

Signed-off-by: Axel Lin <axel.lin@gmail.com>
2020-08-21 01:41:30 +08:00
ChenJianxing 80d6d19a92 fix IPv6 ND6 queue too much pkts issue. 2020-08-16 22:04:53 +08:00
xiehang 602d25c525 lwip: fix udp tx packet loss issue 2020-08-07 11:23:58 +08:00
Patrick Schlangen ffd1059c9a Fix select_waiting not being decremented for sockets closed while in lwip_select()
See bug #57445. Short version of the description there: lwip_select() failed
to decrement 'select_waiting' of a socket since that code part failed on
'free_pending' sockets. However, the code does not have to check that as it
has marked the socket to be in use itself earlier.

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2020-07-15 11:30:06 +08:00
xueyunfei 5b2072ebb8 fix bug for ipv6 frangment 2020-06-17 15:17:48 +08:00
yuanjm 64b640ecae feat(tcp): make tcp rto configurable 2020-05-22 17:31:10 +08:00
xueyunfei 50e4e0d182 fixbug for tcp kill state assert 2020-04-23 15:37:08 +08:00
David Cermak 754b8d5dcb napt/tests: add ip4 routing tests
Added tests:
- lwip native ip-forward tests
- napt feature test udp, tcp
- napt feature, test add/release of nat records

Testing configurations: lwip unit tests are executed in the following
three configurations:
- default
- IP_FORWARD=1
- IP_FORWARD=1 & IP_NAPT=1
Note that debugging option ESP_TEST_DEBUG was introduced to enable running only
IP-FORWARD/IP-NAPT tests with verbose output
2020-04-08 11:59:44 +02:00
David Cermak 4b4d6b2871 napt: cosmetic updates on NAPT functionality implemented by martin-ger
Overview of the changes:
- moved NAPT specific code from ip4.c to ip4_napt.c
- formatting updates to keep the changes easier to review
- updated per C-90 style used for lwip upstream (fixed warning,
renaming, lwip types)
- esp_random() -> LWIP_RAND()
- drop the connection with routing err if failed to add new napt record
- prepared for lwip unit testing
2020-04-08 11:59:44 +02:00
martin-ger a3cacab60e napt: added NAPT patches to 2.1.2
Closes https://github.com/espressif/esp-idf/issues/1527
Closes IDFGH-146
2020-04-08 11:59:44 +02:00
xueyunfei 5c181728c8 optimization TCPv6 connect 2020-03-20 14:48:11 +08:00
David Cermak 2472862eb3 sync issues and pull request to jira 2020-03-20 01:31:37 +08:00
Axel Lin b9cb35bb5d pppapi: Add #if PPP_AUTH_SUPPORT guard for pppapi_set_auth()
The ppp_set_auth() is guarded by PPP_AUTH_SUPPORT, so the pppapi_set_auth
and pppapi_do_ppp_set_auth should also use the same #if guard.

This fixes build error if ESP_PPP is set but both PAP and CHAP are disabled.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
2020-03-20 01:26:07 +08:00
Github Security Lab 44af234a80 vallen is verified to be less than len, therefore, it can never
be the case that `vallen >= len + sizeof(rhostname)`.

This PR fixes the check so the `rhostname` array does not overflow.

Reported-by: Github Security Lab <securitylab@github.com>
Signed-off-by: Alvaro Muñoz <pwntester@github.com>
2020-03-20 01:23:36 +08:00
xueyunfei dd3b301750 fix bug for after udp close select_waiting assert 2020-03-09 18:15:02 +08:00
xueyunfei 076270e732 fix bug for netconn marked close crash 2020-03-06 11:57:43 +08:00
Logan Gunthorpe 13665c14e1 core/ipv4/dhcp: Set hostname for DISCOVER packets
If the hostname is not set in the DISCOVER packet, then some servers might
issue an OFFER with that it will reject when the hostname is presented in
the REQUEST packet.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: xueyunfei <xueyunfei@espressif.com>
2020-03-02 10:58:13 +08:00
xueyunfei 276baa3ea6 fix ipv6 bug when input the wrong broadcast 2020-02-25 17:21:54 +08:00
xueyunfei 893aa7f3e0 fix bug for crash when socket lock not initialized 2020-02-13 17:59:52 +08:00
xiehang 066ffe0abb lwip: Enable IPv6 stateless address autoconfiguration 2020-01-09 16:54:54 +08:00
xiehang b4eaf11fe5 lwip: Drop packets larger than MTU 2020-01-02 18:00:53 +08:00
xueyunfei c9e3b53c6f optimize tcp random close 2019-12-10 11:51:35 +08:00
xueyunfei d2e4de7e45 bugfix for improve_performance 2019-11-30 11:29:47 +08:00
xueyunfei 31e24ae95a fix bug for ramdom tcp crash 2019-11-26 19:26:44 +08:00
David Cermak c483f30ba2 dhcp state restore 2019-11-06 16:54:12 +01:00
David Cermak ca011b417b tcpip adapter refactor: notify pbuf free with netif pointer to make if object-wise 2019-11-06 16:54:12 +01:00
xueyunfei f2bd195eed fix bug for close nonblocking socket crash 2019-10-29 16:14:49 +08:00
ronghulin 32b1aaf280 dhcp_timeout: change the timeout type u16 to u32 2019-10-17 17:45:27 +08:00
David Cermak 89932176f5 autoip: used Kconfig parameters instead of constants to be in line with previous esp-lwip port and to have the BCT passed 2019-10-10 10:08:24 +02:00
xueyunfei 8c801667e8 fix bug for nonblocking udp is zero 2019-08-21 11:06:31 +08:00
xueyunfei 663b2fdb41 Try to allocate some LWIP memories in SPIRAM first. If failed, try to allocate in internal RAM then 2019-08-05 11:17:39 +08:00
xueyunfei 61d840ff47 fix bug for ipv6 MULTICAST 2019-07-15 14:55:19 +08:00
xueyunfei bafc54f69b add gitlab-ci.yml files 2019-07-03 16:01:46 +08:00
xueyunfei 1f9a2acef9 fix bug for udp send error 2019-07-02 15:24:25 +08:00
xueyunfei c23e4b05ce add code for sending gratuitous ARP periodically 2019-07-01 20:34:51 +08:00
xueyunfei e3a797c057 optimize: IGMP and MLD6 Timer optimization config added 2019-07-01 19:16:02 +08:00