From 3ca7acc567f3f2608d9ec3fdbe6f49166adc8942 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Mon, 27 Jul 2015 07:13:19 -0400 Subject: [PATCH] Do dedup for CoA packets, too --- src/main/process.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/main/process.c b/src/main/process.c index 04b96c3631a6..fd15b85d5c2a 100644 --- a/src/main/process.c +++ b/src/main/process.c @@ -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;