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:
Sylvain Rochet
2016-07-02 19:43:08 +02:00
parent c1c3d0e1ba
commit f21aede031
2 changed files with 3 additions and 8 deletions

View File

@@ -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 */