summaryrefslogtreecommitdiffstats
path: root/tests/py/ip6/ip6.t
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-08-15 13:14:18 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-08-18 03:14:08 +0200
commit788c986343bc24bd0272e8aa409121ffe51f1ef3 (patch)
tree42cf0210e9fce93e0a5a951f0012e891fa750b05 /tests/py/ip6/ip6.t
parentddb1f1f8cdca2e0f70254a5adcc0291907503a36 (diff)
src: quote user-defined strings when used from rule selectors
The following selectors display strings using quotes: * meta iifname * meta oifname * meta ibriport * meta obriport However, the following do not: * meta oif * meta iif * meta skuid * meta skgid * meta iifgroup * meta oifgroup * meta rtclassid * ct label Given they refer to user-defined values, neither keywords nor internal built-in known values, let's quote the output of this. This patch modifies symbolic_constant_print() so we can signal this to indicate if the string needs to be quoted. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/ip6/ip6.t')
-rw-r--r--tests/py/ip6/ip6.t24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/py/ip6/ip6.t b/tests/py/ip6/ip6.t
index 7dea2f75..9a18f7a4 100644
--- a/tests/py/ip6/ip6.t
+++ b/tests/py/ip6/ip6.t
@@ -143,17 +143,17 @@ ip6 saddr ::1 ip6 daddr ::2;ok
ip6 daddr != ::1234:1234:1234:1234:1234:1234:1234-1234:1234::1234:1234:1234:1234:1234;ok;ip6 daddr != 0:1234:1234:1234:1234:1234:1234:1234-1234:1234:0:1234:1234:1234:1234:1234
# limit impact to lo
-iif lo ip6 daddr set ::1;ok
-iif lo ip6 hoplimit set 1;ok
-iif lo ip6 dscp set af42;ok
-iif lo ip6 dscp set 63;ok;iif lo ip6 dscp set 0x3f
-iif lo ip6 ecn set ect0;ok
-iif lo ip6 ecn set ce;ok
+iif "lo" ip6 daddr set ::1;ok
+iif "lo" ip6 hoplimit set 1;ok
+iif "lo" ip6 dscp set af42;ok
+iif "lo" ip6 dscp set 63;ok;iif "lo" ip6 dscp set 0x3f
+iif "lo" ip6 ecn set ect0;ok
+iif "lo" ip6 ecn set ce;ok
-iif lo ip6 flowlabel set 0;ok
-iif lo ip6 flowlabel set 12345;ok
-iif lo ip6 flowlabel set 0xfffff;ok;iif lo ip6 flowlabel set 1048575
+iif "lo" ip6 flowlabel set 0;ok
+iif "lo" ip6 flowlabel set 12345;ok
+iif "lo" ip6 flowlabel set 0xfffff;ok;iif "lo" ip6 flowlabel set 1048575
-iif lo ip6 ecn set 4;fail
-iif lo ip6 dscp set 64;fail
-iif lo ip6 flowlabel set 1048576;fail
+iif "lo" ip6 ecn set 4;fail
+iif "lo" ip6 dscp set 64;fail
+iif "lo" ip6 flowlabel set 1048576;fail