diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-08-15 13:14:18 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-08-18 03:14:08 +0200 |
commit | 788c986343bc24bd0272e8aa409121ffe51f1ef3 (patch) | |
tree | 42cf0210e9fce93e0a5a951f0012e891fa750b05 /tests/py/inet/udp.t.payload.ip | |
parent | ddb1f1f8cdca2e0f70254a5adcc0291907503a36 (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/inet/udp.t.payload.ip')
-rw-r--r-- | tests/py/inet/udp.t.payload.ip | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/py/inet/udp.t.payload.ip b/tests/py/inet/udp.t.payload.ip index 8b4550dc..5d36fe5f 100644 --- a/tests/py/inet/udp.t.payload.ip +++ b/tests/py/inet/udp.t.payload.ip @@ -220,7 +220,7 @@ ip test-ip4 input [ payload load 2b @ transport header + 6 => reg 1 ] [ lookup reg 1 set __set%d ] -# iif lo udp checksum set 0 +# iif "lo" udp checksum set 0 ip test-ip4 input [ meta load iif => reg 1 ] [ cmp eq reg 1 0x00000001 ] @@ -229,7 +229,7 @@ ip test-ip4 input [ immediate reg 1 0x00000000 ] [ payload write reg 1 => 2b @ transport header + 6 csum_type 1 csum_off 6 ] -# iif lo udp dport set 65535 +# iif "lo" udp dport set 65535 ip test-ip4 input [ meta load iif => reg 1 ] [ cmp eq reg 1 0x00000001 ] |