struct nftnl_batch *batch,
enum nf_tables_msg_types msg_type,
unsigned int flags, uint32_t *seqnum,
- const struct expr *set,
+ const struct expr *init,
struct netlink_ctx *ctx)
{
struct nlattr *nest1, *nest2;
if (msg_type == NFT_MSG_NEWSETELEM)
flags |= NLM_F_CREATE;
- if (set)
- expr = list_first_entry(&set->expressions, struct expr, list);
+ if (init)
+ expr = list_first_entry(&init->expressions, struct expr, list);
next:
nlh = nftnl_nlmsg_build_hdr(nftnl_batch_buffer(batch), msg_type,
htonl(nftnl_set_get_u32(nls, NFTNL_SET_ID)));
}
- if (!set || list_empty(&set->expressions))
+ if (!init || list_empty(&init->expressions))
return 0;
assert(expr);
nest1 = mnl_attr_nest_start(nlh, NFTA_SET_ELEM_LIST_ELEMENTS);
- list_for_each_entry_from(expr, &set->expressions, list) {
- nlse = alloc_nftnl_setelem(set, expr);
+ list_for_each_entry_from(expr, &init->expressions, list) {
+ nlse = alloc_nftnl_setelem(init, expr);
cmd_add_loc(cmd, nlh, &expr->location);
nest2 = mnl_attr_nest_start(nlh, ++i);