]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Do dedup for CoA packets, too
authorAlan T. DeKok <aland@freeradius.org>
Mon, 27 Jul 2015 11:13:19 +0000 (07:13 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 27 Jul 2015 11:13:19 +0000 (07:13 -0400)
src/main/process.c

index 04b96c3631a62ff8b1e512cca4d1aad34aa4f7f5..fd15b85d5c2aeca649438b0bfb054f1976f90a05 100644 (file)
@@ -813,12 +813,23 @@ static void request_cleanup_delay_init(REQUEST *request)
         *      client.  Everything else just gets cleaned up
         *      immediately.
         */
-       if (!(request->packet->code == PW_CODE_ACCESS_REQUEST)
-#ifdef WITH_COA
-           || (request->packet->code == PW_CODE_COA_REQUEST)
-           || (request->packet->code == PW_CODE_DISCONNECT_REQUEST)
+       if (request->packet->dst_port == 0) goto done;
+
+       /*
+        *      Accounting packets shouldn't be retransmitted.  They
+        *      should always be updated with Acct-Delay-Time.
+        */
+#ifdef WITH_ACCOUNTING
+       if (request->packet->code == PW_CODE_ACCOUNTING_REQUEST) goto done;
+#endif
+
+#ifdef WITH_DHCP
+       if (request->listener->type == RAD_LISTEN_DHCP) goto done;
+#endif
+
+#ifdef WITH_VMPS
+       if (request->listener->type == RAD_LISTEN_VQP) goto done;
 #endif
-               ) goto done;
 
        if (!request->root->cleanup_delay) goto done;