diff options
author | Patrick McHardy <kaber@trash.net> | 2010-07-06 05:57:22 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-07-06 05:57:22 +0200 |
commit | d4aea11c6a7674e4290dc71a4ac93c1d5be7240d (patch) | |
tree | 252eb3d12a9ee4b8910ce911919ca7141e042924 /src/netlink.c | |
parent | b20ba656ba7de066d4dcf5ebeef605e6acc7e01d (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.c | 2 |
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); } |