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
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>
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>
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
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
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>
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>
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>