diff options
Diffstat (limited to 'net/sched/act_ipt.c')
-rw-r--r-- | net/sched/act_ipt.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c index c2a7c20e81c1..9fc211a1b20e 100644 --- a/net/sched/act_ipt.c +++ b/net/sched/act_ipt.c | |||
@@ -138,7 +138,7 @@ static int tcf_ipt_init(struct nlattr *nla, struct nlattr *est, | |||
138 | pc = tcf_hash_create(index, est, a, sizeof(*ipt), bind, | 138 | pc = tcf_hash_create(index, est, a, sizeof(*ipt), bind, |
139 | &ipt_idx_gen, &ipt_hash_info); | 139 | &ipt_idx_gen, &ipt_hash_info); |
140 | if (IS_ERR(pc)) | 140 | if (IS_ERR(pc)) |
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 (!ovr) { |
@@ -162,7 +162,8 @@ static int tcf_ipt_init(struct nlattr *nla, struct nlattr *est, | |||
162 | if (unlikely(!t)) | 162 | if (unlikely(!t)) |
163 | goto err2; | 163 | goto err2; |
164 | 164 | ||
165 | if ((err = ipt_init_target(t, tname, hook)) < 0) | 165 | err = ipt_init_target(t, tname, hook); |
166 | if (err < 0) | ||
166 | goto err3; | 167 | goto err3; |
167 | 168 | ||
168 | spin_lock_bh(&ipt->tcf_lock); | 169 | spin_lock_bh(&ipt->tcf_lock); |
@@ -212,8 +213,9 @@ static int tcf_ipt(struct sk_buff *skb, struct tc_action *a, | |||
212 | bstats_update(&ipt->tcf_bstats, skb); | 213 | bstats_update(&ipt->tcf_bstats, skb); |
213 | 214 | ||
214 | /* yes, we have to worry about both in and out dev | 215 | /* yes, we have to worry about both in and out dev |
215 | worry later - danger - this API seems to have changed | 216 | * worry later - danger - this API seems to have changed |
216 | from earlier kernels */ | 217 | * from earlier kernels |
218 | */ | ||
217 | par.in = skb->dev; | 219 | par.in = skb->dev; |
218 | par.out = NULL; | 220 | par.out = NULL; |
219 | par.hooknum = ipt->tcfi_hook; | 221 | par.hooknum = ipt->tcfi_hook; |
@@ -253,9 +255,9 @@ static int tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int | |||
253 | struct tc_cnt c; | 255 | struct tc_cnt c; |
254 | 256 | ||
255 | /* for simple targets kernel size == user size | 257 | /* for simple targets kernel size == user size |
256 | ** user name = target name | 258 | * user name = target name |
257 | ** for foolproof you need to not assume this | 259 | * for foolproof you need to not assume this |
258 | */ | 260 | */ |
259 | 261 | ||
260 | t = kmemdup(ipt->tcfi_t, ipt->tcfi_t->u.user.target_size, GFP_ATOMIC); | 262 | t = kmemdup(ipt->tcfi_t, ipt->tcfi_t->u.user.target_size, GFP_ATOMIC); |
261 | if (unlikely(!t)) | 263 | if (unlikely(!t)) |