net: skb_is_gso_v6() requires skb_is_gso()
bnx2x makes a dangerous use of skb_is_gso_v6(). It should first make sure skb is a gso packet Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Eilon Greenstein <eilong@broadcom.com> Acked-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
c3f40d7c04
commit
36a8f39e05
@@ -2755,6 +2755,7 @@ static inline bool skb_is_gso(const struct sk_buff *skb)
|
||||
return skb_shinfo(skb)->gso_size;
|
||||
}
|
||||
|
||||
/* Note: Should be called only if skb_is_gso(skb) is true */
|
||||
static inline bool skb_is_gso_v6(const struct sk_buff *skb)
|
||||
{
|
||||
return skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6;
|
||||
|
Reference in New Issue
Block a user