Skip to content

Commit

Permalink
[NET]: Fix logical error in skb_gso_ok
Browse files Browse the repository at this point in the history
The test in skb_gso_ok is backwards.  Noticed by Michael Chan
<mchan@broadcom.com>.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jun 29, 2006
1 parent 4ee303d commit d6b4991
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */
Expand Down

0 comments on commit d6b4991

Please sign in to comment.