mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
PPP, CCP, added MPPE user configuration flags
This commit is contained in:
parent
4c0af0f79e
commit
f94efab6c3
@ -247,12 +247,16 @@ typedef struct ppp_settings_s {
|
||||
unsigned int lcp_echo_adaptive :1; /* request echo only if the link was idle */
|
||||
#else
|
||||
unsigned int :1; /* 1 bit of padding */
|
||||
#endif
|
||||
#endif /* PPP_LCP_ADAPTIVE */
|
||||
#if MPPE_SUPPORT
|
||||
unsigned int require_mppe :1; /* Require MPPE (Microsoft Point to Point Encryption) */
|
||||
unsigned int refuse_mppe_40 :1; /* Allow MPPE 40-bit mode? */
|
||||
unsigned int refuse_mppe_128 :1; /* Allow MPPE 128-bit mode? */
|
||||
unsigned int refuse_mppe_stateful :1; /* Allow MPPE stateful mode? */
|
||||
#else /* MPPE_SUPPORT */
|
||||
unsigned int :1; /* 1 bit of padding */
|
||||
unsigned int :4; /* 2 bit of padding */
|
||||
#endif /* MPPE_SUPPORT */
|
||||
unsigned int :5; /* 7 bit of padding to round out to 24 bits */
|
||||
|
||||
u16_t listen_time; /* time to listen first (ms), waiting for peer to send LCP packet */
|
||||
|
||||
|
@ -402,6 +402,14 @@ static void ccp_init(ppp_pcb *pcb) {
|
||||
#if PREDICTOR_SUPPORT
|
||||
ao->predictor_1 = 1;
|
||||
#endif /* PREDICTOR_SUPPORT */
|
||||
|
||||
#if MPPE_SUPPORT
|
||||
if (pcb->settings.require_mppe) {
|
||||
wo->mppe = ao->mppe =
|
||||
(pcb->settings.refuse_mppe_40 ? 0 : MPPE_OPT_40)
|
||||
| (pcb->settings.refuse_mppe_128 ? 0 : MPPE_OPT_128);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user