Commit 9dacaf17 authored by jamal's avatar jamal Committed by David S. Miller

net sched: make pedit check for clones instead

Now that the core path doesnt set OK to munge we detect
writable skbs by looking to see if they are cloned.
Signed-off-by: default avatarJamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f2a03367
...@@ -127,8 +127,7 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a, ...@@ -127,8 +127,7 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
int i, munged = 0; int i, munged = 0;
unsigned int off; unsigned int off;
if (!(skb->tc_verd & TC_OK2MUNGE)) { if (skb_cloned(skb)) {
/* should we set skb->cloned? */
if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) { if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) {
return p->tcf_action; return p->tcf_action;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment