Alan DeKok [aland@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.