Skip to content

Commit

Permalink
net sched: make pedit check for clones instead
Browse files Browse the repository at this point in the history
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: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
jamal authored and David S. Miller committed Jun 7, 2010
1 parent f2a0336 commit 9dacaf1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/sched/act_pedit.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
int i, munged = 0;
unsigned int off;

if (!(skb->tc_verd & TC_OK2MUNGE)) {
/* should we set skb->cloned? */
if (skb_cloned(skb)) {
if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) {
return p->tcf_action;
}
Expand Down

0 comments on commit 9dacaf1

Please sign in to comment.