diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-08-28 22:47:05 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-08-30 09:39:50 +0200 |
commit | 01167c393a12c74c6f9a3015b75702964ff5bcda (patch) | |
tree | 0dedf08cf3245f689b52010612f1061de24a9ec2 /files | |
parent | 0ba90cceaf8693a392196112c809302271259758 (diff) |
evaluate: do not remove anonymous set with protocol flags and single element
Set lookups with flags search for an exact match, however:
tcp flags { syn }
gets transformed into:
tcp flags syn
which is matching on the syn flag only (non-exact match).
This optimization is safe for ct state though, because only one bit is
ever set on in the ct state bitmask.
Since protocol flags allow for combining flags, skip this optimization
to retain exact match semantics.
Another possible solution is to turn OP_IMPLICIT into OP_EQ for exact
flag match to re-introduce this optimization and deal with this corner
case.
Fixes: fee6bda06403 ("evaluate: remove anon sets with exactly one element")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'files')
0 files changed, 0 insertions, 0 deletions