#include "radiusd.h"
#include "rad_assert.h"
#include "modules.h"
+#include "request_list.h"
static uint32_t proxy_id = 1;
* care of doing that.
*/
if ((request->options & RAD_REQUEST_OPTION_FAKE_REQUEST) == 0) {
+ /*
+ * Add the proxied request to the
+ * list of outstanding proxied
+ * requests, BEFORE we send it, so
+ * we have fewer problems with race
+ * conditions when the responses come
+ * back very quickly.
+ */
+ rl_add_proxy(request);
+
rad_send(request->proxy, NULL,
(char *)request->proxysecret);
}
* the reply packet from the home server.
*/
case RLM_MODULE_HANDLED:
- /*
- * Add the proxied request to the
- * list of outstanding proxied
- * requests.
- */
- rl_add_proxy(request);
-
goto postpone_request;
break;
}