retry mechanism for radius client 1.1.6

Alex Massover alex at jajah.com
Thu May 20 09:30:25 CEST 2010


AFAIK it does not allow to set it to 0:

        if (rc_conf_int(rh, "radius_retries") <= 0)
        {
                rc_log(LOG_ERR,"%s: radius_retries <= 0 is illegal", filename);
                return -1;
        }

Indeed there’s something not consistent in the logic here.

From: freeradius-devel-bounces+alex=jajah.com at lists.freeradius.org [mailto:freeradius-devel-bounces+alex=jajah.com at lists.freeradius.org] On Behalf Of Lewis Adam-VNQM87
Sent: יום ג 18 מאי 2010 22:11
To: freeradius-devel at lists.freeradius.org
Subject: retry mechanism for radius client 1.1.6

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)


This mail was received via Mail-SeCure System.

This mail was sent via Mail-SeCure System.


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


More information about the Freeradius-Devel mailing list