proxy server goes deaf after "Client has closed connection" (RadSec to home server)

Brian Julin BJulin at clarku.edu
Thu Mar 15 21:32:28 CET 2012


Alan DeKok [aland at deployingradius.com] wrote:
> Sent: Friday, March 09, 2012 3:25 AM
> Brian Julin wrote:
> > This keeps the server listening, but there are some lingering issues:
>
>  Well, fixes are welcome.
>
>  I don't have time to look into this for a few weeks at least.

request_proxy_anew was assuming its argument would be installed in the
proxy_list, which wasn't the case, so it was removing it twice causing 
.num_outgoing counters to roll over.  Then, request_proxy was not expecting
the case where the argument was already in the proxy_list (put there by
request_proxy_anew) and was failing when attempting to add it a second
time.  The latter makes me wonder why or if request_proxy_anew works at all.

The attached patch seems to do the trick.  Some caveats:

This bypasses (for certain situations) the attempts to make sure that
a duplicate packet does not reuse the proxy_list ID of its predecessor.
Not knowing the reasoning behind that, I don't know if that's important
or not.

request_proxy has a "retransmit" flag as a parameter, which might be the
better test to avoid inserting the entry twice, or might not be.

Off topic, JOOC, while reading through the source I was left wondering what
prevents proxy_wait_for_reply from entering master-only functions from a
non-master thread when it falls through the DUP case into the TIMER case.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: proxy_anew.diff
Type: text/x-diff
Size: 2401 bytes
Desc: proxy_anew.diff
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20120315/deaf86a9/attachment.diff>


More information about the Freeradius-Users mailing list