From: Herbert Xu Date: Thu, 29 Jun 2006 19:25:53 +0000 (-0700) Subject: [NET]: Fix logical error in skb_gso_ok X-Git-Tag: v2.6.18-rc1~321^2~18 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d6b4991ad5d1a9840e12db507be1a6593def01fe;p=linux-2.6-omap-h63xx.git [NET]: Fix logical error in skb_gso_ok The test in skb_gso_ok is backwards. Noticed by Michael Chan . Signed-off-by: Herbert Xu Acked-by: Michael Chan Signed-off-by: David S. Miller --- diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 84b0f0d16fc..efd1e2af0bf 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -994,12 +994,12 @@ static inline int skb_gso_ok(struct sk_buff *skb, int features) { int feature = skb_shinfo(skb)->gso_size ? skb_shinfo(skb)->gso_type << NETIF_F_GSO_SHIFT : 0; - return (features & feature) != feature; + return (features & feature) == feature; } static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) { - return skb_gso_ok(skb, dev->features); + return !skb_gso_ok(skb, dev->features); } #endif /* __KERNEL__ */