]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
set server_cs in proto_radius and REQUEST
authorAlan T. DeKok <aland@freeradius.org>
Thu, 15 Jun 2017 19:40:45 +0000 (15:40 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 15 Jun 2017 19:40:45 +0000 (15:40 -0400)
src/modules/proto_radius/proto_radius.c

index 6e1da73c5032c9ab8c2ecb67fbbd70de71394f0c..27acbf1f97b05045c06cd6fe81275b06d99d0d85 100644 (file)
@@ -34,6 +34,8 @@
  *
  */
 typedef struct {
+       CONF_SECTION            *server_cs;                     //!< server CS for this listener
+
        dl_submodule_t          *io_submodule;                  //!< I/O module's instance.
        dl_submodule_t          **subtype_submodule;            //!< Instance of the various types
                                                                //!< only one instance per type allowed.
@@ -209,6 +211,8 @@ static void mod_set_process(REQUEST *request, void const *instance)
        rad_assert(request->packet->code != 0);
        rad_assert(request->packet->code < FR_CODE_MAX);
 
+       request->server_cs = inst->server_cs;
+
        subtype = inst->subtype_by_code[request->packet->code];
        if (!subtype) {
                REDEBUG("No module available to handle packet code %i", request->packet->code);
@@ -291,6 +295,8 @@ static int mod_instantiate(void *instance, CONF_SECTION *conf)
        fr_dict_attr_t const    *da;
        CONF_PAIR               *cp = NULL;
 
+       inst->server_cs = conf;
+
        /*
         *      Instantiate the IO module
         */
@@ -337,7 +343,7 @@ static int mod_instantiate(void *instance, CONF_SECTION *conf)
  * Bootstrap I/O and type submodules.
  *
  * @param[in] instance Ctx data for this application.
- * @param[in] conf     Listen section parsed to give us isntance.
+ * @param[in] conf     Listen section parsed to give us instance.
  * @return
  *     - 0 on success.
  *     - -1 on failure.