diff options
author | Phil Sutter <phil@nwl.cc> | 2018-06-08 17:27:18 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-06-11 11:31:49 +0200 |
commit | f63b54623fcd1ab7d2f51928571c164409f00175 (patch) | |
tree | 49acf0abdbeb4552f66a720fb5ca76a8ce9930d2 /tests/py/any/fwd.t.json | |
parent | 78f8d8127eac64abb14e1d4a4309b353ba03bdb6 (diff) |
JSON: Support latest enhancements of fwd statement
JSON equivalent of fwd statement was too primitive to support the added
address and family parameters, so make its value an object and accept
the device expression as value of a "dev" property in there. Then add
optional "addr" and "family" properties to it.
While being at it, add a testcase to make sure the extended syntax works
right.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/any/fwd.t.json')
-rw-r--r-- | tests/py/any/fwd.t.json | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/tests/py/any/fwd.t.json b/tests/py/any/fwd.t.json index 644d6d48..e58a8ad2 100644 --- a/tests/py/any/fwd.t.json +++ b/tests/py/any/fwd.t.json @@ -1,7 +1,9 @@ # fwd to "lo" [ { - "fwd": "lo" + "fwd": { + "dev": "lo" + } } ] @@ -9,24 +11,37 @@ [ { "fwd": { - "map": { - "left": { - "meta": "mark" - }, - "right": { - "set": [ - [ - "0x00000001", - "lo" - ], - [ - "0x00000002", - "lo" + "dev": { + "map": { + "left": { + "meta": "mark" + }, + "right": { + "set": [ + [ + "0x00000001", + "lo" + ], + [ + "0x00000002", + "lo" + ] ] - ] + } } } } } ] +# fwd ip to 192.168.2.200 device "lo" +[ + { + "fwd": { + "addr": "192.168.2.200", + "dev": "lo", + "family": "ip" + } + } +] + |