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.
commit 4e6dd9 "ping: add stop function", was corrected
and wrongly added stop function after IP address set up.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
[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] ^
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.
ping in raw mode does some set up and sets timeout, but clean
up procedure is missing. That is needed for case if PING_RESULT() macro
is used for application exit.
Also implement stop functionality when using sockets.
Running ping is stopped when calling ping_init() again.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>