]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
hoist reverse_coa checks before _all_ "remove from proxy hash" calls
authorAlan T. DeKok <aland@freeradius.org>
Tue, 6 Apr 2021 12:31:25 +0000 (08:31 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 6 Apr 2021 12:31:25 +0000 (08:31 -0400)
src/main/process.c

index fb74da8cf233842e1a46630387fc000ce49af699..df705e830d1766ec8e72c3245abc6ef9a10d77ad 100644 (file)
@@ -2523,6 +2523,15 @@ static int process_proxy_reply(REQUEST *request, RADIUS_PACKET *reply)
        if (post_proxy_type > 0) RDEBUG2("Found Post-Proxy-Type %s",
                                         dict_valnamebyattr(PW_POST_PROXY_TYPE, 0, post_proxy_type));
 
+#ifdef WITH_COA_TUNNEL
+       /*
+        *      Cache this, as request->proxy_listener will be
+        *      NULL after removing the request from the proxy
+        *      hash.
+        */
+       reverse_coa = request->proxy_listener->type != RAD_LISTEN_PROXY;
+#endif
+
        if (reply) {
                VERIFY_PACKET(reply);
 
@@ -2547,14 +2556,6 @@ static int process_proxy_reply(REQUEST *request, RADIUS_PACKET *reply)
                        rad_assert(!request->in_proxy_hash);
                }
        } else if (request->in_proxy_hash) {
-#ifdef WITH_COA_TUNNEL
-               /*
-                *      Cache this, as request->proxy_listener will be
-                *      NULL after removing the request from the proxy
-                *      hash.
-                */
-               reverse_coa = request->proxy_listener->type != RAD_LISTEN_PROXY;
-#endif
                remove_from_proxy_hash(request);
        }