datapath: Check for supported kernel versions.
[openvswitch] / datapath / datapath.c
index e2846f2099cea1f9c0dd5f058899f131a6b08f42..534ab9143c866180d9a8807da18894b39dc3e78a 100644 (file)
 #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);