use = chain->use;
list_for_each_entry(rule, &chain->rules, list) {
-@@ -2145,7 +2043,7 @@ static int nf_tables_dump_rules(struct s
+@@ -2149,7 +2047,7 @@ static int nf_tables_dump_rules(struct s
cb->seq = net->nft.base_seq;
list_for_each_entry_rcu(table, &net->nft.tables, list) {
continue;
if (ctx && ctx->table && strcmp(ctx->table, table->name) != 0)
-@@ -2168,7 +2066,7 @@ static int nf_tables_dump_rules(struct s
+@@ -2172,7 +2070,7 @@ static int nf_tables_dump_rules(struct s
cb->nlh->nlmsg_seq,
NFT_MSG_NEWRULE,
NLM_F_MULTI | NLM_F_APPEND,
table, chain, rule) < 0)
goto done;
-@@ -2204,7 +2102,6 @@ static int nf_tables_getrule(struct net
+@@ -2208,7 +2106,6 @@ static int nf_tables_getrule(struct net
{
const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
u8 genmask = nft_genmask_cur(net);
const struct nft_table *table;
const struct nft_chain *chain;
const struct nft_rule *rule;
-@@ -2248,11 +2145,7 @@ static int nf_tables_getrule(struct net
+@@ -2252,11 +2149,7 @@ static int nf_tables_getrule(struct net
return netlink_dump_start(nlsk, skb, nlh, &c);
}
genmask);
if (IS_ERR(table))
return PTR_ERR(table);
-@@ -2318,7 +2211,7 @@ static int nf_tables_newrule(struct net
+@@ -2322,7 +2215,7 @@ static int nf_tables_newrule(struct net
{
const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
u8 genmask = nft_genmask_next(net);
struct nft_table *table;
struct nft_chain *chain;
struct nft_rule *rule, *old_rule = NULL;
-@@ -2334,11 +2227,7 @@ static int nf_tables_newrule(struct net
+@@ -2338,11 +2231,7 @@ static int nf_tables_newrule(struct net
create = nlh->nlmsg_flags & NLM_F_CREATE ? true : false;
genmask);
if (IS_ERR(table))
return PTR_ERR(table);
-@@ -2378,7 +2267,7 @@ static int nf_tables_newrule(struct net
+@@ -2382,7 +2271,7 @@ static int nf_tables_newrule(struct net
return PTR_ERR(old_rule);
}
n = 0;
size = 0;
-@@ -2500,18 +2389,13 @@ static int nf_tables_delrule(struct net
+@@ -2504,18 +2393,13 @@ static int nf_tables_delrule(struct net
{
const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
u8 genmask = nft_genmask_next(net);
genmask);
if (IS_ERR(table))
return PTR_ERR(table);
-@@ -2523,7 +2407,7 @@ static int nf_tables_delrule(struct net
+@@ -2527,7 +2411,7 @@ static int nf_tables_delrule(struct net
return PTR_ERR(chain);
}
if (chain) {
if (nla[NFTA_RULE_HANDLE]) {
-@@ -2708,26 +2592,17 @@ static int nft_ctx_init_from_setattr(str
+@@ -2712,26 +2596,17 @@ static int nft_ctx_init_from_setattr(str
u8 genmask)
{
const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
return 0;
}
-@@ -2960,7 +2835,7 @@ static int nf_tables_dump_sets(struct sk
+@@ -2964,7 +2839,7 @@ static int nf_tables_dump_sets(struct sk
list_for_each_entry_rcu(table, &net->nft.tables, list) {
if (ctx->family != NFPROTO_UNSPEC &&
continue;
if (ctx->table && ctx->table != table)
-@@ -2981,7 +2856,7 @@ static int nf_tables_dump_sets(struct sk
+@@ -2985,7 +2860,7 @@ static int nf_tables_dump_sets(struct sk
ctx_set = *ctx;
ctx_set.table = table;
if (nf_tables_fill_set(skb, &ctx_set, set,
NFT_MSG_NEWSET,
-@@ -3093,8 +2968,8 @@ static int nf_tables_newset(struct net *
+@@ -3097,8 +2972,8 @@ static int nf_tables_newset(struct net *
{
const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
u8 genmask = nft_genmask_next(net);
struct nft_table *table;
struct nft_set *set;
struct nft_ctx ctx;
-@@ -3204,16 +3079,12 @@ static int nf_tables_newset(struct net *
+@@ -3208,16 +3083,12 @@ static int nf_tables_newset(struct net *
create = nlh->nlmsg_flags & NLM_F_CREATE ? true : false;
set = nf_tables_set_lookup(table, nla[NFTA_SET_NAME], genmask);
if (IS_ERR(set)) {
-@@ -3475,19 +3346,15 @@ static int nft_ctx_init_from_elemattr(st
+@@ -3479,19 +3350,15 @@ static int nft_ctx_init_from_elemattr(st
u8 genmask)
{
const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
return 0;
}
-@@ -3605,7 +3472,7 @@ static int nf_tables_dump_set(struct sk_
+@@ -3609,7 +3476,7 @@ static int nf_tables_dump_set(struct sk_
rcu_read_lock();
list_for_each_entry_rcu(table, &net->nft.tables, list) {
if (dump_ctx->ctx.family != NFPROTO_UNSPEC &&
continue;
if (table != dump_ctx->ctx.table)
-@@ -3635,7 +3502,7 @@ static int nf_tables_dump_set(struct sk_
+@@ -3639,7 +3506,7 @@ static int nf_tables_dump_set(struct sk_
goto nla_put_failure;
nfmsg = nlmsg_data(nlh);
nfmsg->version = NFNETLINK_V0;
nfmsg->res_id = htons(net->nft.base_seq & 0xffff);
-@@ -4523,7 +4390,6 @@ static int nf_tables_newobj(struct net *
+@@ -4527,7 +4394,6 @@ static int nf_tables_newobj(struct net *
const struct nft_object_type *type;
u8 genmask = nft_genmask_next(net);
int family = nfmsg->nfgen_family;
struct nft_table *table;
struct nft_object *obj;
struct nft_ctx ctx;
-@@ -4535,11 +4401,7 @@ static int nf_tables_newobj(struct net *
+@@ -4539,11 +4405,7 @@ static int nf_tables_newobj(struct net *
!nla[NFTA_OBJ_DATA])
return -EINVAL;
genmask);
if (IS_ERR(table))
return PTR_ERR(table);
-@@ -4558,7 +4420,7 @@ static int nf_tables_newobj(struct net *
+@@ -4562,7 +4424,7 @@ static int nf_tables_newobj(struct net *
return 0;
}
type = nft_obj_type_get(objtype);
if (IS_ERR(type))
-@@ -4650,7 +4512,7 @@ static int nf_tables_dump_obj(struct sk_
+@@ -4654,7 +4516,7 @@ static int nf_tables_dump_obj(struct sk_
cb->seq = net->nft.base_seq;
list_for_each_entry_rcu(table, &net->nft.tables, list) {
continue;
list_for_each_entry_rcu(obj, &table->objects, list) {
-@@ -4673,7 +4535,7 @@ static int nf_tables_dump_obj(struct sk_
+@@ -4677,7 +4539,7 @@ static int nf_tables_dump_obj(struct sk_
cb->nlh->nlmsg_seq,
NFT_MSG_NEWOBJ,
NLM_F_MULTI | NLM_F_APPEND,
obj, reset) < 0)
goto done;
-@@ -4731,7 +4593,6 @@ static int nf_tables_getobj(struct net *
+@@ -4735,7 +4597,6 @@ static int nf_tables_getobj(struct net *
const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
u8 genmask = nft_genmask_cur(net);
int family = nfmsg->nfgen_family;
const struct nft_table *table;
struct nft_object *obj;
struct sk_buff *skb2;
-@@ -4762,11 +4623,7 @@ static int nf_tables_getobj(struct net *
+@@ -4766,11 +4627,7 @@ static int nf_tables_getobj(struct net *
!nla[NFTA_OBJ_TYPE])
return -EINVAL;
genmask);
if (IS_ERR(table))
return PTR_ERR(table);
-@@ -4813,7 +4670,6 @@ static int nf_tables_delobj(struct net *
+@@ -4817,7 +4674,6 @@ static int nf_tables_delobj(struct net *
const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
u8 genmask = nft_genmask_next(net);
int family = nfmsg->nfgen_family;
struct nft_table *table;
struct nft_object *obj;
struct nft_ctx ctx;
-@@ -4823,11 +4679,7 @@ static int nf_tables_delobj(struct net *
+@@ -4827,11 +4683,7 @@ static int nf_tables_delobj(struct net *
!nla[NFTA_OBJ_NAME])
return -EINVAL;
genmask);
if (IS_ERR(table))
return PTR_ERR(table);
-@@ -4839,7 +4691,7 @@ static int nf_tables_delobj(struct net *
+@@ -4843,7 +4695,7 @@ static int nf_tables_delobj(struct net *
if (obj->use > 0)
return -EBUSY;
return nft_delobj(&ctx, obj);
}
-@@ -5024,33 +4876,31 @@ err1:
+@@ -5028,33 +4880,31 @@ err1:
return err;
}
return ERR_PTR(-EAGAIN);
}
#endif
-@@ -5098,7 +4948,6 @@ static int nf_tables_newflowtable(struct
+@@ -5102,7 +4952,6 @@ static int nf_tables_newflowtable(struct
u8 genmask = nft_genmask_next(net);
int family = nfmsg->nfgen_family;
struct nft_flowtable *flowtable;
struct nft_table *table;
struct nft_ctx ctx;
int err, i, k;
-@@ -5108,12 +4957,8 @@ static int nf_tables_newflowtable(struct
+@@ -5112,12 +4961,8 @@ static int nf_tables_newflowtable(struct
!nla[NFTA_FLOWTABLE_HOOK])
return -EINVAL;
if (IS_ERR(table))
return PTR_ERR(table);
-@@ -5130,7 +4975,7 @@ static int nf_tables_newflowtable(struct
+@@ -5134,7 +4979,7 @@ static int nf_tables_newflowtable(struct
return 0;
}
flowtable = kzalloc(sizeof(*flowtable), GFP_KERNEL);
if (!flowtable)
-@@ -5143,7 +4988,7 @@ static int nf_tables_newflowtable(struct
+@@ -5147,7 +4992,7 @@ static int nf_tables_newflowtable(struct
goto err1;
}
if (IS_ERR(type)) {
err = PTR_ERR(type);
goto err2;
-@@ -5203,16 +5048,11 @@ static int nf_tables_delflowtable(struct
+@@ -5207,16 +5052,11 @@ static int nf_tables_delflowtable(struct
u8 genmask = nft_genmask_next(net);
int family = nfmsg->nfgen_family;
struct nft_flowtable *flowtable;
if (IS_ERR(table))
return PTR_ERR(table);
-@@ -5223,7 +5063,7 @@ static int nf_tables_delflowtable(struct
+@@ -5227,7 +5067,7 @@ static int nf_tables_delflowtable(struct
if (flowtable->use > 0)
return -EBUSY;
return nft_delflowtable(&ctx, flowtable);
}
-@@ -5298,7 +5138,7 @@ static int nf_tables_dump_flowtable(stru
+@@ -5302,7 +5142,7 @@ static int nf_tables_dump_flowtable(stru
cb->seq = net->nft.base_seq;
list_for_each_entry_rcu(table, &net->nft.tables, list) {
continue;
list_for_each_entry_rcu(flowtable, &table->flowtables, list) {
-@@ -5317,7 +5157,7 @@ static int nf_tables_dump_flowtable(stru
+@@ -5321,7 +5161,7 @@ static int nf_tables_dump_flowtable(stru
cb->nlh->nlmsg_seq,
NFT_MSG_NEWFLOWTABLE,
NLM_F_MULTI | NLM_F_APPEND,
goto done;
nl_dump_check_consistent(cb, nlmsg_hdr(skb));
-@@ -5377,7 +5217,6 @@ static int nf_tables_getflowtable(struct
+@@ -5381,7 +5221,6 @@ static int nf_tables_getflowtable(struct
u8 genmask = nft_genmask_cur(net);
int family = nfmsg->nfgen_family;
struct nft_flowtable *flowtable;
const struct nft_table *table;
struct sk_buff *skb2;
int err;
-@@ -5403,12 +5242,8 @@ static int nf_tables_getflowtable(struct
+@@ -5407,12 +5246,8 @@ static int nf_tables_getflowtable(struct
if (!nla[NFTA_FLOWTABLE_NAME])
return -EINVAL;
if (IS_ERR(table))
return PTR_ERR(table);
-@@ -6579,7 +6414,7 @@ int __nft_release_basechain(struct nft_c
+@@ -6583,7 +6418,7 @@ int __nft_release_basechain(struct nft_c
}
EXPORT_SYMBOL_GPL(__nft_release_basechain);
{
struct nft_flowtable *flowtable, *nf;
struct nft_table *table, *nt;
-@@ -6592,7 +6427,7 @@ static void __nft_release_afinfo(struct
+@@ -6596,7 +6431,7 @@ static void __nft_release_afinfo(struct
};
list_for_each_entry_safe(table, nt, &net->nft.tables, list) {
list_for_each_entry(chain, &table->chains, list)
nf_tables_unregister_hook(net, table, chain);
-@@ -6644,7 +6479,7 @@ static int __net_init nf_tables_init_net
+@@ -6648,7 +6483,7 @@ static int __net_init nf_tables_init_net
static void __net_exit nf_tables_exit_net(struct net *net)
{