diff options
Diffstat (limited to 'net/sched/ipt.c')
-rw-r--r-- | net/sched/ipt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sched/ipt.c b/net/sched/ipt.c index f50136eed211..b5001939b74b 100644 --- a/net/sched/ipt.c +++ b/net/sched/ipt.c | |||
@@ -201,11 +201,10 @@ tcf_ipt_cleanup(struct tc_action *a, int bind) | |||
201 | } | 201 | } |
202 | 202 | ||
203 | static int | 203 | static int |
204 | tcf_ipt(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) | 204 | tcf_ipt(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res) |
205 | { | 205 | { |
206 | int ret = 0, result = 0; | 206 | int ret = 0, result = 0; |
207 | struct tcf_ipt *p = PRIV(a, ipt); | 207 | struct tcf_ipt *p = PRIV(a, ipt); |
208 | struct sk_buff *skb = *pskb; | ||
209 | 208 | ||
210 | if (skb_cloned(skb)) { | 209 | if (skb_cloned(skb)) { |
211 | if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) | 210 | if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) |
@@ -222,6 +221,9 @@ tcf_ipt(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) | |||
222 | worry later - danger - this API seems to have changed | 221 | worry later - danger - this API seems to have changed |
223 | from earlier kernels */ | 222 | from earlier kernels */ |
224 | 223 | ||
224 | /* iptables targets take a double skb pointer in case the skb | ||
225 | * needs to be replaced. We don't own the skb, so this must not | ||
226 | * happen. The pskb_expand_head above should make sure of this */ | ||
225 | ret = p->t->u.kernel.target->target(&skb, skb->dev, NULL, | 227 | ret = p->t->u.kernel.target->target(&skb, skb->dev, NULL, |
226 | p->hook, p->t->data, NULL); | 228 | p->hook, p->t->data, NULL); |
227 | switch (ret) { | 229 | switch (ret) { |