path: root/src/rule.c
diff options
authorTomasz Bursztyka <>2013-08-28 11:33:07 +0300
committerPablo Neira Ayuso <>2013-08-30 23:14:18 +0200
commit4318642becd67e301b19c8b24bcaf3c5200a62e8 (patch)
treef81ba92fdf7c451d46b169c95715f48a070f4dc1 /src/rule.c
parent2e27f2468ea69bd4ef15b7582e5d0ebe85c80da8 (diff)
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 <>
Diffstat (limited to 'src/rule.c')
1 files changed, 1 insertions, 1 deletions
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);