mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-24 15:16:02 +00:00
PPP, CORE, SERVER, set auth configuration before auth
Set LCP wanted options accordingly to the user auth configuration if peer is required to authenticate itself.
This commit is contained in:
parent
8d05279599
commit
e86a0a4325
|
@ -652,6 +652,7 @@ static void lcp_resetci(fsm *f) {
|
||||||
|
|
||||||
#if PPP_AUTH_SUPPORT
|
#if PPP_AUTH_SUPPORT
|
||||||
|
|
||||||
|
/* note: default value is true for allow options */
|
||||||
if (pcb->settings.user && pcb->settings.passwd) {
|
if (pcb->settings.user && pcb->settings.passwd) {
|
||||||
#if PAP_SUPPORT
|
#if PAP_SUPPORT
|
||||||
if (pcb->settings.refuse_pap) {
|
if (pcb->settings.refuse_pap) {
|
||||||
|
@ -677,6 +678,37 @@ static void lcp_resetci(fsm *f) {
|
||||||
ao->neg_eap = 0;
|
ao->neg_eap = 0;
|
||||||
}
|
}
|
||||||
#endif /* EAP_SUPPORT */
|
#endif /* EAP_SUPPORT */
|
||||||
|
|
||||||
|
#if PPP_SERVER
|
||||||
|
/* note: default value is false for wanted options */
|
||||||
|
if (pcb->settings.auth_required) {
|
||||||
|
#if PAP_SUPPORT
|
||||||
|
if (!pcb->settings.refuse_pap) {
|
||||||
|
wo->neg_upap = 1;
|
||||||
|
}
|
||||||
|
#endif /* PAP_SUPPORT */
|
||||||
|
#if CHAP_SUPPORT
|
||||||
|
if (!pcb->settings.refuse_chap) {
|
||||||
|
wo->chap_mdtype |= MDTYPE_MD5;
|
||||||
|
}
|
||||||
|
#if MSCHAP_SUPPORT
|
||||||
|
if (!pcb->settings.refuse_mschap) {
|
||||||
|
wo->chap_mdtype |= MDTYPE_MICROSOFT;
|
||||||
|
}
|
||||||
|
if (!pcb->settings.refuse_mschap_v2) {
|
||||||
|
wo->chap_mdtype |= MDTYPE_MICROSOFT_V2;
|
||||||
|
}
|
||||||
|
#endif /* MSCHAP_SUPPORT */
|
||||||
|
wo->neg_chap = (wo->chap_mdtype != MDTYPE_NONE);
|
||||||
|
#endif /* CHAP_SUPPORT */
|
||||||
|
#if EAP_SUPPORT
|
||||||
|
if (!pcb->settings.refuse_eap) {
|
||||||
|
wo->neg_eap = 1;
|
||||||
|
}
|
||||||
|
#endif /* EAP_SUPPORT */
|
||||||
|
}
|
||||||
|
#endif /* PPP_SERVER */
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
#if PAP_SUPPORT
|
#if PAP_SUPPORT
|
||||||
ao->neg_upap = 0;
|
ao->neg_upap = 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user