summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2013-08-28 11:33:07 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>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 <tomasz.bursztyka@linux.intel.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c2
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);
}