Current parsing code is building reverse-order integer, and then calls htonl()
to assign right value to "ts_recent" field of pcb.
This works correctly on little-endian machines, where htonl() reverses bytes.
However, on big-endian machines, htonl() is no-op, so bytes stay reversed.
This patch fixes it by building non-reversed integer.
AutoIP now selects a new address after rate limit timeout,
AutoIP tries a new address by incrementing the tried_llipaddr counter
in the ACD_DECLINE case of the callback.
In lwIP pre-2.2.0, address conflict detection was handled within autoip.c, and
the incrementing happened in autoip_restart() (line 150). When ACD was
extracted into a separate module in 2.2.0, this increment was missing for the
rate-limiting path.
Without this change, devices continuously retry the same IP address after rate
limiting, causing them to fail Bonjour Conformance Tests.
The TFTP app should not bind to the TFTP server port when configured as
a client. Instead, the local port should be chosen from the dynamic
range (49152 ~ 65535) so that if the application is stopped and started
again, the remote server will not consider the new packets as part of
the same context (which would cause an error since a new RRQ would be
unexpected).
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
[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
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.
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.
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...
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
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.