From d297735543a8c32b83e40563f01fea33e233b4ef Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 28 Nov 2014 19:04:21 +0100 Subject: datatype: fix crash when using basetype instead of symbolic constants The following example: # nft add rule filter input ct state 8 accept Segmentation fault leads to a crash because we have the following datatype relation: ct_state -> bitmask -> integer The bitmask, which is an intermediate basetype, has no parse() function, this leads to a crash in symbolic_constant_parse(). Patrick suggested to walk down the chain until we find a parser function. Reported-by: leroy christophe Signed-off-by: Pablo Neira Ayuso --- tests/regression/any/ct.t | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/regression') diff --git a/tests/regression/any/ct.t b/tests/regression/any/ct.t index 7ce898de..79674ee7 100644 --- a/tests/regression/any/ct.t +++ b/tests/regression/any/ct.t @@ -13,6 +13,7 @@ ct state {new,established, related, untracked};ok - 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 direction original;ok ct direction != original;ok -- cgit v1.2.3