summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-04-13 14:36:32 +0200
committerFlorian Westphal <fw@strlen.de>2018-04-17 23:23:06 +0200
commit3baa28f24b3d70a7ee17d584c113a2c4e057a565 (patch)
treec42914610e573bb441505820a1e6ff9eb10f5288 /tests
parentce2cc622cb110952323cd310046505653e406193 (diff)
src: rename ibrportname, obrportname
For bridge, iifname is the port name, whereas 'ibrport' is the logical name of the bridge ("br0") the port ("iifname") is enslaved to. So, 'ibrport' is a misnomer. libnftl calls these 'bri_iifname' and 'bri_oifname', which is good but using 'briiifname' in nft is rather ugly, so use 'ibridgename' and 'obridgename' instead. Old names are still recognized, listing shows the new names. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/py/bridge/meta.t6
-rw-r--r--tests/py/bridge/meta.t.payload10
-rw-r--r--tests/py/inet/meta.t2
-rw-r--r--tests/py/ip/meta.t3
4 files changed, 21 insertions, 0 deletions
diff --git a/tests/py/bridge/meta.t b/tests/py/bridge/meta.t
new file mode 100644
index 00000000..ed373677
--- /dev/null
+++ b/tests/py/bridge/meta.t
@@ -0,0 +1,6 @@
+:input;type filter hook input priority 0
+
+*bridge;test-bridge;input
+
+meta obridgename "br0";ok;meta obridgename "br0"
+meta ibridgename "br0";ok;meta ibridgename "br0"
diff --git a/tests/py/bridge/meta.t.payload b/tests/py/bridge/meta.t.payload
new file mode 100644
index 00000000..2728c0a5
--- /dev/null
+++ b/tests/py/bridge/meta.t.payload
@@ -0,0 +1,10 @@
+# meta obridgename "br0"
+bridge test-bridge input
+ [ meta load bri_oifname => reg 1 ]
+ [ cmp eq reg 1 0x00307262 0x00000000 0x00000000 0x00000000 ]
+
+# meta ibridgename "br0"
+bridge test-bridge input
+ [ meta load bri_iifname => reg 1 ]
+ [ cmp eq reg 1 0x00307262 0x00000000 0x00000000 0x00000000 ]
+
diff --git a/tests/py/inet/meta.t b/tests/py/inet/meta.t
index d68896dc..cfde9f32 100644
--- a/tests/py/inet/meta.t
+++ b/tests/py/inet/meta.t
@@ -14,3 +14,5 @@ meta nfproto ipv6 meta l4proto tcp;ok;meta nfproto ipv6 meta l4proto 6
meta nfproto ipv4 counter ip saddr 1.2.3.4;ok
meta secpath exists;ok
meta secpath missing;ok
+meta ibridgename "br0";fail
+meta obridgename "br0";fail
diff --git a/tests/py/ip/meta.t b/tests/py/ip/meta.t
index d0682adf..c3afae79 100644
--- a/tests/py/ip/meta.t
+++ b/tests/py/ip/meta.t
@@ -7,3 +7,6 @@ meta l4proto icmp icmp type echo-request;ok;icmp type echo-request
meta l4proto ipv6-icmp icmpv6 type nd-router-advert;ok;icmpv6 type nd-router-advert
meta l4proto 58 icmpv6 type nd-router-advert;ok;icmpv6 type nd-router-advert
icmpv6 type nd-router-advert;ok
+
+meta ibridgename "br0";fail
+meta obridgename "br0";fail