From bedb4e4745b72f88037fc0b906cfebebf7ca25a7 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Fri, 16 Oct 2020 22:20:11 +0200 Subject: [PATCH] PPP: disable VJ support by default VJ support is known to be broken when built with some compiler optimizations enabled, disabling it by default until someone needs it and fixes it. It was mostly used with dial-up modems, it is useless with PPPoE and PPPoL2TP and is probably useless as well with cellular modems, so disabling it by default makes sense anyway. --- contrib/examples/example_app/lwipopts.h | 2 +- src/include/netif/ppp/ppp_opts.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/examples/example_app/lwipopts.h b/contrib/examples/example_app/lwipopts.h index 4721a795..ea2ca4bd 100644 --- a/contrib/examples/example_app/lwipopts.h +++ b/contrib/examples/example_app/lwipopts.h @@ -303,7 +303,7 @@ a lot of data that needs to be copied, this should be set high. */ #define MSCHAP_SUPPORT 0 /* Set > 0 for MSCHAP */ #define CBCP_SUPPORT 0 /* Set > 0 for CBCP (NOT FUNCTIONAL!) */ #define CCP_SUPPORT 0 /* Set > 0 for CCP */ -#define VJ_SUPPORT 1 /* Set > 0 for VJ header compression. */ +#define VJ_SUPPORT 0 /* Set > 0 for VJ header compression. */ #define MD5_SUPPORT 1 /* Set > 0 for MD5 (see also CHAP) */ #endif /* PPP_SUPPORT */ diff --git a/src/include/netif/ppp/ppp_opts.h b/src/include/netif/ppp/ppp_opts.h index 479a006d..2a0dc126 100644 --- a/src/include/netif/ppp/ppp_opts.h +++ b/src/include/netif/ppp/ppp_opts.h @@ -311,9 +311,11 @@ /** * VJ_SUPPORT==1: Support VJ header compression. + * + * BEWARE: It is known to be broken when built with some compiler optimizations enabled. */ #ifndef VJ_SUPPORT -#define VJ_SUPPORT 1 +#define VJ_SUPPORT 0 #endif /* VJ compression is only supported for TCP over IPv4 over PPPoS. */ #if !PPPOS_SUPPORT || !PPP_IPV4_SUPPORT || !LWIP_TCP