From c190433c7d31a623d7fc1741757896bbcdc4c0c7 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Wed, 29 Apr 2015 14:29:43 +0300 Subject: [PATCH] Fixed dbfwfilter rules. Fixed at_times not working if combined with on_queries. --- server/modules/filter/dbfwfilter.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/modules/filter/dbfwfilter.c b/server/modules/filter/dbfwfilter.c index 58eedcc4b..372309034 100644 --- a/server/modules/filter/dbfwfilter.c +++ b/server/modules/filter/dbfwfilter.c @@ -977,7 +977,7 @@ bool parse_rule(char* rule, FW_INSTANCE* instance) TIMERANGE *tr = NULL; while(tok){ if(strcmp(tok,"on_queries") == 0) - goto reparse_rule; + break; if(!check_time(tok)) { skygw_log_write(LOGFILE_ERROR,"dbfwfilter: Rule parsing failed, malformed time definition: %s",tok); @@ -1003,8 +1003,12 @@ bool parse_rule(char* rule, FW_INSTANCE* instance) tr = tmp; tok = strtok_r(NULL, " ,",&saveptr); } + ruledef->active = tr; + if(strcmp(tok,"on_queries") == 0) + goto reparse_rule; + } else if(strcmp(tok,"regex") == 0) {