|
@@ -324,6 +324,13 @@ static int tcf_ipt_search(struct net *net, struct tc_action **a, u32 index,
|
|
return tcf_idr_search(tn, a, index);
|
|
return tcf_idr_search(tn, a, index);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int tcf_ipt_delete(struct net *net, u32 index)
|
|
|
|
+{
|
|
|
|
+ struct tc_action_net *tn = net_generic(net, ipt_net_id);
|
|
|
|
+
|
|
|
|
+ return tcf_idr_delete_index(tn, index);
|
|
|
|
+}
|
|
|
|
+
|
|
static struct tc_action_ops act_ipt_ops = {
|
|
static struct tc_action_ops act_ipt_ops = {
|
|
.kind = "ipt",
|
|
.kind = "ipt",
|
|
.type = TCA_ACT_IPT,
|
|
.type = TCA_ACT_IPT,
|
|
@@ -334,6 +341,7 @@ static struct tc_action_ops act_ipt_ops = {
|
|
.init = tcf_ipt_init,
|
|
.init = tcf_ipt_init,
|
|
.walk = tcf_ipt_walker,
|
|
.walk = tcf_ipt_walker,
|
|
.lookup = tcf_ipt_search,
|
|
.lookup = tcf_ipt_search,
|
|
|
|
+ .delete = tcf_ipt_delete,
|
|
.size = sizeof(struct tcf_ipt),
|
|
.size = sizeof(struct tcf_ipt),
|
|
};
|
|
};
|
|
|
|
|
|
@@ -374,6 +382,13 @@ static int tcf_xt_search(struct net *net, struct tc_action **a, u32 index,
|
|
return tcf_idr_search(tn, a, index);
|
|
return tcf_idr_search(tn, a, index);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int tcf_xt_delete(struct net *net, u32 index)
|
|
|
|
+{
|
|
|
|
+ struct tc_action_net *tn = net_generic(net, xt_net_id);
|
|
|
|
+
|
|
|
|
+ return tcf_idr_delete_index(tn, index);
|
|
|
|
+}
|
|
|
|
+
|
|
static struct tc_action_ops act_xt_ops = {
|
|
static struct tc_action_ops act_xt_ops = {
|
|
.kind = "xt",
|
|
.kind = "xt",
|
|
.type = TCA_ACT_XT,
|
|
.type = TCA_ACT_XT,
|
|
@@ -384,6 +399,7 @@ static struct tc_action_ops act_xt_ops = {
|
|
.init = tcf_xt_init,
|
|
.init = tcf_xt_init,
|
|
.walk = tcf_xt_walker,
|
|
.walk = tcf_xt_walker,
|
|
.lookup = tcf_xt_search,
|
|
.lookup = tcf_xt_search,
|
|
|
|
+ .delete = tcf_xt_delete,
|
|
.size = sizeof(struct tcf_ipt),
|
|
.size = sizeof(struct tcf_ipt),
|
|
};
|
|
};
|
|
|
|
|