Commit Graph

6183 Commits

Author SHA1 Message Date
Simon Goldschmidt
d0efd9ef7b tcpip: fix that TCPIP_CORE_LOCK is not released for LWIP_TIMERS==0
See bug #65328

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2024-02-19 21:44:18 +01:00
Krzysztof Mazur
e799c266fa makefsdata: extend file type matching with .shtml and .shtm
[Problem]
When using makefsdata perl script to convert shtml files with SSI tags
the shtml files get generated with text/plain content type, making
browsers not render them correctly

[Solution]
Extend the regex to generate text/html content type for any of:
.htm, .html, .shtm, .shtml extensions
2024-02-19 20:58:58 +01:00
Kirill Lokotkov
93821fc437 Fixed netdb.c when LWIP_SOCKET_HAVE_SA_LEN == 0
Fields sin6_len and sin_len are always used in the file but not all implementations of sockaddr_in or sockaddr_in6 have this fields (including Linux implementation).
Added #if-check to avoid compilation errors in such cases.
2024-02-19 18:13:28 +01:00
Kirill Lokotkov
7c494b3829 Added "lwip/errno.h" to netdb.c includes
Defines EINVAL and ERANGE are used in the file but not included directly. When I try to use <sys/socket.h> and <arpa/inet.h> as LWIP_SOCKET_EXTERNAL_HEADERS it causes errors with this defines.
2024-02-19 18:13:28 +01:00
Simon Goldschmidt
347054b329 Fix C++ compatibility of newly added function lwip_memcmp_consttime() 2024-01-09 21:26:40 +01:00
Simon Goldschmidt
c167a54540 ppp: use constant-time memcmp for checking credentials
See #65119
2024-01-09 21:23:11 +01:00
Simon Goldschmidt
25de99d1c1 Introduce constant-time memcmp and use it for snmpv3_get_engine_boots
See #65118
2024-01-09 21:14:49 +01:00
Simon Goldschmidt
09d929f7ff Fix uninitialized variable warning introduced with last commit
(at least reported by MS-VS C compiler)
2024-01-09 20:51:10 +01:00
Renzo Davoli
83abc8714c avoid callbacks for unsuccessful lwip_accept
See bug #64780
2024-01-09 20:45:05 +01:00
Simon Goldschmidt
09188668c7 update tinydir.h to newest version (1.2.6)
Update to cxong/tinydir version 1.2.6 commit 8124807 ("Fix buffer overflow in tinydir_file_open with long path names")

Although we're not affected of this bug, prevent others copying from our repo being affected...
2024-01-04 22:00:56 +01:00
Simon Goldschmidt
b413b04093 makefsdata: fix buffer corruption with very long paths
See bug #64941
2023-11-29 22:03:46 +01:00
Simon Goldschmidt
ee1523630a httpc with LWIP_HTTPC_HAVE_FILE_IO: fix heap buffer overflow for long local filenames
See bug #64940
2023-11-29 21:35:38 +01:00
Erik Ekman
5e3268cf3e src/core: Fix speling issues
Found by codespell
2023-10-14 18:16:49 +02:00
Erik Ekman
5e45328bb5 src/apps: Fix speling issues
Found by codespell
2023-10-14 18:08:00 +02:00
Erik Ekman
b6b20613ce src/api: Fix speling issues
Found by codespell
2023-10-14 18:04:35 +02:00
Erik Ekman
3c06267d8e apps/http_client: Fix speling issues
Found by codespell
2023-10-14 17:51:01 +02:00
Erik Ekman
0ab52ff447 PPP: Fix speling issues
Found by codespell
2023-10-14 17:51:01 +02:00
Florian La Roche
670a2f0827 Fix typos
From patch #10399
2023-10-14 17:34:13 +02:00
Simon Goldschmidt
1eeb70fbfa dhcp: fix memory corruption when LWIP_DHCP_MAX_DNS_SERVERS > DNS_MAX_SERVERS
see patch #10124
2023-10-12 22:08:14 +02:00
Simon Goldschmidt
b9ca1deba8 Fix building with ISO C90
This fixes the changes of commit 574bd6e5aa
2023-10-12 21:41:49 +02:00
Simon Goldschmidt
efe78e7e5b pbuf_cat: add a simple check to ensure we don't cat the same pbuf to itself 2023-10-12 21:34:11 +02:00
David Fries
35cbad52cc Document that sntp_setservername doesn't copy the string
I was expecting the string to be duplicated, doing a Google search
shows others did as well.
2023-10-12 21:04:11 +02:00
duckpowerMB
574bd6e5aa tcp_in : fix ooseq update error
if a pbuf received with the same seqno in ooseq ,
we then check  the size and replace the existing one
with the larger one,but if the existing one is the
last segment in ooseq ,it might has been trimed before.
the replacing action will overrun our receive windows

see patch #10106 and bug #56397
2023-10-12 21:00:21 +02:00
Thomas Kindler
de0b97861a Fix bug #60681: Initialize custom data in pbuf struct
Add a #define that users can use to initialize LWIP_PBUF_CUSTOM_DATA fields.

see patch #10072
idea by Thomas Kindler <mail_lwip@t-kindler.de>
2023-10-12 20:29:16 +02:00
Simon Goldschmidt
f5e7e8e576 pbuf: pbuf_get_contiguous: allow passing NULL for buffer to prevent copying
see bug #62832
2023-10-12 08:26:00 +02:00
Faidon Liambotis
4f88651247 Add MEM_CUSTOM_ALLOCATOR and make LIBC a subset of it
Allow one to provide a custom implementation of free/malloc/calloc
instead of the lwip internal allocator. The code to use the libc's
implementation already existed, so generalize the existing code and make
the libc variant a specialized case of this new capability, retaining
full backwards compatibility.
2023-10-11 21:45:55 +02:00
Simon Goldschmidt
e01c9a9504 dhcp: set LWIP_DHCP_DISCOVER_ADD_HOSTNAME==1 by DEFAULT_ACCEPTMBOX_SIZE
see bug #63457
2023-10-11 21:39:48 +02:00
Simon Goldschmidt
90a440eafd sockets: fix socket leak when using setsockopt/getsockopt hook with LWIP_NETCONN_FULLDUPLEX==1
see bug #63458
2023-10-11 21:23:32 +02:00
Simon Goldschmidt
583f352f60 altcp_mbedtls: don't ignore return value of mbedtls_ssl_flush_output
see bug #64045/task #16283
2023-10-11 21:18:56 +02:00
Simon Goldschmidt
7fd1350802 sockets: fix bug #63898: allow socket option IPV6_CHECKSUM for both IPPROTO_IPV6 and IPPROTO_RAW
See bug #63898
2023-10-10 22:27:03 +02:00
Simon Goldschmidt
ab1f582043 httpd: fix bug #64458: When tcp_err() is invoked, tcp_pcb is freed but httpd_post_finished() is not called by httpd.c 2023-10-10 20:40:42 +02:00
Simon Goldschmidt
b5f6720f88 apps/tftp: fix compiling for 64-bit 2023-10-10 20:39:45 +02:00
Simon Goldschmidt
c8f42025ce ipv6 reassembly: fix detecting holes in reassembled packets
Added unit test for reassembly.

See bug #64767
2023-10-10 16:31:16 +02:00
Simon Goldschmidt
16e8ef3145 ipv6: fix ip6_current_header() after reassembly
ip6_current_header() should point to the header before the reassembled data,
not to the first received pbuf (not necessarily the same).

See bug #64031
2023-10-10 16:31:09 +02:00
Simon Goldschmidt
98e63b6acf apps: http client: improve the HTTP client; ensure connection settings are passed
Without connection settings, the caller is not informed of success vs failure of a transfer.
See bug #63554
2023-10-04 22:26:22 +02:00
Simon Goldschmidt
f85ed72bac ipv6: frag: fix bogus icmp6 response on reassembly timeout
See bug #63929
2023-10-03 17:50:28 +02:00
Simon Goldschmidt
1ef6189287 pbuf: fix "returns" documentation on pbuf_get_contiguous()
See bug #64049
2023-10-03 17:34:53 +02:00
Simon Goldschmidt
ae5a5b99eb tcp: fix compiling with LWIP_NOASSERT
See bug #64734
2023-10-03 17:31:19 +02:00
Yonggang Luo
dad8c4c72a guard when data is NULL
[build] ../../3rd/lwip/src/include/lwip/opt.h:137:41: error: argument 2 null where non-null expected [-Werror=nonnull]
[build]  #define MEMCPY(dst,src,len)             memcpy(dst,src,len)
[build]                                          ^~~~~~~~~~~~~~~~~~~
[build] ../../3rd/lwip/src/netif/ppp/fsm.c:791:7: note: in expansion of macro 'MEMCPY'
[build]        MEMCPY(outp + PPP_HDRLEN + HEADERLEN, data, datalen);
[build]        ^~~~~~
[build] In file included from c:\mentorgraphics\fly380s_8910\prebuilts\win32\gcc-arm-none-eabi\arm-none-eabi\include\sys\time.h:40:0,
[build]                  from ../../3rd/../src/cat1/arch/cc.h:40,
[build]                  from ../../3rd/lwip/src/include/lwip/arch.h:50,
[build]                  from ../../3rd/lwip/src/include/lwip/debug.h:40,
[build]                  from ../../3rd/lwip/src/include/lwip/opt.h:52,
[build]                  from ../../3rd/lwip/src/include/netif/ppp/ppp_opts.h:31,
[build]                  from ../../3rd/lwip/src/netif/ppp/fsm.c:43:
[build] c:\mentorgraphics\fly380s_8910\prebuilts\win32\gcc-arm-none-eabi\arm-none-eabi\include\string.h:31:8: note: in a call to function 'memcpy' declared here
[build]  _PTR   _EXFUN(memcpy,(_PTR __restrict, const _PTR __restrict, size_t));
[build]         ^
2023-09-29 22:21:02 +02:00
Simon Goldschmidt
14444c1c7f mqtt: support binary Will Message
see patch #10049
2023-09-29 22:08:03 +02:00
Florian La Roche
0d5db9469e opt.h: Fix typo 2023-09-28 23:15:53 +02:00
Erik Ekman
339372919a mem: Include stdio.h
Memory overflow checks uses snprintf. Reported in bug #63904.
2023-09-28 23:04:37 +02:00
Erik Ekman
6f700a157d nd6: Fix RA link-local address option length check
Length field is in units of 8 bytes.
2023-09-28 22:39:14 +02:00
Simon Goldschmidt
2159f84682 httpd: compare client requests case-insensitive
Fixes bug #10047 (Fix case-sensitive comparison of Content-Length header for POST requests)

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2023-09-28 22:30:47 +02:00
Erik Ekman
7807f706f3 nd6: Update RA link-local addr option length check
lwIP might support different hardware address lengths (when using
Ethernet and 6LoWPAN for instance). Match provided lladdr length
from Router Advertisement to the current network interface instead
of comparing against longest that can be stored.
2023-09-28 22:23:25 +02:00
Simon Goldschmidt
d8b97bfc5d icmp: fix bug #64211 (ICMP reply error when using bridge)
when reusing an rx pbuf for tx, its if_idx has to be reset or else bridgeif_send_to_port() might drop it
2023-09-27 21:49:24 +02:00
Simon Goldschmidt
3792075baf Fix bug #64637 ("iperf -n 1000 -r" does not work) 2023-09-27 21:01:52 +02:00
Simon Goldschmidt
36cb95c4d2 next release will probably be 2.2.1... 2023-09-27 20:38:41 +02:00
Simon Goldschmidt
0a0452b2c3 Prepare 2.2.0 release 2023-09-25 21:25:35 +02:00
Simon Goldschmidt
3eeda139bc minor coding style/spelling fixes 2023-09-22 09:54:36 +02:00