diff options
Diffstat (limited to 'net/sched/act_ipt.c')
-rw-r--r-- | net/sched/act_ipt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c index 6148e323ed93..b8c50600697a 100644 --- a/net/sched/act_ipt.c +++ b/net/sched/act_ipt.c | |||
@@ -123,10 +123,13 @@ static int __tcf_ipt_init(struct tc_action_net *tn, struct nlattr *nla, | |||
123 | } | 123 | } |
124 | 124 | ||
125 | td = (struct xt_entry_target *)nla_data(tb[TCA_IPT_TARG]); | 125 | td = (struct xt_entry_target *)nla_data(tb[TCA_IPT_TARG]); |
126 | if (nla_len(tb[TCA_IPT_TARG]) < td->u.target_size) | 126 | if (nla_len(tb[TCA_IPT_TARG]) < td->u.target_size) { |
127 | if (exists) | ||
128 | tcf_hash_release(a, bind); | ||
127 | return -EINVAL; | 129 | return -EINVAL; |
130 | } | ||
128 | 131 | ||
129 | if (!tcf_hash_check(tn, index, a, bind)) { | 132 | if (!exists) { |
130 | ret = tcf_hash_create(tn, index, est, a, sizeof(*ipt), bind, | 133 | ret = tcf_hash_create(tn, index, est, a, sizeof(*ipt), bind, |
131 | false); | 134 | false); |
132 | if (ret) | 135 | if (ret) |