ssfilter: Fix for inverted last expression
When fixing for shift/reduce conflicts, possibility to invert the last
expression by prefixing with '!' or 'not' was accidentally removed.
Fix this by allowing for expr to be an inverted expr so that any
reference to it in exprlist accepts the inverted prefix.
Reported-by: Eric Dumazet <edumazet@google.com>
Fixes: b2038cc0b2 ("ssfilter: Eliminate shift/reduce conflicts")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
5eead6270a
commit
6495bca92e
|
|
@ -54,10 +54,6 @@ null: /* NOTHING */ { $$ = NULL; }
|
|||
;
|
||||
|
||||
exprlist: expr
|
||||
| '!' expr
|
||||
{
|
||||
$$ = alloc_node(SSF_NOT, $2);
|
||||
}
|
||||
| exprlist '|' expr
|
||||
{
|
||||
$$ = alloc_node(SSF_OR, $1);
|
||||
|
|
@ -83,6 +79,10 @@ expr: '(' exprlist ')'
|
|||
{
|
||||
$$ = $2;
|
||||
}
|
||||
| '!' expr
|
||||
{
|
||||
$$ = alloc_node(SSF_NOT, $2);
|
||||
}
|
||||
| DCOND eq HOSTCOND
|
||||
{
|
||||
$$ = alloc_node(SSF_DCOND, $3);
|
||||
|
|
|
|||
Loading…
Reference in New Issue