diff --git a/src/include/netif/ppp/ppp.h b/src/include/netif/ppp/ppp.h index bf41bde0..bfa9ed6f 100644 --- a/src/include/netif/ppp/ppp.h +++ b/src/include/netif/ppp/ppp.h @@ -359,9 +359,9 @@ struct ppp_pcb_s { #if PPP_AUTH_SUPPORT /* auth data */ -#if PPP_SERVER +#if PPP_SERVER && defined(HAVE_MULTILINK) char peer_authname[MAXNAMELEN + 1]; /* The name by which the peer authenticated itself to us. */ -#endif /* PPP_SERVER */ +#endif /* PPP_SERVER && defined(HAVE_MULTILINK) */ u16_t auth_pending; /* Records which authentication operations haven't completed yet. */ u16_t auth_done; /* Records which authentication operations have been completed. */ diff --git a/src/netif/ppp/auth.c b/src/netif/ppp/auth.c index 593843e6..6735e1e3 100644 --- a/src/netif/ppp/auth.c +++ b/src/netif/ppp/auth.c @@ -1045,6 +1045,10 @@ void auth_peer_fail(ppp_pcb *pcb, int protocol) { */ void auth_peer_success(ppp_pcb *pcb, int protocol, int prot_flavor, const char *name, int namelen) { int bit; +#ifndef HAVE_MULTILINK + LWIP_UNUSED_ARG(name); + LWIP_UNUSED_ARG(namelen); +#endif /* HAVE_MULTILINK */ switch (protocol) { #if CHAP_SUPPORT @@ -1082,14 +1086,15 @@ void auth_peer_success(ppp_pcb *pcb, int protocol, int prot_flavor, const char * return; } +#ifdef HAVE_MULTILINK /* * Save the authenticated name of the peer for later. */ - /* FIXME: do we need that ? */ if (namelen > (int)sizeof(pcb->peer_authname) - 1) namelen = (int)sizeof(pcb->peer_authname) - 1; MEMCPY(pcb->peer_authname, name, namelen); pcb->peer_authname[namelen] = 0; +#endif /* HAVE_MULTILINK */ #if 0 /* UNUSED */ script_setenv("PEERNAME", , 0); #endif /* UNUSED */