summaryrefslogtreecommitdiffstats
path: root/tests/py/inet/osf.t.json
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-10-24 12:35:03 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-10-24 12:55:13 +0200
commit0eb1b3f9a83dfbe2f3001fd3d9cec497a352b9af (patch)
treeba1d51a8a95fe13a191ffcb8a1fa08681e9ebec3 /tests/py/inet/osf.t.json
parenteff35932059569d2a36a14dd911091c0bec00032 (diff)
json: Fix osf ttl support
Having to use numerical values for ttl property in JSON is not practical as these values are arbitrary and meaningful only in netfilter. Instead align JSON output/input with standard API, accepting names for TTL matching strategy. Also add missing documentation in libnftables-json man page and fix JSON equivalent in tests/py. Fixes: 03eafe098d5ee ("osf: add ttl option support") Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/inet/osf.t.json')
-rw-r--r--tests/py/inet/osf.t.json35
1 files changed, 32 insertions, 3 deletions
diff --git a/tests/py/inet/osf.t.json b/tests/py/inet/osf.t.json
index 45335cab..452f3023 100644
--- a/tests/py/inet/osf.t.json
+++ b/tests/py/inet/osf.t.json
@@ -4,7 +4,6 @@
"match": {
"left": {
"osf": {
- "ttl": 0,
"key": "name"
}
},
@@ -14,13 +13,44 @@
}
]
+# osf ttl loose name "Linux"
+[
+ {
+ "match": {
+ "left": {
+ "osf": {
+ "key": "name",
+ "ttl": "loose"
+ }
+ },
+ "op": "==",
+ "right": "Linux"
+ }
+ }
+]
+
+# osf ttl skip name "Linux"
+[
+ {
+ "match": {
+ "left": {
+ "osf": {
+ "key": "name",
+ "ttl": "skip"
+ }
+ },
+ "op": "==",
+ "right": "Linux"
+ }
+ }
+]
+
# osf name { "Windows", "MacOs" }
[
{
"match": {
"left": {
"osf": {
- "ttl": 0,
"key": "name"
}
},
@@ -60,7 +90,6 @@
},
"key": {
"osf": {
- "ttl": 0,
"key": "name"
}
}