const struct nft_chain_hook *hook,
struct nft_chain *chain)
{
- ops->pf = family;
- ops->hooknum = hook->num;
- ops->priority = hook->priority;
- ops->priv = chain;
- ops->hook = hook->type->hooks[ops->hooknum];
+ ops->pf = family;
+ ops->hooknum = hook->num;
+ ops->priority = hook->priority;
+ ops->priv = chain;
+ ops->hook = hook->type->hooks[ops->hooknum];
+ ops->hook_ops_type = NF_HOOK_OP_NF_TABLES;
}
static int nft_basechain_init(struct nft_base_chain *basechain, u8 family,
}
nft_trans_chain_policy(trans) = NFT_CHAIN_POLICY_UNSET;
- if (nft_is_base_chain(chain)) {
- basechain->ops.hook_ops_type = NF_HOOK_OP_NF_TABLES;
+ if (nft_is_base_chain(chain))
nft_trans_chain_policy(trans) = policy;
- }
err = nft_chain_add(table, chain);
if (err < 0) {