From 0f34eb123011f848083b49384ac82e5a57c8c5d1 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 10 Dec 2010 14:45:38 -0800 Subject: [PATCH] datapath: Fix off-by-one error in dev_get_stats() compat code. dev_get_stats() was introduced in 2.6.29, not 2.6.28. Signed-off-by: Ben Pfaff Acked-by: Jesse Gross --- datapath/linux-2.6/compat-2.6/netdevice.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datapath/linux-2.6/compat-2.6/netdevice.c b/datapath/linux-2.6/compat-2.6/netdevice.c index 29804584..1a6f327a 100644 --- 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,28) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) 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; -- 2.30.2