From 1be79d5467badd914ddc5762a6510a304140ef5e Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 21 Sep 2012 11:57:55 +0200 Subject: bugfix: some valid legacy PRI filters were flagged as errornous closes: http://bugzilla.adiscon.com/show_bug.cgi?id=358 This happend to filters of the style "local0,local1.*", where the multiple facilities were comma-separated. --- ChangeLog | 4 ++++ grammar/lexer.l | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8eef4235..cab825eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ Version 6.4.3 [V6-STABLE] 2012-??-?? - bugfix: sysklogd-emulating standard template was no longer present in v6 This was obviously lost during the transition to the new config format. Thanks to Milan Bartos for alerting us and a patch! +- bugfix: some valid legacy PRI filters were flagged as errornous + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=358 + This happend to filters of the style "local0,local1.*", where the + multiple facilities were comma-separated. --------------------------------------------------------------------------- Version 6.4.2 [V6-STABLE] 2012-09-20 - bugfix: potential abort, if action queue could not be properly started diff --git a/grammar/lexer.l b/grammar/lexer.l index 6ac7fd9a..caa0f24d 100644 --- a/grammar/lexer.l +++ b/grammar/lexer.l @@ -164,7 +164,7 @@ int fileno(FILE *stream); "action"[ \n\t]*"(" { BEGIN INOBJ; return BEGIN_ACTION; } ^[ \t]*:\$?[a-z\-]+[ ]*,[ ]*!?[a-z]+[ ]*,[ ]*\".*\" { yylval.s = strdup(yytext); return PROPFILT; } -^[ \t]*[\*a-z][,\*a-z]*[0-7]*\.[,!=;\.\*a-z0-7]+ { yylval.s = strdup(yytext); return PRIFILT; } +^[ \t]*[\*a-z][,\*a-z]*[0-7]*[,!=;\.\*a-z0-7]+ { yylval.s = strdup(yytext); return PRIFILT; } "~" | "*" | \-\/[^*][^\n]* | -- cgit v1.2.3 From a41f3c34ab7d0e4e19d69f25f3c85d96966b8067 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 21 Sep 2012 18:01:21 +0200 Subject: Implemented different grammar for pri filters The method introduced by the previous commit caused issues in v7 as it was too generic. Most importantly, it permitted simple words (like "stop") to (invalidly) be detected as pri filters. Now, the grammar is close to the initial one, and each pri filter must at least have a comma or a period inside it, which does not conflict with simple words. --- grammar/lexer.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammar/lexer.l b/grammar/lexer.l index caa0f24d..f03659c3 100644 --- a/grammar/lexer.l +++ b/grammar/lexer.l @@ -164,7 +164,7 @@ int fileno(FILE *stream); "action"[ \n\t]*"(" { BEGIN INOBJ; return BEGIN_ACTION; } ^[ \t]*:\$?[a-z\-]+[ ]*,[ ]*!?[a-z]+[ ]*,[ ]*\".*\" { yylval.s = strdup(yytext); return PROPFILT; } -^[ \t]*[\*a-z][,\*a-z]*[0-7]*[,!=;\.\*a-z0-7]+ { yylval.s = strdup(yytext); return PRIFILT; } +^[ \t]*[\*a-z][\*a-z]*[0-7]*[\.,][,!=;\.\*a-z0-7]+ { yylval.s = strdup(yytext); return PRIFILT; } "~" | "*" | \-\/[^*][^\n]* | -- cgit v1.2.3