diff --git a/ppp.c b/ppp.c index 4e17c36..7a849bd 100644 --- a/ppp.c +++ b/ppp.c @@ -161,7 +161,7 @@ void processpap(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l) free(packet.username); free(packet.password); - radius[r].id = p[1]; + radius[r].id = sess_local[s].auth_id = p[1]; // Take ID from client LOG(3, s, t, "Sending login for %s/%s to RADIUS\n", user, pass); if ((session[s].mrru) && (!first_session_in_bundle(s))) radiussend(r, RADIUSJUSTAUTH); @@ -2549,7 +2549,7 @@ void sendchap(sessionidt s, tunnelidt t) LOG(1, s, t, "Send CHAP challenge\n"); radius[r].chap = 1; // CHAP not PAP - radius[r].id++; + radius[r].id = ++sess_local[s].auth_id; // New ID if (radius[r].state != RADIUSCHAP) radius[r].try = 0; diff --git a/radius.c b/radius.c index 03fb2a4..04a39fc 100644 --- a/radius.c +++ b/radius.c @@ -1054,7 +1054,6 @@ void processrad(uint8_t *buf, int len, char socket_index) { sess_local[s].auth_type = 3; // PAP } - sess_local[s].auth_id = radius[r].id; if (lac_rad_forwardtoremotelns(s, assignment_id, session[s].user)) {