diff options
author | Florian Westphal <fw@strlen.de> | 2018-08-29 11:37:40 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-08-29 23:53:54 +0200 |
commit | bb594473acd532aee6a268a6b27fd529ac71d4b5 (patch) | |
tree | 45b2c657c37b7a94baa20a5f3562b94042b7f72f /tests/py/ip/tproxy.t.payload | |
parent | 92029c1282958aad13eb8602c67b73caf2a08a09 (diff) |
src: tproxy: relax family restrictions
evaluation step currently prohibits
tproxy ip to 1.2.3.4 in ip family, and
tproxy ip6 to dead::1 in ip6.
This seems an arbitrary limitation, just accept this.
The current restriction would make json output support harder than needed,
as the tproxy expression generated from json path would have to
special-case the table its currently in, rather than just using the
family attribute in the json output.
We obviously still reject the family in case it mismatches
the table family (e.g., can't use ip address in ip6 table).
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/py/ip/tproxy.t.payload')
-rw-r--r-- | tests/py/ip/tproxy.t.payload | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/py/ip/tproxy.t.payload b/tests/py/ip/tproxy.t.payload index 9a899a8d..035651f4 100644 --- a/tests/py/ip/tproxy.t.payload +++ b/tests/py/ip/tproxy.t.payload @@ -20,3 +20,17 @@ ip x y [ immediate reg 1 0x0000a0c3 ] [ tproxy ip port reg 1 ] +# meta l4proto 17 tproxy ip to 192.0.2.1 +ip x y + [ meta load l4proto => reg 1 ] + [ cmp eq reg 1 0x00000011 ] + [ immediate reg 1 0x010200c0 ] + [ tproxy ip addr reg 1 ] + +# meta l4proto 6 tproxy ip to 192.0.2.1:50080 +ip x y + [ meta load l4proto => reg 1 ] + [ cmp eq reg 1 0x00000006 ] + [ immediate reg 1 0x010200c0 ] + [ immediate reg 2 0x0000a0c3 ] + [ tproxy ip addr reg 1 port reg 2 ] |