From c20142bba09b72f398ccf8260715cd6ed9a0e865 Mon Sep 17 00:00:00 2001 From: Shyam Saini Date: Sat, 17 Jun 2017 01:05:42 +0530 Subject: 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} :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 --- tests/py/bridge/ether.t | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/py/bridge') diff --git a/tests/py/bridge/ether.t b/tests/py/bridge/ether.t index 5c6766eb..15f5f857 100644 --- a/tests/py/bridge/ether.t +++ b/tests/py/bridge/ether.t @@ -8,3 +8,5 @@ tcp dport 22 ether saddr 00:0f:54:0c:11:04 ip daddr 1.2.3.4;ok ether saddr 00:0f:54:0c:11:04 ip daddr 1.2.3.4 accept;ok ether daddr 00:01:02:03:04:05 ether saddr set ff:fe:dc:ba:98:76 drop;ok + +ether daddr set {01:00:5e:00:01:01, 01:00:5e:00:02:02};fail -- cgit v1.2.3