diff options
Diffstat (limited to 'tests/py/any')
-rw-r--r-- | tests/py/any/fwd.t | 1 | ||||
-rw-r--r-- | tests/py/any/fwd.t.json | 45 | ||||
-rw-r--r-- | tests/py/any/fwd.t.json.output | 30 | ||||
-rw-r--r-- | tests/py/any/fwd.t.payload | 6 |
4 files changed, 53 insertions, 29 deletions
diff --git a/tests/py/any/fwd.t b/tests/py/any/fwd.t index d9b4514e..986a16d9 100644 --- a/tests/py/any/fwd.t +++ b/tests/py/any/fwd.t @@ -5,3 +5,4 @@ fwd to "lo";ok fwd to mark map { 0x00000001 : "lo", 0x00000002 : "lo"};ok +fwd ip to 192.168.2.200 device "lo";ok 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" + } + } +] + diff --git a/tests/py/any/fwd.t.json.output b/tests/py/any/fwd.t.json.output index 5a943567..e4bad620 100644 --- a/tests/py/any/fwd.t.json.output +++ b/tests/py/any/fwd.t.json.output @@ -2,21 +2,23 @@ [ { "fwd": { - "map": { - "left": { - "meta": "mark" - }, - "right": { - "set": [ - [ - 1, - "lo" - ], - [ - 2, - "lo" + "dev": { + "map": { + "left": { + "meta": "mark" + }, + "right": { + "set": [ + [ + 1, + "lo" + ], + [ + 2, + "lo" + ] ] - ] + } } } } diff --git a/tests/py/any/fwd.t.payload b/tests/py/any/fwd.t.payload index 696b55ef..966c08b0 100644 --- a/tests/py/any/fwd.t.payload +++ b/tests/py/any/fwd.t.payload @@ -12,3 +12,9 @@ netdev test-netdev ingress [ lookup reg 1 set __map%d dreg 1 ] [ fwd sreg_dev 1 ] +# fwd ip to 192.168.2.200 device "lo" +netdev test-netdev ingress + [ immediate reg 1 0x00000001 ] + [ immediate reg 2 0xc802a8c0 ] + [ fwd sreg_dev 1 sreg_addr 2 nfproto 2 ] + |