[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180406014340.1562-1-march511@gmail.com>
Date: Fri, 6 Apr 2018 03:43:39 +0200
From: Wenhua Shi <march511@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] make net_gso_ok return false when gso_type is zero(invalid)
Signed-off-by: Wenhua Shi <march511@...il.com>
---
include/linux/netdevice.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index cf44503e..1f26cbcf 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -4187,7 +4187,7 @@ static inline bool net_gso_ok(netdev_features_t features, int gso_type)
BUILD_BUG_ON(SKB_GSO_ESP != (NETIF_F_GSO_ESP >> NETIF_F_GSO_SHIFT));
BUILD_BUG_ON(SKB_GSO_UDP != (NETIF_F_GSO_UDP >> NETIF_F_GSO_SHIFT));
- return (features & feature) == feature;
+ return feature && (features & feature) == feature;
}
static inline bool skb_gso_ok(struct sk_buff *skb, netdev_features_t features)
--
2.11.0
Powered by blists - more mailing lists