summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerbert Xu2006-06-29 21:25:53 +0200
committerDavid S. Miller2006-06-30 01:58:04 +0200
commitd6b4991ad5d1a9840e12db507be1a6593def01fe (patch)
treec2485275dae3e4cff7b86cffb91bfc8a7bb8bacd
parent[PKT_SCHED]: PSCHED_TADD() and PSCHED_TADD2() can result,tv_usec >= 1000000 (diff)
downloadkernel-qcow2-linux-d6b4991ad5d1a9840e12db507be1a6593def01fe.tar.gz
kernel-qcow2-linux-d6b4991ad5d1a9840e12db507be1a6593def01fe.tar.xz
kernel-qcow2-linux-d6b4991ad5d1a9840e12db507be1a6593def01fe.zip
[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: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/netdevice.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 84b0f0d16fcb..efd1e2af0bf3 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__ */