summaryrefslogtreecommitdiff
path: root/include/net/pkt_cls.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-01-05 01:31:08 +0300
committerDave Airlie <airlied@redhat.com>2011-01-05 01:31:08 +0300
commit4f125010d2d02c481a0fdf5aee23a9f937bc5de1 (patch)
treedcdcd2ba1d0bb980b57ced9a1b2b5b17c84c8f57 /include/net/pkt_cls.h
parent204663c48711ddceee09df46269cd34d49d1f7be (diff)
parent989d873fc5b6a96695b97738dea8d9f02a60f8ab (diff)
downloadlinux-4f125010d2d02c481a0fdf5aee23a9f937bc5de1.tar.xz
Merge branch 'master' of /home/airlied/kernel/linux-2.6 into drm-core-next
Diffstat (limited to 'include/net/pkt_cls.h')
-rw-r--r--include/net/pkt_cls.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index dd3031aed9d5..9fcc680ab6b9 100644
--- a/include/net/pkt_cls.h
+++ b/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