summaryrefslogtreecommitdiffstats
path: root/tests/py/bridge/vlan.t.json
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2022-07-25 20:02:28 +0200
committerFlorian Westphal <fw@strlen.de>2022-08-05 01:46:39 +0200
commit87c3041bfd244aaf39e644d33c0df4fe04079e1c (patch)
tree6e44cb324330023d2ffea02dc1a92bf046030ca6 /tests/py/bridge/vlan.t.json
parentb1e3ed0335d13d206a2a2698a1ba189fa396dbf3 (diff)
evaluate: search stacked header list for matching payload dep
"ether saddr 0:1:2:3:4:6 vlan id 2" works, but reverse fails: "vlan id 2 ether saddr 0:1:2:3:4:6" will give Error: conflicting protocols specified: vlan vs. ether After "proto: track full stack of seen l2 protocols, not just cumulative offset", we have a list of all l2 headers, so search those to see if we had this proto base in the past before rejecting this. Reported-by: Eric Garver <eric@garver.life> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/py/bridge/vlan.t.json')
-rw-r--r--tests/py/bridge/vlan.t.json56
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/py/bridge/vlan.t.json b/tests/py/bridge/vlan.t.json
index e7640f9a..58d4a40f 100644
--- a/tests/py/bridge/vlan.t.json
+++ b/tests/py/bridge/vlan.t.json
@@ -761,3 +761,59 @@
}
}
]
+
+# ether saddr 00:01:02:03:04:05 vlan id 1
+[
+ {
+ "match": {
+ "left": {
+ "payload": {
+ "field": "saddr",
+ "protocol": "ether"
+ }
+ },
+ "op": "==",
+ "right": "00:01:02:03:04:05"
+ }
+ },
+ {
+ "match": {
+ "left": {
+ "payload": {
+ "field": "id",
+ "protocol": "vlan"
+ }
+ },
+ "op": "==",
+ "right": 1
+ }
+ }
+]
+
+# vlan id 2 ether saddr 0:1:2:3:4:6
+[
+ {
+ "match": {
+ "left": {
+ "payload": {
+ "field": "saddr",
+ "protocol": "ether"
+ }
+ },
+ "op": "==",
+ "right": "00:01:02:03:04:06"
+ }
+ },
+ {
+ "match": {
+ "left": {
+ "payload": {
+ "field": "id",
+ "protocol": "vlan"
+ }
+ },
+ "op": "==",
+ "right": 2
+ }
+ }
+]