mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-09 17:13:49 +08: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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user