]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't proxy dynamic client definition packets
authorAlan T. DeKok <aland@freeradius.org>
Sun, 26 Nov 2017 15:42:19 +0000 (10:42 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 26 Nov 2017 15:42:19 +0000 (10:42 -0500)
src/modules/rlm_radius/rlm_radius.c

index 02d2c442ce4a8e235d43636360f5e9d0d2d6bb60..2abc2d39690d463bb829df3826a6f707cdf22e95 100644 (file)
@@ -488,22 +488,27 @@ static rlm_rcode_t CC_HINT(nonnull) mod_process(void *instance, void *thread, RE
         *      signaling.
         */
        if (request->packet->code == FR_CODE_STATUS_SERVER) {
-               RDEBUG("Cannot proxy Status-Server packets");
+               REDEBUG("Cannot proxy Status-Server packets");
                return RLM_MODULE_FAIL;
        }
 
        if ((request->packet->code >= FR_MAX_PACKET_CODE) ||
            !inst->retry[request->packet->code].irt) { /* can't be zero */
-               RDEBUG("Invalid packet code %d", request->packet->code);
+               REDEBUG("Invalid packet code %d", request->packet->code);
                return RLM_MODULE_FAIL;
        }
 
        if (!inst->allowed[request->packet->code]) {
-               RDEBUG("Packet code %s is disallowed by the configuration",
+               REDEBUG("Packet code %s is disallowed by the configuration",
                       fr_packet_codes[request->packet->code]);
                return RLM_MODULE_FAIL;
        }
 
+       if (request->client->dynamic && !request->client->active) {
+               REDEBUG("Cannot proxy packets which define dynamic clients");
+               return RLM_MODULE_FAIL;
+       }
+
        /*
         *      Allocate and fill in the data structure which links
         *      the request to the IO submodule.