From 4318642becd67e301b19c8b24bcaf3c5200a62e8 Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Wed, 28 Aug 2013 11:33:07 +0300 Subject: src: Fix base chain printing Relying on chain's hooknum to know whether the chain is a base one or not is bogus: having 0 as hooknum is a valid number. Thus setting the right flag and handling it is the way to go, as parser does already. Signed-off-by: Tomasz Bursztyka Signed-off-by: Pablo Neira Ayuso --- src/rule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rule.c') diff --git a/src/rule.c b/src/rule.c index fb0387c3..73054bad 100644 --- a/src/rule.c +++ b/src/rule.c @@ -249,7 +249,7 @@ static void chain_print(const struct chain *chain) struct rule *rule; printf("\tchain %s {\n", chain->handle.chain); - if (chain->hooknum) { + if (chain->flags & CHAIN_F_BASECHAIN) { printf("\t\t type %s hook %s %u;\n", chain->type, hooknum2str(chain->hooknum), chain->priority); } -- cgit v1.2.3