path: root/tests/py/inet
diff options
authorShyam Saini <>2017-06-17 01:05:42 +0530
committerPablo Neira Ayuso <>2017-06-18 11:27:35 +0200
commitc20142bba09b72f398ccf8260715cd6ed9a0e865 (patch)
tree02ba6d666c07dc35833a3b6e62523068255b4472 /tests/py/inet
parent35f6cd327c2ec46296adf464f981cd6cddfec27b (diff)
tests: py: Add test for ambiguity while setting the value
This test checks bug identified and fixed in the commit mentioned below In a statement if there are multiple src data then it would be totally ambiguous to decide which value to set. Before the commit was made it returned 134(BUG), but now it returns 1 i.e, an error message. Following rules tests ambiguity while setting the value: $ sudo nft add rule ip test-ip4 output ct mark set {0x11333, 0x11} <cmdline>:1:41-55: Error: you cannot use a set here, unknown value to use add rule ip test-ip4 output ct mark set {0x11333, 0x11} ~~~~~~~~~~~~^^^^^^^^^^^^^^^ Test: 986dea8 ("evaluate: avoid reference to multiple src data in statements which set values") Signed-off-by: Shyam Saini <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'tests/py/inet')
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/py/inet/tcp.t b/tests/py/inet/tcp.t
index 5a0aab67..f25be599 100644
--- a/tests/py/inet/tcp.t
+++ b/tests/py/inet/tcp.t
@@ -6,6 +6,8 @@
+tcp dport set {1, 2, 3};fail
tcp dport 22;ok
tcp dport != 233;ok
tcp dport 33-45;ok
diff --git a/tests/py/inet/udp.t b/tests/py/inet/udp.t
index 2f16e6a1..4e3eaa51 100644
--- a/tests/py/inet/udp.t
+++ b/tests/py/inet/udp.t
@@ -15,6 +15,8 @@ udp sport != { 50, 60} accept;ok
udp sport { 12-40};ok
udp sport != { 13-24};ok
+udp dport set {1, 2, 3};fail
udp dport 80 accept;ok
udp dport != 60 accept;ok
udp dport 70-75 accept;ok