diff --git a/miniupnpd/netfilter_nft/nftnlrdr_misc.c b/miniupnpd/netfilter_nft/nftnlrdr_misc.c index 236767d..8b3e3c2 100644 --- a/miniupnpd/netfilter_nft/nftnlrdr_misc.c +++ b/miniupnpd/netfilter_nft/nftnlrdr_misc.c @@ -1354,10 +1354,10 @@ chain_op(enum nf_tables_msg_types op, uint16_t family, const char * table, log_error("out of memory: %m"); result = -2; } else { - nftnl_chain_set(chain, NFTNL_CHAIN_TABLE, table); - nftnl_chain_set(chain, NFTNL_CHAIN_NAME, name); - if (op == NFT_MSG_NEWCHAIN) - { + nftnl_chain_set_u32(chain, NFTNL_CHAIN_FAMILY, family); + nftnl_chain_set(chain, NFTNL_CHAIN_TABLE, table); + nftnl_chain_set(chain, NFTNL_CHAIN_NAME, name); + if (op == NFT_MSG_NEWCHAIN) { nftnl_chain_set_str(chain, NFTNL_CHAIN_TYPE, type); nftnl_chain_set_u32(chain, NFTNL_CHAIN_HOOKNUM, hooknum); nftnl_chain_set_s32(chain, NFTNL_CHAIN_PRIO, priority);