l2tp: Add PAP auth information in ICCN

To support proxy auth.
This commit is contained in:
Samuel Thibault 2025-03-23 03:17:41 +01:00
parent e701644d37
commit 40796d2adb
4 changed files with 37 additions and 0 deletions

6
ppp.c
View file

@ -155,6 +155,9 @@ void processpap(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
strncpy(session[s].user, packet.username, sizeof(session[s].user) - 1);
strncpy(radius[r].pass, packet.password, sizeof(radius[r].pass) - 1);
strncpy((char *) sess_local[s].auth_name, packet.username, sizeof(sess_local[s].auth_name) - 1);
strncpy((char *) sess_local[s].auth_resp, packet.password, sizeof(sess_local[s].auth_resp) - 1);
free(packet.username);
free(packet.password);
@ -427,6 +430,9 @@ void lcp_restart(sessionidt s)
session[s].ppp.phase = Establish;
sess_local[s].lcp_last_received_confreq_n = 0;
sess_local[s].lcp_last_sent_confreq_n = 0;
sess_local[s].auth_type = 0;
sess_local[s].auth_name[0] = 0;
sess_local[s].auth_resp[0] = 0;
// This-Layer-Down
change_state(s, ipcp, Initial);
change_state(s, ipv6cp, Initial);