projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f2dd2b
)
datapath: Fix off-by-one error in dev_get_stats() compat code.
author
Ben Pfaff
<blp@nicira.com>
Fri, 10 Dec 2010 22:45:38 +0000
(14:45 -0800)
committer
Ben Pfaff
<blp@nicira.com>
Mon, 13 Dec 2010 18:20:20 +0000
(10:20 -0800)
dev_get_stats() was introduced in 2.6.29, not 2.6.28.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath/linux-2.6/compat-2.6/netdevice.c
patch
|
blob
|
history
diff --git
a/datapath/linux-2.6/compat-2.6/netdevice.c
b/datapath/linux-2.6/compat-2.6/netdevice.c
index 298045846b164715086aef581c5c1c64a0e8a65d..1a6f327ad106ec00a74dd447327b5a193e0b4229 100644
(file)
--- a/
datapath/linux-2.6/compat-2.6/netdevice.c
+++ b/
datapath/linux-2.6/compat-2.6/netdevice.c
@@
-14,11
+14,11
@@
struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
{
const struct net_device_stats *stats;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,2
8
)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,2
9
)
stats = dev->get_stats(dev);
-#else /* 2.6.28 <
=
kernel version < 2.6.36 */
+#else /* 2.6.28 < kernel version < 2.6.36 */
stats = (dev_get_stats)(dev);
-#endif /* 2.6.28 <
=
kernel version < 2.6.36 */
+#endif /* 2.6.28 < kernel version < 2.6.36 */
storage->rx_packets = stats->rx_packets;
storage->tx_packets = stats->tx_packets;