|
@@ -292,7 +292,7 @@ Signed-off-by: Pablo Neira Ayuso <[email protected]>
|
|
list_for_each_entry_safe(obj, ne, &ctx->table->objects, list) {
|
|
list_for_each_entry_safe(obj, ne, &ctx->table->objects, list) {
|
|
err = nft_delobj(ctx, obj);
|
|
err = nft_delobj(ctx, obj);
|
|
if (err < 0)
|
|
if (err < 0)
|
|
-@@ -4765,6 +4809,605 @@ static void nf_tables_obj_notify(const s
|
|
|
|
|
|
+@@ -4767,6 +4811,605 @@ static void nf_tables_obj_notify(const s
|
|
ctx->afi->family, ctx->report, GFP_KERNEL);
|
|
ctx->afi->family, ctx->report, GFP_KERNEL);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -898,7 +898,7 @@ Signed-off-by: Pablo Neira Ayuso <[email protected]>
|
|
static int nf_tables_fill_gen_info(struct sk_buff *skb, struct net *net,
|
|
static int nf_tables_fill_gen_info(struct sk_buff *skb, struct net *net,
|
|
u32 portid, u32 seq)
|
|
u32 portid, u32 seq)
|
|
{
|
|
{
|
|
-@@ -4795,6 +5438,49 @@ nla_put_failure:
|
|
|
|
|
|
+@@ -4797,6 +5440,49 @@ nla_put_failure:
|
|
return -EMSGSIZE;
|
|
return -EMSGSIZE;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -948,7 +948,7 @@ Signed-off-by: Pablo Neira Ayuso <[email protected]>
|
|
static void nf_tables_gen_notify(struct net *net, struct sk_buff *skb,
|
|
static void nf_tables_gen_notify(struct net *net, struct sk_buff *skb,
|
|
int event)
|
|
int event)
|
|
{
|
|
{
|
|
-@@ -4947,6 +5633,21 @@ static const struct nfnl_callback nf_tab
|
|
|
|
|
|
+@@ -4949,6 +5635,21 @@ static const struct nfnl_callback nf_tab
|
|
.attr_count = NFTA_OBJ_MAX,
|
|
.attr_count = NFTA_OBJ_MAX,
|
|
.policy = nft_obj_policy,
|
|
.policy = nft_obj_policy,
|
|
},
|
|
},
|
|
@@ -970,7 +970,7 @@ Signed-off-by: Pablo Neira Ayuso <[email protected]>
|
|
};
|
|
};
|
|
|
|
|
|
static void nft_chain_commit_update(struct nft_trans *trans)
|
|
static void nft_chain_commit_update(struct nft_trans *trans)
|
|
-@@ -4992,6 +5693,9 @@ static void nf_tables_commit_release(str
|
|
|
|
|
|
+@@ -4994,6 +5695,9 @@ static void nf_tables_commit_release(str
|
|
case NFT_MSG_DELOBJ:
|
|
case NFT_MSG_DELOBJ:
|
|
nft_obj_destroy(nft_trans_obj(trans));
|
|
nft_obj_destroy(nft_trans_obj(trans));
|
|
break;
|
|
break;
|
|
@@ -980,7 +980,7 @@ Signed-off-by: Pablo Neira Ayuso <[email protected]>
|
|
}
|
|
}
|
|
kfree(trans);
|
|
kfree(trans);
|
|
}
|
|
}
|
|
-@@ -5109,6 +5813,21 @@ static int nf_tables_commit(struct net *
|
|
|
|
|
|
+@@ -5111,6 +5815,21 @@ static int nf_tables_commit(struct net *
|
|
nf_tables_obj_notify(&trans->ctx, nft_trans_obj(trans),
|
|
nf_tables_obj_notify(&trans->ctx, nft_trans_obj(trans),
|
|
NFT_MSG_DELOBJ);
|
|
NFT_MSG_DELOBJ);
|
|
break;
|
|
break;
|
|
@@ -1002,7 +1002,7 @@ Signed-off-by: Pablo Neira Ayuso <[email protected]>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-@@ -5146,6 +5865,9 @@ static void nf_tables_abort_release(stru
|
|
|
|
|
|
+@@ -5148,6 +5867,9 @@ static void nf_tables_abort_release(stru
|
|
case NFT_MSG_NEWOBJ:
|
|
case NFT_MSG_NEWOBJ:
|
|
nft_obj_destroy(nft_trans_obj(trans));
|
|
nft_obj_destroy(nft_trans_obj(trans));
|
|
break;
|
|
break;
|
|
@@ -1012,7 +1012,7 @@ Signed-off-by: Pablo Neira Ayuso <[email protected]>
|
|
}
|
|
}
|
|
kfree(trans);
|
|
kfree(trans);
|
|
}
|
|
}
|
|
-@@ -5235,6 +5957,17 @@ static int nf_tables_abort(struct net *n
|
|
|
|
|
|
+@@ -5237,6 +5959,17 @@ static int nf_tables_abort(struct net *n
|
|
nft_clear(trans->ctx.net, nft_trans_obj(trans));
|
|
nft_clear(trans->ctx.net, nft_trans_obj(trans));
|
|
nft_trans_destroy(trans);
|
|
nft_trans_destroy(trans);
|
|
break;
|
|
break;
|
|
@@ -1030,7 +1030,7 @@ Signed-off-by: Pablo Neira Ayuso <[email protected]>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-@@ -5785,6 +6518,7 @@ EXPORT_SYMBOL_GPL(__nft_release_basechai
|
|
|
|
|
|
+@@ -5787,6 +6520,7 @@ EXPORT_SYMBOL_GPL(__nft_release_basechai
|
|
/* Called by nft_unregister_afinfo() from __net_exit path, nfnl_lock is held. */
|
|
/* Called by nft_unregister_afinfo() from __net_exit path, nfnl_lock is held. */
|
|
static void __nft_release_afinfo(struct net *net, struct nft_af_info *afi)
|
|
static void __nft_release_afinfo(struct net *net, struct nft_af_info *afi)
|
|
{
|
|
{
|
|
@@ -1038,7 +1038,7 @@ Signed-off-by: Pablo Neira Ayuso <[email protected]>
|
|
struct nft_table *table, *nt;
|
|
struct nft_table *table, *nt;
|
|
struct nft_chain *chain, *nc;
|
|
struct nft_chain *chain, *nc;
|
|
struct nft_object *obj, *ne;
|
|
struct nft_object *obj, *ne;
|
|
-@@ -5798,6 +6532,9 @@ static void __nft_release_afinfo(struct
|
|
|
|
|
|
+@@ -5800,6 +6534,9 @@ static void __nft_release_afinfo(struct
|
|
list_for_each_entry_safe(table, nt, &afi->tables, list) {
|
|
list_for_each_entry_safe(table, nt, &afi->tables, list) {
|
|
list_for_each_entry(chain, &table->chains, list)
|
|
list_for_each_entry(chain, &table->chains, list)
|
|
nf_tables_unregister_hook(net, table, chain);
|
|
nf_tables_unregister_hook(net, table, chain);
|
|
@@ -1048,7 +1048,7 @@ Signed-off-by: Pablo Neira Ayuso <[email protected]>
|
|
/* No packets are walking on these chains anymore. */
|
|
/* No packets are walking on these chains anymore. */
|
|
ctx.table = table;
|
|
ctx.table = table;
|
|
list_for_each_entry(chain, &table->chains, list) {
|
|
list_for_each_entry(chain, &table->chains, list) {
|
|
-@@ -5808,6 +6545,11 @@ static void __nft_release_afinfo(struct
|
|
|
|
|
|
+@@ -5810,6 +6547,11 @@ static void __nft_release_afinfo(struct
|
|
nf_tables_rule_destroy(&ctx, rule);
|
|
nf_tables_rule_destroy(&ctx, rule);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1060,7 +1060,7 @@ Signed-off-by: Pablo Neira Ayuso <[email protected]>
|
|
list_for_each_entry_safe(set, ns, &table->sets, list) {
|
|
list_for_each_entry_safe(set, ns, &table->sets, list) {
|
|
list_del(&set->list);
|
|
list_del(&set->list);
|
|
table->use--;
|
|
table->use--;
|
|
-@@ -5851,6 +6593,8 @@ static int __init nf_tables_module_init(
|
|
|
|
|
|
+@@ -5853,6 +6595,8 @@ static int __init nf_tables_module_init(
|
|
if (err < 0)
|
|
if (err < 0)
|
|
goto err3;
|
|
goto err3;
|
|
|
|
|
|
@@ -1069,7 +1069,7 @@ Signed-off-by: Pablo Neira Ayuso <[email protected]>
|
|
pr_info("nf_tables: (c) 2007-2009 Patrick McHardy <[email protected]>\n");
|
|
pr_info("nf_tables: (c) 2007-2009 Patrick McHardy <[email protected]>\n");
|
|
return register_pernet_subsys(&nf_tables_net_ops);
|
|
return register_pernet_subsys(&nf_tables_net_ops);
|
|
err3:
|
|
err3:
|
|
-@@ -5865,6 +6609,7 @@ static void __exit nf_tables_module_exit
|
|
|
|
|
|
+@@ -5867,6 +6611,7 @@ static void __exit nf_tables_module_exit
|
|
{
|
|
{
|
|
unregister_pernet_subsys(&nf_tables_net_ops);
|
|
unregister_pernet_subsys(&nf_tables_net_ops);
|
|
nfnetlink_subsys_unregister(&nf_tables_subsys);
|
|
nfnetlink_subsys_unregister(&nf_tables_subsys);
|