nft_chain_set() is directly used in xtables-restore.c, however at that
point no builtin chains have been created yet thus the need to request
to build it relevantly.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
}
nlh = nft_chain_nlmsg_build_hdr(buf, NFT_MSG_NEWCHAIN, h->family,
+ h->restore ? NLM_F_ACK|NLM_F_CREATE :
NLM_F_ACK, h->seq);
nft_chain_nlmsg_build_payload(nlh, c);
struct mnl_nlmsg_batch *batch;
struct nft_family_ops *ops;
struct builtin_table *tables;
+ bool restore;
};
extern struct builtin_table xtables_ipv4[TABLES_MAX];
{
struct nft_handle h = {
.family = family,
+ .restore = true,
};
char buffer[10240];
int c;