From 324999c0228b1e35737efd7901f9629504cc88f0 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 21 Dec 2010 12:43:16 -0800 Subject: [PATCH] --- yaml --- r: 223642 b: refs/heads/master c: da521b2c4f046383bc8941604174bc0e8bffb430 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/pkt_cls.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 8174bfd80680..5d5eb779e7d4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: aa3e219997e4b949be4199660936099ded0b401f +refs/heads/master: da521b2c4f046383bc8941604174bc0e8bffb430 diff --git a/trunk/include/net/pkt_cls.h b/trunk/include/net/pkt_cls.h index dd3031aed9d5..9fcc680ab6b9 100644 --- a/trunk/include/net/pkt_cls.h +++ b/trunk/include/net/pkt_cls.h @@ -323,7 +323,9 @@ static inline unsigned char * tcf_get_base_ptr(struct sk_buff *skb, int layer) static inline int tcf_valid_offset(const struct sk_buff *skb, const unsigned char *ptr, const int len) { - return unlikely((ptr + len) < skb_tail_pointer(skb) && ptr > skb->head); + return likely((ptr + len) <= skb_tail_pointer(skb) && + ptr >= skb->head && + (ptr <= (ptr + len))); } #ifdef CONFIG_NET_CLS_IND