mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 15:59:41 +08:00
radius: the time of the request sent in it (#966)
Every request to a RADIUS server carries an Event-Timestamp (RFC 2869, attribute 55), the time it was made in seconds since the epoch, so a server no longer has to fish the time out of Acct-Session-Id.
This commit is contained in:
1 parent
da9d1ba892
commit
62b6355040
2 files changed
+9
-1
No files matched your search
+2
-1
@@ -619,7 +619,8 @@ Framed-IPv6-Address / Framed-IP-Address: (IP address of the client),
|
||||
Called-Station-ID: (requested Hostname, if presents),
|
||||
Login-Service: (type of request, e.g. 1001 - SOCKS CONNECT, 1010 - HTTP GET, 1013 - HTTP CONNECT),
|
||||
Login-TCP-Port: (requested port),
|
||||
Login-IPv6-Host / Login-IP-Host: (requested IP).
|
||||
Login-IPv6-Host / Login-IP-Host: (requested IP),
|
||||
Event-Timestamp: (the time of the request, in seconds since the epoch).
|
||||
.br
|
||||
Supported reply attributes for authentication:
|
||||
Framed-IP-Address / Framed-IPv6-Address (IP to assign to user), Reply-Message.
|
||||
|
||||
@@ -347,6 +347,13 @@ int radsend(struct clientparam * param, int auth, int stop){
|
||||
ptr+=len;
|
||||
total_length+=len+2;
|
||||
|
||||
/* Event-Timestamp */
|
||||
*ptr++ = PW_EVENT_TIMESTAMP;
|
||||
*ptr++ = 6;
|
||||
(*(uint32_t *)ptr)=htonl((uint32_t)time(0));
|
||||
ptr+=4;
|
||||
total_length+=6;
|
||||
|
||||
/* NAS-Port-Type */
|
||||
*ptr++ = PW_NAS_PORT_TYPE;
|
||||
*ptr++ = 6;
|
||||
|
||||
Reference in new issue
Block a user