mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-10 12:39:55 +00:00
PPP: don't build ppp_set_auth if no authenticator are enabled
For our few users which might disable all authenticators to save some flash, ensure that everything using authentication is build out.
This commit is contained in:
parent
c1c3d0e1ba
commit
f21aede031
@ -427,6 +427,7 @@ struct ppp_pcb_s {
|
||||
* only be called while the PPP is in the dead phase (i.e. disconnected).
|
||||
*/
|
||||
|
||||
#if PPP_AUTH_SUPPORT
|
||||
/*
|
||||
* Set PPP authentication.
|
||||
*
|
||||
@ -458,7 +459,6 @@ struct ppp_pcb_s {
|
||||
#define PPPAUTHTYPE_ANY 0xff
|
||||
void ppp_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passwd);
|
||||
|
||||
#if PPP_AUTH_SUPPORT
|
||||
/*
|
||||
* Whether peer is required to authenticate. This is mostly necessary for PPP server support.
|
||||
*/
|
||||
|
@ -209,8 +209,8 @@ static err_t ppp_netif_output(struct netif *netif, struct pbuf *pb, u16_t protoc
|
||||
/***********************************/
|
||||
/*** PUBLIC FUNCTION DEFINITIONS ***/
|
||||
/***********************************/
|
||||
void ppp_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passwd) {
|
||||
#if PPP_AUTH_SUPPORT
|
||||
void ppp_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passwd) {
|
||||
#if PAP_SUPPORT
|
||||
pcb->settings.refuse_pap = !(authtype & PPPAUTHTYPE_PAP);
|
||||
#endif /* PAP_SUPPORT */
|
||||
@ -226,13 +226,8 @@ void ppp_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *pas
|
||||
#endif /* EAP_SUPPORT */
|
||||
pcb->settings.user = user;
|
||||
pcb->settings.passwd = passwd;
|
||||
#else /* PPP_AUTH_SUPPORT */
|
||||
LWIP_UNUSED_ARG(pcb);
|
||||
LWIP_UNUSED_ARG(authtype);
|
||||
LWIP_UNUSED_ARG(user);
|
||||
LWIP_UNUSED_ARG(passwd);
|
||||
#endif /* PPP_AUTH_SUPPORT */
|
||||
}
|
||||
#endif /* PPP_AUTH_SUPPORT */
|
||||
|
||||
#if MPPE_SUPPORT
|
||||
/* Set MPPE configuration */
|
||||
|
Loading…
x
Reference in New Issue
Block a user