Correct bug which caused "r" rules to get incorrectly rejected as "ri" rules

This commit is contained in:
hpa 2004-09-23 02:22:02 +00:00
parent 6299024e7a
commit 9630aae006
3 changed files with 8 additions and 2 deletions

View file

@ -234,7 +234,8 @@ static int parseline(char *line, struct rule *r, int lineno)
if ( !(r->rule_flags & RULE_REWRITE) )
r->rule_flags &= ~RULE_GLOBAL;
if ( r->rule_flags & (RULE_INVERSE|RULE_REWRITE) ) {
if ( (r->rule_flags & (RULE_INVERSE|RULE_REWRITE)) ==
(RULE_INVERSE|RULE_REWRITE) ) {
syslog(LOG_ERR, "r rules cannot be inverted, line %d: %s\n", lineno, line);
return -1; /* Error */
}