From b848ff5de4e974dd9e471fc0888ea990a86e34af Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 28 Nov 2014 21:20:59 +0100 Subject: datatype: relax datatype check in integer_type_parse() Otherwise parsing with basetypes doesn't work. Now nft displays an error when the symbolic constant is not correct: :1:29-31: Error: Could not parse conntrack state add rule test test ct state xxx accept ^^^ Use .sym_tbl instead and default on the symbol_constant_parse() function from the ethertype and pkttype, this simplifies the code and (more importantly) it avoids a breakage after the change in integer_type_parse(). Signed-off-by: Pablo Neira Ayuso --- tests/regression/any/ct.t | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/regression') diff --git a/tests/regression/any/ct.t b/tests/regression/any/ct.t index 79674ee7..09f72ed0 100644 --- a/tests/regression/any/ct.t +++ b/tests/regression/any/ct.t @@ -14,6 +14,7 @@ ct state {new,established, related, untracked};ok ct state invalid drop;ok ct state established accept;ok ct state 8;ok;ct state new +ct state xxx;fail ct direction original;ok ct direction != original;ok @@ -21,12 +22,14 @@ ct direction reply;ok ct direction != reply;ok ct direction {reply, original};ok - ct direction != {reply, original};ok +ct direction xxx;fail ct status expected;ok ct status != expected;ok ct status seen-reply;ok ct status != seen-reply;ok ct status {expected, seen-reply, assured, confirmed, dying};ok +ct status xxx;fail # SYMBOL("snat", IPS_SRC_NAT) # SYMBOL("dnat", IPS_DST_NAT) -- cgit v1.2.3