]> git.proxmox.com Git - mirror_iproute2.git/commit
ss: Review ssfilter
authorPhil Sutter <phil@nwl.cc>
Tue, 14 Aug 2018 12:18:06 +0000 (14:18 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 15 Aug 2018 21:25:18 +0000 (14:25 -0700)
commit38d209ecf2ae966b9b25de4acb60cdffb0e06ced
tree527147230f7f5dabe5002fb594bfe8c210669ba2
parent8a03a2f36f767bd36b22929c78a370bd43059aee
ss: Review ssfilter

The original problem was ssfilter rejecting single expressions if
enclosed in braces, such as:

| sport = 22 or ( dport = 22 )

This is fixed by allowing 'expr' to be an 'exprlist' enclosed in braces.
The no longer required recursion in 'exprlist' being an 'exprlist'
enclosed in braces is dropped.

In addition to that, a few other things are changed:

* Remove pointless 'null' prefix in 'appled' before 'exprlist'.
* For simple equals matches, '=' operator was required for ports but not
  allowed for hosts. Make this consistent by making '=' operator
  optional in both cases.

Reported-by: Samuel Mannehed <samuel@cendio.se>
Fixes: b2038cc0b2403 ("ssfilter: Eliminate shift/reduce conflicts")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
misc/ssfilter.y