From: Alan T. DeKok Date: Tue, 21 Apr 2009 15:07:46 +0000 (+0200) Subject: Added "control" as alias for "config. X-Git-Tag: release_2_1_7~202 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=352e954020df6d0aed9f805c80522cb1255b60f1;p=thirdparty%2Ffreeradius-server.git Added "control" as alias for "config. Patch from Alexander Clouter --- diff --git a/src/modules/rlm_attr_rewrite/rlm_attr_rewrite.c b/src/modules/rlm_attr_rewrite/rlm_attr_rewrite.c index d02ea9fa7a1..054ead8c07e 100644 --- a/src/modules/rlm_attr_rewrite/rlm_attr_rewrite.c +++ b/src/modules/rlm_attr_rewrite/rlm_attr_rewrite.c @@ -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)