diff options
author | Xiao Liang <shaw.leon@gmail.com> | 2021-08-21 00:12:37 +0800 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-08-23 16:34:52 +0200 |
commit | bd6ba14bebd27181ee18cfc3aebb21a78d96d672 (patch) | |
tree | 5e88ef776bfc3e6f6b418239d51b218689f76417 /tests/py/any/meta.t | |
parent | ffde58ab86507755ba7049a00dde5c4df6f26fbe (diff) |
src: Optimize prefix match only if is big-endian
A prefix of integer type is big-endian in nature. Prefix match can be
optimized to truncated 'cmp' only if it is big-endian.
[ Add one tests/py for this use-case --pablo ]
Fixes: 25338cdb6c77 ("src: Optimize prefix matches on byte-boundaries")
Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/any/meta.t')
-rw-r--r-- | tests/py/any/meta.t | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/py/any/meta.t b/tests/py/any/meta.t index 125b0a3f..6ec4853e 100644 --- a/tests/py/any/meta.t +++ b/tests/py/any/meta.t @@ -55,6 +55,7 @@ meta mark and 0x03 == 0x01;ok;meta mark & 0x00000003 == 0x00000001 meta mark and 0x03 != 0x01;ok;meta mark & 0x00000003 != 0x00000001 meta mark 0x10;ok;meta mark 0x00000010 meta mark != 0x10;ok;meta mark != 0x00000010 +meta mark 0xffffff00/24;ok meta mark or 0x03 == 0x01;ok;meta mark | 0x00000003 == 0x00000001 meta mark or 0x03 != 0x01;ok;meta mark | 0x00000003 != 0x00000001 |