mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-04 05:39:53 +00:00
PPP, don't store the name by which the peer authenticated itself to us if multilink support is disabled
pcb->peer_authname is only used by multilink support (which we don't support), don't store the useless peer authname.
This commit is contained in:
parent
967a8d0678
commit
78e1b9b7c1
@ -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. */
|
||||
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user