From dd8481cc1c92af32ec69cded42b985b7bad40b26 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 18 May 2021 19:54:18 +0200 Subject: Flowspec: Do not use comma for bitmask operators For numeric operators, comma is used for disjunction in expressions like "10, 20, 30..40". But for bitmask operators, comma is used for conjunction in a way that does not really make much sense. Use always explicit logical operators (&& and ||) to connect bitmask operators. Thanks to Matt Corallo for the bugreport. --- filter/test.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'filter') diff --git a/filter/test.conf b/filter/test.conf index 63af25bb..653bb82f 100644 --- a/filter/test.conf +++ b/filter/test.conf @@ -579,7 +579,7 @@ prefix p; bt_assert(format(flow6 { sport 0..0x400; }) = "flow6 { sport 0..1024; }"); bt_assert(format(flow6 { icmp type 80; }) = "flow6 { icmp type 80; }"); bt_assert(format(flow6 { icmp code 90; }) = "flow6 { icmp code 90; }"); - bt_assert(format(flow6 { tcp flags 0x03/0x0f; }) = "flow6 { tcp flags 0x3/0x3,0x0/0xc; }"); + bt_assert(format(flow6 { tcp flags 0x03/0x0f; }) = "flow6 { tcp flags 0x3/0x3 && 0x0/0xc; }"); bt_assert(format(flow6 { length 0..65535; }) = "flow6 { length 0..65535; }"); bt_assert(format(flow6 { dscp = 63; }) = "flow6 { dscp 63; }"); bt_assert(format(flow6 { fragment is_fragment || !first_fragment; }) = "flow6 { fragment is_fragment || !first_fragment; }"); -- cgit v1.2.3