]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Added "control" as alias for "config.
authorAlan T. DeKok <aland@freeradius.org>
Tue, 21 Apr 2009 15:07:46 +0000 (17:07 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 21 Apr 2009 15:07:46 +0000 (17:07 +0200)
Patch from Alexander Clouter

src/modules/rlm_attr_rewrite/rlm_attr_rewrite.c

index d02ea9fa7a151119aa93a2d6f9193d49c4413fa0..054ead8c07e3a3a57310253255f2c98a2b1e48ca 100644 (file)
@@ -42,7 +42,7 @@ typedef struct rlm_attr_rewrite_t {
        int  attr_num;          /* The attribute number */
        char *search;           /* The pattern to search for */
        int search_len;         /* The length of the search pattern */
-       char *searchin_str;     /* The VALUE_PAIR list to search in. Can be either packet,reply,proxy,proxy_reply or config */
+       char *searchin_str;     /* The VALUE_PAIR list to search in. Can be either packet,reply,proxy,proxy_reply or control (plus it's alias 'config') */
        char searchin;          /* The same as above just coded as a number for speed */
        char *replace;          /* The replacement */
        int replace_len;        /* The length of the replacement string */
@@ -120,6 +120,8 @@ static int attr_rewrite_instantiate(CONF_SECTION *conf, void **instance)
                        data->searchin = RLM_REGEX_INPACKET;
                else if (strcmp(data->searchin_str, "config") == 0)
                        data->searchin = RLM_REGEX_INCONFIG;
+               else if (strcmp(data->searchin_str, "control") == 0)
+                       data->searchin = RLM_REGEX_INCONFIG;
                else if (strcmp(data->searchin_str, "reply") == 0)
                        data->searchin = RLM_REGEX_INREPLY;
                else if (strcmp(data->searchin_str, "proxy") == 0)