Tool/software: TI-RTOS
I think there is a possible bug in the PPP stack for NDK 2_25_00_09
In the file lcp.c function "void lcpInput( PPP_SESSION *p, PBM_Pkt *pPkt )"
The handling of a LCPCODE_CFGNAK for the Authentication protocol is currently
case LCPOPT_AUTH:
/* Can't negotiate authentication much in server mode */
if( p->Flags & PPPFLG_SERVER )
{
/* If this is a NAK and we're set to CHAP, and we */
/* will accept PAP, we'll try switching to PAP */
if( pHdr->Code == LCPCODE_CFGNAK &&
p->auth.Protocol == PPPPROT_CHAP &&
(p->Flags & PPPFLG_OPT_AUTH_PAP) )
{
p->auth.Protocol = PPPPROT_PAP;
break;
}
goto StopConnect;
}
I would have thought the client should also allow it's request for CHAP to be changed to PAP?
The function handles a client being given a config request with a different authentication but not a NAK in response to the clients config request.
Is this correct behaviour?
Looking at ESP32 PPP stack, they seem to use the NAK to also change the protocol.