summaryrefslogtreecommitdiff
path: root/datapath
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2011-06-13 11:36:19 -0700
committerJesse Gross <jesse@nicira.com>2011-06-13 11:36:19 -0700
commit4cf41591f33c9c2ca0ac288ffafd3be68d62f823 (patch)
tree67e00cdfd0a83522d836aa9f72ab90e727262e28 /datapath
parentf8cd50a42b8a816204a8955772d4493a0fb12686 (diff)
downloadopenvswitch-4cf41591f33c9c2ca0ac288ffafd3be68d62f823.tar.gz
datapath: Check for supported kernel versions.
Most of the time kernels older or newer than the ones we support simply fail to compile. However, sometimes they appear to succeed but then cause problems later on. This explicitly checks for supported versions at compile time. Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'datapath')
-rw-r--r--datapath/datapath.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/datapath/datapath.c b/datapath/datapath.c
index e2846f209..534ab9143 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -53,6 +53,11 @@
#include "vlan.h"
#include "vport-internal_dev.h"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) || \
+ LINUX_VERSION_CODE > KERNEL_VERSION(2,6,39)
+#error Kernels before 2.6.18 or after 2.6.39 are not supported by this version of Open vSwitch.
+#endif
+
int (*dp_ioctl_hook)(struct net_device *dev, struct ifreq *rq, int cmd);
EXPORT_SYMBOL(dp_ioctl_hook);