]> 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>
Thu, 22 Jul 2021 13:55:24 +0000 (09:55 -0400)
src/main/process.c

index 49bc481f4867ba4fda5f5691609988d595eb922c..03f066891b1b9ed256a1e20d132fb1a933d56b77 100644 (file)
@@ -2528,6 +2528,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);
 
@@ -2552,14 +2561,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);
        }