retry mechanism for radius client 1.1.6

Lewis Adam-VNQM87 VNQM87 at motorola.com
Tue May 18 21:10:37 CEST 2010


Looking at the retry handling in rc_send_server() in sendserver.c, it
appears that "retries" actually means "tries".
 
Lines 325 to 330: 

  /*
   * Timed out waiting for response.  Retry "retry_max" times
   * before giving up.  If retry_max = 0, don't retry at all.
   */
  if (++retries >= retry_max)
  {
 
 
    ...
    return TIMEOUT_RC;
  }
 
After the first time out, retries is pre-incremented to 1 thus being
greater than or equal to 0 or 1 (so setting retry_max to 0 or 1 has the
same effect).
 
I think the fix is simply to change the line to:
 
  if (retries++ >= retry_max)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20100518/be2880bc/attachment.html>


More information about the Freeradius-Devel mailing list