diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 8e2be763..70e0d2d9 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -1900,6 +1900,12 @@ #define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */ #endif +/* Default number of times we receive our magic number from the peer + before deciding the link is looped-back. */ +#ifndef LCP_DEFLOOPBACKFAIL +#define LCP_DEFLOOPBACKFAIL 10 +#endif + /* Interval in seconds between keepalive echo requests, 0 to disable. */ #ifndef LCP_ECHOINTERVAL #define LCP_ECHOINTERVAL 0 diff --git a/src/include/netif/ppp/lcp.h b/src/include/netif/ppp/lcp.h index f832a4ee..8162e257 100644 --- a/src/include/netif/ppp/lcp.h +++ b/src/include/netif/ppp/lcp.h @@ -166,9 +166,11 @@ void lcp_sprotrej(ppp_pcb *pcb, u_char *p, int len); /* send protocol reject extern const struct protent lcp_protent; +#if 0 /* moved to opt.h */ /* Default number of times we receive our magic number from the peer before deciding the link is looped-back. */ #define DEFLOOPBACKFAIL 10 +#endif /* moved to opt.h */ #endif /* LCP_H */ #endif /* PPP_SUPPORT */ diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index fe355cae..880bb4e6 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -261,7 +261,7 @@ ppp_pcb *ppp_new(void) { pcb->settings.chap_timeout_time = CHAP_DEFTIMEOUT; pcb->settings.chap_max_transmits = CHAP_DEFTRANSMITS; #endif /* CHAP_SUPPPORT */ - pcb->settings.lcp_loopbackfail = DEFLOOPBACKFAIL; + pcb->settings.lcp_loopbackfail = LCP_DEFLOOPBACKFAIL; pcb->settings.lcp_echo_interval = LCP_ECHOINTERVAL; pcb->settings.lcp_echo_fails = LCP_MAXECHOFAILS;