diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-02-25 12:36:10 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-02-25 13:40:34 +0100 |
commit | 51a09ac313cccff1dd65f546d218e9a6fa2a668f (patch) | |
tree | 1096c7a727ebe61ff224dcadb20254907d019f5f /tests/py | |
parent | f2406b0014198e821a6fe0e663bec33e5db77f99 (diff) |
tests: py: fix incorrect bytecode in numgen and hash mappings
Byteorder is not correct as it is expressed in network byteorder. This
uncovered when storing set byteorder in NFTA_USER_DATA.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py')
-rw-r--r-- | tests/py/ip/hash.t.payload | 2 | ||||
-rw-r--r-- | tests/py/ip/numgen.t.payload | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/py/ip/hash.t.payload b/tests/py/ip/hash.t.payload index c410a8c6..8c28ad98 100644 --- a/tests/py/ip/hash.t.payload +++ b/tests/py/ip/hash.t.payload @@ -29,7 +29,7 @@ ip test-ip4 pre # dnat to jhash ip saddr mod 2 seed 0xdeadbeef map { 0 : 192.168.20.100, 1 : 192.168.30.100 } __map%d test-ip4 b __map%d test-ip4 0 - element 00000000 : 6414a8c0 0 [end] element 01000000 : 641ea8c0 0 [end] + element 00000000 : 6414a8c0 0 [end] element 00000001 : 641ea8c0 0 [end] ip test-ip4 pre [ payload load 4b @ network header + 12 => reg 2 ] [ hash reg 1 = jhash(reg 2, 4, 0xdeadbeef) % mod 2 ] diff --git a/tests/py/ip/numgen.t.payload b/tests/py/ip/numgen.t.payload index a8ba2149..04088b75 100644 --- a/tests/py/ip/numgen.t.payload +++ b/tests/py/ip/numgen.t.payload @@ -6,7 +6,7 @@ ip test-ip4 pre # dnat to numgen inc mod 2 map { 0 : 192.168.10.100, 1 : 192.168.20.200 } __map%d x b __map%d x 0 - element 00000000 : 640aa8c0 0 [end] element 01000000 : c814a8c0 0 [end] + element 00000000 : 640aa8c0 0 [end] element 00000001 : c814a8c0 0 [end] ip test-ip4 pre [ numgen reg 1 = inc mod 2 ] [ lookup reg 1 set __map%d dreg 1 ] |