aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/pkt_cls.h
diff options
context:
space:
mode:
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)
323static inline int tcf_valid_offset(const struct sk_buff *skb, 323static inline int tcf_valid_offset(const struct sk_buff *skb,
324 const unsigned char *ptr, const int len) 324 const unsigned char *ptr, const int len)
325{ 325{
326 return unlikely((ptr + len) < skb_tail_pointer(skb) && ptr > skb->head); 326 return likely((ptr + len) <= skb_tail_pointer(skb) &&
327 ptr >= skb->head &&
328 (ptr <= (ptr + len)));
327} 329}
328 330
329#ifdef CONFIG_NET_CLS_IND 331#ifdef CONFIG_NET_CLS_IND