[syslog-ng] DOTDOT problem

Balazs Scheidler bazsi@balabit.hu
Wed, 1 Mar 2000 22:13:36 +0100


> I am running syslog-ng 1.4.0rc3.
> 
> I am having a bit of a problem with the '..' operator for priorities.
> 
> I have a filter :
> 
> filter authlogs {
> 	facility(auth) and priority(emerg..info);
> };
> 
> Error level through info work just fine... but I get nothing above error.
> 
> However if I expand the '..' I get all the levels between emerg and info.

try this patch:
diff -u -r1.33 cfg-grammar.y
--- cfg-grammar.y       2000/02/25 12:11:42     1.33
+++ cfg-grammar.y       2000/03/01 21:10:26
@@ -533,9 +533,13 @@
            r1 = syslog_lookup_level($1);
            if (r1 == -1)
              werror("Warning: Unknown priority level %z\n", $1);
+           else
+             r1 = sl_levels[r1].value;
            r2 = syslog_lookup_level($3);
            if (r2 == -1)
              werror("Warning: Unknown priority level %z\n", $1);
+           else
+             r2 = sl_levels[r2].value;
            if (r1 != -1 && r2 != -1)
              $$ = syslog_make_range(r1, r2); 
            else


-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
     url: http://www.balabit.hu/pgpkey.txt