The check for link up was missing, meaning valid LCP echo request/reply
packets are filtered whatever the PPP state is, despite what the comment
says.
Fix it by checking the PPP state as we would like to have done when it
was written.
During documentation updated LWIP_MEMPOOL_PROTOTYPE was moved inside
"#if MEMP_MEM_MALLOC" which cause ppp build to break. This patch fix that
issue.
ref commit-id: 2f950a7dcc
Signed-off-by: Ajay Bhargav <contact@rickeyworld.info>
VJ packets, Compressed packets, IPv4 and IPv6 packets are useless in
the PPP packet dump. We properly filtered IPv4 and IPv6 packets but
we forgot filtering VJ and Compressed packets.
Improve the filtering rule to filter packets which are not auth
protocol (< 0xC000) and which are not control protocol (0x8000 bit
not set).
I have below code in my cc.h:
#ifdef MYSDK_LWIP_DEBUG
#define LWIP_PLATFORM_ASSERT(x) MYSDK_ASSERTION_FAIL_ACTION()
#else
#define LWIP_PLATFORM_ASSERT(x)
#endif /* ifdef MYSDK_LWIP_DEBUG */
I got below error when in non-debug build:
src/include/lwip/debug.h:76:32: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
LWIP_PLATFORM_ASSERT(message); } while(0)
^
Fix the build error by adding braces around empty body in an 'if' statement.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: sg <goldsimon@gmx.de>
If LCP is not started yet, we are only closing the link protocol, in
this case we have to set the disconnect state ourself because PPP
is not actually started yet.
Include stdlib.h to fix below build warnings when MEM_LIBC_MALLOC is set:
src/core/mem.c:119:3: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
void* ret = mem_clib_malloc(size + MEM_LIBC_STATSHELPER_SIZE);
^
src/core/mem.c:96:25: warning: incompatible implicit declaration of built-in function 'malloc'
#define mem_clib_malloc malloc
^
src/core/mem.c:119:15: note: in expansion of macro 'mem_clib_malloc'
void* ret = mem_clib_malloc(size + MEM_LIBC_STATSHELPER_SIZE);
^
src/core/mem.c: In function 'mem_free':
src/core/mem.c:146:3: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
mem_clib_free(rmem);
^
src/core/mem.c:93:23: warning: incompatible implicit declaration of built-in function 'free'
#define mem_clib_free free
^
src/core/mem.c:146:3: note: in expansion of macro 'mem_clib_free'
mem_clib_free(rmem);
^
Signed-off-by: Axel Lin <axel.lin@ingics.com>