summaryrefslogtreecommitdiff
path: root/net/sched/act_ipt.c
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-07-21 17:16:09 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-07-21 17:16:09 -0300
commit4411a04f871d94ae997fb7262a428fe2ee988eb3 (patch)
tree92cb073311cb6c2eeb256969112ec61f877982d9 /net/sched/act_ipt.c
parentb907a8622e39eecfc4b243f3be3ad26559d1faee (diff)
Linux-libre 4.6.4-gnupck-4.6.4-gnu
Diffstat (limited to 'net/sched/act_ipt.c')
-rw-r--r--net/sched/act_ipt.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index 8b5270008..606323339 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -121,10 +121,13 @@ static int __tcf_ipt_init(struct tc_action_net *tn, struct nlattr *nla,
}
td = (struct xt_entry_target *)nla_data(tb[TCA_IPT_TARG]);
- if (nla_len(tb[TCA_IPT_TARG]) < td->u.target_size)
+ if (nla_len(tb[TCA_IPT_TARG]) < td->u.target_size) {
+ if (exists)
+ tcf_hash_release(a, bind);
return -EINVAL;
+ }
- if (!tcf_hash_check(tn, index, a, bind)) {
+ if (!exists) {
ret = tcf_hash_create(tn, index, est, a, sizeof(*ipt), bind,
false);
if (ret)