[RADIATOR] add Attributes when retrying to a new Host in AuthROUNDROBIN

Heikki Vatiainen hvn at open.com.au
Tue Aug 19 16:07:34 CDT 2014

On 08/19/2014 01:00 AM, David Zych wrote:

> How can I set a new attribute value on a request _each_ time I 
> attempt to proxy it using AuthRADIUS and friends?  I'm thinking a 
> "PreForwardHook" would be ideal, but I don't see anything like that 
> currently implemented.  Is there another solution I'm not seeing, or 
> if not, would it be possible to add such a hook?

A hook that is called when a timeout occurs should do the trick. There
is already a way to modify the request when it gets forwarded for the
first time. When it times out, the hook could modify the request which
would then get resent to the same Host or the next Host. It would also
see the request when it times out for the last time and there are no
more target Hosts to try.

I do not think there is currently a way to modify the request after it
has been forwarded for the first time.

> (note: for my use case it wouldn't matter whether the hook also gets 
> called between successive retries for the same Host, all I care
> about is that it's called each time we switch to a new Host)

As mentioned above, a hook that is called when a timeout occurs would be
called for retransmits for the same Host and also when a next Host must
be chosen because the Retries limit is hit for the current Host.

> As an aside: is there any special reason that MaxTargetHosts is 
> unique to AuthVOLUMEBALANCE?  I would think it would be equally 
> applicable to all flavors of AuthRADIUS (and in particular I wish it 
> was implemented in AuthROUNDROBIN).

In your case you have 4 Hosts, but it would be enough to try e.g., 2?
With 5 second Timeout even that would take 10 seconds. The use and the
NAS probably would not wait for much longer.

I do not know why it has been implemented only for volume balance. Would
you be interested in trying it for round robin? And maybe the hook too?


Heikki Vatiainen <hvn at open.com.au>

Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS,
NetWare etc.

More information about the radiator mailing list