提交 d6b4991a 编写于 作者: H Herbert Xu 提交者: David S. Miller

[NET]: Fix logical error in skb_gso_ok

The test in skb_gso_ok is backwards.  Noticed by Michael Chan
<mchan@broadcom.com>.
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
Acked-by: NMichael Chan <mchan@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4ee303df
......@@ -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__ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册