aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/act_ipt.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/act_ipt.c')
-rw-r--r--net/sched/act_ipt.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index 60d88b6b9560..dcbfe8ce04a6 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -141,10 +141,12 @@ static int tcf_ipt_init(struct net *net, struct nlattr *nla, struct nlattr *est,
141 return PTR_ERR(pc); 141 return PTR_ERR(pc);
142 ret = ACT_P_CREATED; 142 ret = ACT_P_CREATED;
143 } else { 143 } else {
144 if (!ovr) { 144 if (bind)/* dont override defaults */
145 tcf_ipt_release(to_ipt(pc), bind); 145 return 0;
146 tcf_ipt_release(to_ipt(pc), bind);
147
148 if (!ovr)
146 return -EEXIST; 149 return -EEXIST;
147 }
148 } 150 }
149 ipt = to_ipt(pc); 151 ipt = to_ipt(pc);
150 152
@@ -298,9 +300,7 @@ static struct tc_action_ops act_ipt_ops = {
298 .act = tcf_ipt, 300 .act = tcf_ipt,
299 .dump = tcf_ipt_dump, 301 .dump = tcf_ipt_dump,
300 .cleanup = tcf_ipt_cleanup, 302 .cleanup = tcf_ipt_cleanup,
301 .lookup = tcf_hash_search,
302 .init = tcf_ipt_init, 303 .init = tcf_ipt_init,
303 .walk = tcf_generic_walker
304}; 304};
305 305
306static struct tc_action_ops act_xt_ops = { 306static struct tc_action_ops act_xt_ops = {
@@ -312,9 +312,7 @@ static struct tc_action_ops act_xt_ops = {
312 .act = tcf_ipt, 312 .act = tcf_ipt,
313 .dump = tcf_ipt_dump, 313 .dump = tcf_ipt_dump,
314 .cleanup = tcf_ipt_cleanup, 314 .cleanup = tcf_ipt_cleanup,
315 .lookup = tcf_hash_search,
316 .init = tcf_ipt_init, 315 .init = tcf_ipt_init,
317 .walk = tcf_generic_walker
318}; 316};
319 317
320MODULE_AUTHOR("Jamal Hadi Salim(2002-13)"); 318MODULE_AUTHOR("Jamal Hadi Salim(2002-13)");