summaryrefslogtreecommitdiffstats
path: root/src/main/detail.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:41:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:41:52 +0000
commit44eafeee62e6982131c62df6f74335114ca53024 (patch)
tree1cdf833b0a76e52630d717202398ced5900e11e9 /src/main/detail.c
parentAdding upstream version 3.2.3+dfsg. (diff)
downloadfreeradius-44eafeee62e6982131c62df6f74335114ca53024.tar.xz
freeradius-44eafeee62e6982131c62df6f74335114ca53024.zip
Adding upstream version 3.2.5+dfsg.upstream/3.2.5+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/main/detail.c')
-rw-r--r--src/main/detail.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/detail.c b/src/main/detail.c
index a5e8437..3b7e382 100644
--- a/src/main/detail.c
+++ b/src/main/detail.c
@@ -910,8 +910,16 @@ open_file:
rad_assert(vp != NULL);
fr_pair_add(&packet->vps, vp);
}
+
+ /*
+ * Update Acct-Delay-Time, but make sure that it doesn't go backwards.
+ */
if (data->timestamp != 0) {
- vp->vp_integer += time(NULL) - data->timestamp;
+ time_t now = time(NULL);
+
+ if (((time_t) data->timestamp) < now) {
+ vp->vp_integer += time(NULL) - data->timestamp;
+ }
}
}