l2tp: Add CHAP auth information in ICCN
To support proxy auth.
This commit is contained in:
parent
12cc3c39b0
commit
75144a546c
4 changed files with 26 additions and 4 deletions
15
l2tpns.c
15
l2tpns.c
|
|
@ -4863,7 +4863,6 @@ void processudp(uint8_t *buf, int len, struct sockaddr_in *addr, uint16_t indexu
|
|||
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;
|
||||
|
||||
STAT(session_created);
|
||||
break;
|
||||
|
|
@ -4927,6 +4926,20 @@ void processudp(uint8_t *buf, int len, struct sockaddr_in *addr, uint16_t indexu
|
|||
controlb(c, 33, sess_local[fs].auth_resp,
|
||||
strlen((const char*) sess_local[fs].auth_resp), 0);
|
||||
}
|
||||
else if (sess_local[fs].auth_type == 2) // CHAP
|
||||
{
|
||||
// Proxy Authentication Type
|
||||
control16(c, 29, sess_local[fs].auth_type, 0);
|
||||
// Proxy Authentication Name
|
||||
controlb(c, 30, sess_local[fs].auth_name,
|
||||
strlen((const char*) sess_local[fs].auth_name), 0);
|
||||
// Proxy Authentication Challenge
|
||||
controlb(c, 31, sess_local[fs].auth_chall, 16, 0);
|
||||
// Proxy Authentication Id
|
||||
control16(c, 32, sess_local[fs].auth_id, 0);
|
||||
// Proxy Authentication Response
|
||||
controlb(c, 33, sess_local[fs].auth_resp, 16, 0);
|
||||
}
|
||||
|
||||
controladd(c, asession, t); // send the message
|
||||
LOG(3, s, t, "Sending ICCN\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue