Skip to content

Commit

Permalink
Do dedup for CoA packets, too
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Jul 27, 2015
1 parent 4867bac commit 3ca7acc
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/main/process.c
Expand Up @@ -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;

Expand Down

0 comments on commit 3ca7acc

Please sign in to comment.