sql + ippool + redundancy

Alan DeKok aland at deployingradius.com
Fri Feb 5 08:47:06 CET 2010


Konstantin Chekushin wrote:
> I just started to learn source code of rlm_sqlippool.c to make changes
> for my issue. (I want to make sensitive return code from
> sqlippool_command and check it in sqlippool_postauth and if something
> goes wrong, then at once try to allocate next sql connection from the
> pool until I'll get an error "cannot allocate sql connection" (if one
> sql server is down) and return code RLM_MODULE_FAIL.)
> I'm not C guru, but there is a strange things in the code of this module.

  Quite possibly, yes.

> Let's look at the function "sqlippool_postauth". There is an allocation
> of the socket in the begining (string 571), but release only at the end
> (string 652). What will happans, if this procedure will return value
> untill this string? For example, when IP address could not be allocated?
> (string 648) Does it mean, that this module will "freez" pool connection
> and this may be a course of the unavailability of all sql connections?

  It looks like it.

  As always, patches are welcome.

  Alan DeKok.



More information about the Freeradius-Users mailing list