]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
mode has to be set correctly, due to the CONF_PARSER function
authorNick Porter <nick@portercomputing.co.uk>
Mon, 1 Sep 2025 09:58:25 +0000 (10:58 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Mon, 1 Sep 2025 09:58:25 +0000 (10:58 +0100)
src/modules/rlm_radius/rlm_radius.c

index a9b2b8fe82883c409ea606d72dc3bcc653da9af6..19cbbf2d9aed8e408e6e9b95e7be3d3c6fce9120 100644 (file)
@@ -641,45 +641,6 @@ static int mod_instantiate(module_inst_ctx_t const *mctx)
        inst->name = mctx->mi->name;
        inst->received_message_authenticator = talloc_zero(NULL, bool);         /* Allocated outside of inst to default protection */
 
-       /*
-        *      Allow explicit setting of mode.
-        */
-       if (inst->mode != RLM_RADIUS_MODE_INVALID) goto check_others;
-
-       /*
-        *      If not set, try to insinuate it from context.
-        */
-       if (inst->replicate) {
-               if (inst->originate) {
-                       cf_log_err(conf, "Cannot set 'replicate=true' and 'originate=true' at the same time.");
-                       return -1;
-               }
-
-               if (inst->synchronous) {
-                       cf_log_warn(conf, "Ignoring 'synchronous=true' due to 'replicate=true'");
-               }
-
-               inst->mode = RLM_RADIUS_MODE_REPLICATE;
-               goto check_others;
-       }
-
-       /*
-        *      Argubly we should be allowed to do synchronous proxying _and_ originating client packets.
-        *
-        *      However, the previous code didn't really do that consistently.
-        */
-       if (inst->synchronous && inst->originate) {
-               cf_log_err(conf, "Cannot set 'synchronous=true' and 'originate=true'");
-               return -1;
-       }
-
-       if (inst->synchronous) {
-               inst->mode = RLM_RADIUS_MODE_PROXY;
-       } else {
-               inst->mode = RLM_RADIUS_MODE_CLIENT;
-       }
-
-check_others:
        /*
         *      Replication is write-only, and append by default.
         */