diff options
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/act_pedit.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index 45b3cda86a21..6f8684b5617e 100644 --- a/net/sched/act_pedit.c +++ b/net/sched/act_pedit.c | |||
@@ -164,8 +164,7 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a, | |||
164 | printk("offset must be on 32 bit boundaries\n"); | 164 | printk("offset must be on 32 bit boundaries\n"); |
165 | goto bad; | 165 | goto bad; |
166 | } | 166 | } |
167 | if (skb->len < 0 || | 167 | if (offset > 0 && offset > skb->len) { |
168 | (offset > 0 && offset > skb->len)) { | ||
169 | printk("offset %d cant exceed pkt length %d\n", | 168 | printk("offset %d cant exceed pkt length %d\n", |
170 | offset, skb->len); | 169 | offset, skb->len); |
171 | goto bad; | 170 | goto bad; |