]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't update Acct-Delay-Time for status check packets
authorAlan T. DeKok <aland@freeradius.org>
Tue, 10 Oct 2017 19:20:29 +0000 (15:20 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 11 Oct 2017 12:51:06 +0000 (08:51 -0400)
src/modules/rlm_radius/rlm_radius_udp.c

index bf06bfbfa618f03f377ed7d51d6788a85725b8f6..609797844e234d85186aaf026680132e48c0cd27 100644 (file)
@@ -922,7 +922,8 @@ static int retransmit_packet(rlm_radius_udp_request_t *u, struct timeval *now)
         *      Note that we don't change the ID.  We can claim that
         *      we randomly chose the same one again. :(
         */
-       if (u->code == FR_CODE_ACCOUNTING_REQUEST) {
+       if ((u->code == FR_CODE_ACCOUNTING_REQUEST) &&
+           (u != c->status_u)) {
                /*
                 *      No Acct-Delay-Time, add one manually if
                 *      there's room.
@@ -1324,7 +1325,8 @@ static int conn_write(rlm_radius_udp_connection_t *c, rlm_radius_udp_request_t *
         *      If the accounting packet doesn't have Acct-Delay-Time,
         *      then we leave well enough alone.
         */
-       if (u->code == FR_CODE_ACCOUNTING_REQUEST) {
+       if ((u->code == FR_CODE_ACCOUNTING_REQUEST) &&
+           (u != c->status_u)) {
                uint8_t *attr, *end;
                uint32_t delay;