set the family attribute on the chain
@@ -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_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)
- {
+ 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);
