Merge branch 'chap_nack' into 'master'

LCP: accept an auth nack to CHAP with length == 4

See merge request l2tpns/l2tpns!19
This commit is contained in:
zorun 2022-12-14 20:51:46 +00:00
commit b3b5fc5c59

2
ppp.c
View file

@ -899,7 +899,7 @@ void processlcp(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
LOG(3, s, t, " Remote requested PAP authentication...%sing\n",
authtype ? "accept" : "reject");
}
else if (proto == PPPCHAP && length > 4 && *(o + 4) == 5)
else if (proto == PPPCHAP && (length == 4 || (length > 4 && *(o + 4) == 5)))
{
authtype = config->radius_authtypes & AUTHCHAP;
LOG(3, s, t, " Remote requested CHAP authentication...%sing\n",