mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23: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
d0c840766f
commit
251a91d6b4
2 files changed
+9
-1
No files matched your search
+2
-1
@@ -600,7 +600,8 @@ Framed-IPv6-Address / Framed-IP-Address: (IP address of the client),
|
|||||||
Called-Station-ID: (requested Hostname, if presents),
|
Called-Station-ID: (requested Hostname, if presents),
|
||||||
Login-Service: (type of request, e.g. 1001 - SOCKS CONNECT, 1010 - HTTP GET, 1013 - HTTP CONNECT),
|
Login-Service: (type of request, e.g. 1001 - SOCKS CONNECT, 1010 - HTTP GET, 1013 - HTTP CONNECT),
|
||||||
Login-TCP-Port: (requested port),
|
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
|
.br
|
||||||
Supported reply attributes for authentication:
|
Supported reply attributes for authentication:
|
||||||
Framed-IP-Address / Framed-IPv6-Address (IP to assign to user), Reply-Message.
|
Framed-IP-Address / Framed-IPv6-Address (IP to assign to user), Reply-Message.
|
||||||
|
|||||||
@@ -349,6 +349,13 @@ int radsend(struct clientparam * param, int auth, int stop){
|
|||||||
ptr+=len;
|
ptr+=len;
|
||||||
total_length+=len+2;
|
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 */
|
/* NAS-Port-Type */
|
||||||
*ptr++ = PW_NAS_PORT_TYPE;
|
*ptr++ = PW_NAS_PORT_TYPE;
|
||||||
*ptr++ = 6;
|
*ptr++ = 6;
|
||||||
|
|||||||
Reference in new issue
Block a user