- LOG(2, s, t, "CHAP ignored in %s phase\n", ppp_phase(session[s].ppp.phase));
+ LOG(3, s, t, "Unexpected CHAP message\n");
+
+ // Some modems (Netgear DM602, possibly others) persist in using CHAP even
+ // after ACKing our ConfigReq for PAP.
+ if (sess_local[s].lcp_authtype == AUTHPAP && config->radius_authtypes & AUTHCHAP)
+ {
+ sess_local[s].lcp_authtype = AUTHCHAP;
+ sendchap(s, t);
+ }