diff options
author | Florian Westphal <fw@strlen.de> | 2020-12-09 18:31:41 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2020-12-09 18:33:53 +0100 |
commit | 2aa0f63aacd31b1a997921e68e87db92ada53fdb (patch) | |
tree | 84ce6343965ed4ba9e72b1e239f16b05f42b61ad /tests/py/ip/icmp.t.payload.ip | |
parent | 53cb4815a1ef87118531a78569412159554a1672 (diff) |
tests: ip: add one test case to cover both id and sequence
These are two 2-byte matches, so nft will merge the accesses to
a single 4-byte load+compare.
Check this is properly demangled.
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/py/ip/icmp.t.payload.ip')
-rw-r--r-- | tests/py/ip/icmp.t.payload.ip | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/py/ip/icmp.t.payload.ip b/tests/py/ip/icmp.t.payload.ip index 6ed4dff8..e238c4bb 100644 --- a/tests/py/ip/icmp.t.payload.ip +++ b/tests/py/ip/icmp.t.payload.ip @@ -502,6 +502,18 @@ ip test-ip4 input [ payload load 2b @ transport header + 6 => reg 1 ] [ lookup reg 1 set __set%d 0x1 ] +# icmp id 1 icmp sequence 2 +__set%d test-ip4 3 +__set%d test-ip4 0 + element 00000008 : 0 [end] element 00000000 : 0 [end] +ip + [ meta load l4proto => reg 1 ] + [ cmp eq reg 1 0x00000001 ] + [ payload load 1b @ transport header + 0 => reg 1 ] + [ lookup reg 1 set __set%d ] + [ payload load 4b @ transport header + 4 => reg 1 ] + [ cmp eq reg 1 0x02000100 ] + # icmp mtu 33 ip test-ip4 input [ meta load l4proto => reg 1 ] |