|
|
@@ -65,12 +65,13 @@ static int ipt_init_target(struct net *net, struct xt_entry_target *t,
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static void ipt_destroy_target(struct xt_entry_target *t)
|
|
|
+static void ipt_destroy_target(struct xt_entry_target *t, struct net *net)
|
|
|
{
|
|
|
struct xt_tgdtor_param par = {
|
|
|
.target = t->u.kernel.target,
|
|
|
.targinfo = t->data,
|
|
|
.family = NFPROTO_IPV4,
|
|
|
+ .net = net,
|
|
|
};
|
|
|
if (par.target->destroy != NULL)
|
|
|
par.target->destroy(&par);
|
|
|
@@ -82,7 +83,7 @@ static void tcf_ipt_release(struct tc_action *a)
|
|
|
struct tcf_ipt *ipt = to_ipt(a);
|
|
|
|
|
|
if (ipt->tcfi_t) {
|
|
|
- ipt_destroy_target(ipt->tcfi_t);
|
|
|
+ ipt_destroy_target(ipt->tcfi_t, a->idrinfo->net);
|
|
|
kfree(ipt->tcfi_t);
|
|
|
}
|
|
|
kfree(ipt->tcfi_tname);
|
|
|
@@ -182,7 +183,7 @@ static int __tcf_ipt_init(struct net *net, unsigned int id, struct nlattr *nla,
|
|
|
|
|
|
spin_lock_bh(&ipt->tcf_lock);
|
|
|
if (ret != ACT_P_CREATED) {
|
|
|
- ipt_destroy_target(ipt->tcfi_t);
|
|
|
+ ipt_destroy_target(ipt->tcfi_t, net);
|
|
|
kfree(ipt->tcfi_tname);
|
|
|
kfree(ipt->tcfi_t);
|
|
|
}
|
|
|
@@ -353,7 +354,7 @@ static __net_init int ipt_init_net(struct net *net)
|
|
|
{
|
|
|
struct tc_action_net *tn = net_generic(net, ipt_net_id);
|
|
|
|
|
|
- return tc_action_net_init(tn, &act_ipt_ops);
|
|
|
+ return tc_action_net_init(net, tn, &act_ipt_ops);
|
|
|
}
|
|
|
|
|
|
static void __net_exit ipt_exit_net(struct list_head *net_list)
|
|
|
@@ -403,7 +404,7 @@ static __net_init int xt_init_net(struct net *net)
|
|
|
{
|
|
|
struct tc_action_net *tn = net_generic(net, xt_net_id);
|
|
|
|
|
|
- return tc_action_net_init(tn, &act_xt_ops);
|
|
|
+ return tc_action_net_init(net, tn, &act_xt_ops);
|
|
|
}
|
|
|
|
|
|
static void __net_exit xt_exit_net(struct list_head *net_list)
|