summaryrefslogtreecommitdiffstats
path: root/src/netlink.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2010-07-06 05:57:22 +0200
committerPatrick McHardy <kaber@trash.net>2010-07-06 05:57:22 +0200
commitd4aea11c6a7674e4290dc71a4ac93c1d5be7240d (patch)
tree252eb3d12a9ee4b8910ce911919ca7141e042924 /src/netlink.c
parentb20ba656ba7de066d4dcf5ebeef605e6acc7e01d (diff)
netlink: fix creation of base chains with hooknum and priority 0
Base chains with both a hook number and priority of zero are created as regular chains. Fix by adding a BASECHAIN flag indicating that the chain should be created as a base chain. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'src/netlink.c')
-rw-r--r--src/netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/netlink.c b/src/netlink.c
index 54d92c42..0427f4ac 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -422,7 +422,7 @@ int netlink_add_chain(struct netlink_ctx *ctx, const struct handle *h,
int err;
nlc = alloc_nft_chain(h);
- if (chain != NULL && (chain->hooknum || chain->priority)) {
+ if (chain != NULL && chain->flags & CHAIN_F_BASECHAIN) {
nfnl_nft_chain_set_hooknum(nlc, chain->hooknum);
nfnl_nft_chain_set_priority(nlc, chain->priority);
}