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:
Vladimir Dubrovin committed 2026-11-21 14:07:12 +03:00
1 parent da9d1ba892
commit 62b6355040
2 files changed
+9 -1

No files matched your search

+7
View File
@@ -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;