Dirk Ziegelmeier
051fbea5e6
Fix bug #54805 : IP address can not be obtained over dhcp if PBUF_POOL_BUFSIZE is too small
...
Patch by Christoph Chang
2021-10-03 12:33:58 +02:00
Florent Matignon
214e2d90f3
bug #54700 : Unexpected expiry of pending ARP table entry
...
New etharp queries should restart the 5 second timeout on the ARP
table entry if it is still pending.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
(cherry picked from commit ffbe075d5623c44bbf37618cce78d09ccd4e6760)
2021-10-01 20:31:59 +02:00
Simon Goldschmidt
4022a19cbc
altcp: fix altcp_tcp_close for LISTEN pcb
...
See bug #55219
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
(cherry picked from commit 064d816ea1f526a2f9b4d48eb8b195d1f7e91068)
2021-10-01 19:59:02 +02:00
Simon Goldschmidt
a32ea1e793
dhcp: don't set a default gateway if dhcp server doesn't give one
...
see bug #60578
2021-09-24 12:24:58 +02:00
Simon Goldschmidt
f67f2692d4
mqtt: check data_cb != NULL
2021-09-24 00:36:22 +02:00
Karol Domagalski
3b745f7154
ip4: ip4addr_aton: fix parsing of the octal IP representation
2021-09-24 00:29:45 +02:00
Erik Ekman
d876d3c4df
ip6: Fix incorrect assert in ip6_frag()
...
New test case now passes.
Fixes bug #57374 (Found by Hiromasa Ito).
2021-09-24 00:12:20 +02:00
Erik Ekman
e8b0c52806
ip6: Add test for fragmenting special packet
...
Reproduces bug #57374 (Found by Hiromasa Ito).
2021-09-24 00:12:11 +02:00
Erik Ekman
5bd7518343
netdb: Accept '0' as service in lwip_getaddrinfo
...
Fixes bug #59925
2021-09-23 23:57:32 +02:00
Eric Koldeweij
51265f3f7d
ip6: Fix crash in ip6_output with debug enabled
...
It turns out the crash only occurs if LWIP_DEBUG is enabled. If the
parameter dest is NULL the function tries to find a route using the
destination address of the packet instead. If this fails as well a
debug message is printed but it is still using dest causing a NULL
pointer dereference and crash at src/core/ipv6/ip6.c line 1312.
[erik@kryo.se: Apply fix to ip6_output_hinted as well]
2021-09-23 23:51:01 +02:00
Christoffer Lind
2e4932f23b
dhcp: generate new xid for DHCP release
2021-09-23 23:44:11 +02:00
Simon Goldschmidt
dbd0bc8a2c
netdb: fix alignment warning in debug output
...
see bug #58650
2021-09-15 08:05:41 +02:00
Oliver Hitz
e5627ec649
tcp: make tcp_listen() inherit the netbuf_idx of the original pcb
...
This simple patch causes tcp_listen() to inherit the netbuf_idx setting
of the original pcb. Without this, it is not possible to restrict a
socket to a specific interface using SO_BINDTODEVICE before listening.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2021-09-15 08:03:24 +02:00
Erik Ekman
5c8fd3158d
unit: Support check v0.13.0 and later
...
Function name no longer needs to be fed separately when adding tests.
Also fix collision of non-static net_test variables in dhcp and netif
tests.
2021-08-16 08:56:06 +02:00
Erik Ekman
d5843944cc
netif: Add test for netif_find
2021-08-16 08:45:25 +02:00
Erik Ekman
f62be85576
netif: Add test for netif_is_flag_set()
2021-08-16 08:45:25 +02:00
Simon Goldschmidt
f1bd63046e
api_lib: fix duplicate NULL check with sys_sem_valid()
2021-08-16 08:36:09 +02:00
Simon Goldschmidt
ed6c951a19
Prepare v2.1.3.rc1
...
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
STABLE-2_1_3_RC1
2021-08-15 14:54:38 +02:00
Erik Ekman
ad9e7a6d87
lowpan6: Use arch-independent printf formatters
2021-08-15 12:53:16 +02:00
Thomas Mueller
6f7b26b1a8
Fix typo in definition of netif_is_flag_set() macro
2021-08-15 12:52:46 +02:00
Erik Ekman
ecd6009a5e
icmp6: Don't copy too much data
...
Fix of the fix for bug #58553
2021-08-15 11:05:31 +02:00
Erik Ekman
6ffe30d9ba
icmp6: Fix copying of chained pbuf in reply
...
Fixes bug #58553 , and the newly added unit test.
The pbuf_take_at loop should probably be made into a pbuf library
function, which would avoid this mistake in the future and provide
a simpler implementation of pbuf_copy.
2021-08-15 11:05:16 +02:00
Simon Goldschmidt
8f5a0aaacb
icmp6: keep to the RFC and send as much as possible with icmp6 error messages
...
See bug 56013
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2021-08-15 11:04:23 +02:00
Dirk Ziegelmeier
ba3b04e7fe
Add #define for minimum IPv6 MTU length
2021-08-15 11:03:47 +02:00
Erik Ekman
379d55044e
zepif: Copy possibly chained output pbuf properly
...
Fixes bug #58554
2021-08-15 10:57:17 +02:00
Erik Ekman
843a116155
pbuf: Add pbuf_copy_partial_pbuf library function
...
Like pbuf_copy, but can copy part of a pbuf to an offset in another.
pbuf_copy now uses this function internally.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2021-08-15 10:56:50 +02:00
Simon Goldschmidt
1c6202c414
pbuf: fix allocating large PBUF_RAM
...
See bug #59974
2021-08-15 10:32:21 +02:00
yuanjm
066a2b022d
lwip_selscan: lwip_selscan return -1 without setting errno number
...
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2021-08-15 10:31:40 +02:00
Simon Goldschmidt
aca41b0beb
icmp: Fix copied length in response packets
...
Fixes bug #59364 , reported by Yi Guai
2021-08-15 10:30:20 +02:00
Erik Ekman
b5e8ab6c15
tcp: Fix double free in tcp_split_unsent_seg()
...
Fixes bug #57377 (found by Hiromasa Ito).
2021-08-15 10:24:47 +02:00
Hannes Gredler
896c8a9f72
tcp_out: fix tcp_output_fill_options() arguments
...
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2021-08-15 10:23:06 +02:00
Simon Goldschmidt
59ecea3d8c
Fix last commit for all netif loopback traffic
2021-08-15 10:20:31 +02:00
Nick Ballhorn-Wagner
b1f8ce8769
fix memory leak in netif_loop_output if tcpip_try_callback fails
...
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2021-08-15 10:20:11 +02:00
Patrick Schlangen
8c43d83689
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>
2021-08-15 10:17:44 +02:00
Simon Goldschmidt
87d44bbfcd
sntp: ensure sntp_retry_timeout reaches the configured limit
...
See bug #57620
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2021-08-15 10:17:25 +02:00
Simon Goldschmidt
07d3b3330d
pbuf: avoid using multiple PBUF_POOL buffers for IPv6
...
Use 'PBUF_IP_HLEN+PBUF_TRANSPORT_HLEN' instead of '40' to calculate
PBUF_POOL_BUFSIZE (the size of each PBUF_POOL buffer) since the former
can be 60 when IPv6 is enabled.
See bug #56355
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2021-08-15 10:17:02 +02:00
Simon Goldschmidt
61349cf124
opt: make LWIP_IPV6_SEND_ROUTER_SOLICIT default to LWIP_IPV6
...
This ensures struct netif doesn't contain 'rs_count' if LWIP_IPV6
is disabled but LWIP_IPV6_SEND_ROUTER_SOLICIT is at its default.
See bug #56509
2021-08-15 10:16:40 +02:00
David Girault
7316b26740
sntp: remove existing timeout before creating new
...
This prevents sntp using more than 2 timeouts.
See bug #56431
2021-08-15 10:15:59 +02:00
Axel Lin
d4b3a006dc
netif_find: correctly check if atoi means '0' or error
...
Fixes: 4528215c99ba ("netif_find: check if atoi means '0' or error")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2021-08-15 10:15:38 +02:00
Simon Goldschmidt
2f8886794f
netif_find: check if atoi means '0' or error
...
Since atoi() returns 0 on error, we need to check if name[2] is '0'.
If it's not, atoi() failed.
2021-08-15 10:15:05 +02:00
Christoffer Lind
02ab8c91a9
sys_arch_mbox_tryfetch not validated correctly
...
sys_arch_mbox_tryfetch() shall return SYS_MBOX_EMPTY or 0 according
to the documentation. Wherever the function is used the return
value is incorrectly compared to SYS_ARCH_TIMEOUT. For now
SYS_MBOX_EMPTY is defined to SYS_ARCH_TIMEOUT so this is not an
issue as long as SYS_MBOX_EMPTY isn't re-defined.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2021-08-15 10:14:19 +02:00
Simon Goldschmidt
74ea1e43ca
dhcp: don't use LWIP_ERROR in dhcp_parse_reply()
...
See bug #56643
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2021-08-15 10:11:33 +02:00
Joan Lledó
e9000658fb
IF_NAMESIZE: define it only if it's not defined before by system headers
2021-08-15 10:08:43 +02:00
Simon Goldschmidt
d58e0f1a1a
fix compiling unit tests after adding compile-time check for LWIP_NETCONN_FULLDUPLEX
2021-08-15 10:07:58 +02:00
Simon Goldschmidt
674c4ed080
LWIP_NETCONN_FULLDUPLEX is not alpha any more
2021-08-15 10:07:09 +02:00
Dirk Ziegelmeier
a68d6f1a9a
Fix bug #56136 : The netif->mtu6 was updated by Router Advertisement abnomally
...
Using patch from Gao Quingahui plus improvement
2021-08-15 10:06:37 +02:00
Dirk Ziegelmeier
c0643e21ed
Apply patch for bug #56239 : compile fail when disable TCP
2021-08-15 09:43:40 +02:00
Dirk Ziegelmeier
3fbb84f950
Fix bug #55702 : SSI bug
...
Apply patch from Stanislav
2021-08-15 09:41:43 +02:00
Dirk Ziegelmeier
053f5aa10d
Fix compile of last patch
2021-08-15 09:40:51 +02:00
Dirk Ziegelmeier
6b9264b49e
Fix bug #55972 : The Neighbour Solicitation used to do IPv6 address resolution was wrong
...
Apply patch from Gao Qingshui
2021-08-15 09:40:33 +02:00