From: Jesse Gross Date: Sun, 30 Jan 2011 21:05:33 +0000 (-0800) Subject: datapath: Correct version check for genetlink net namespaces. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ce41058990860158a4b9d31b52de46558eee6a5;p=openvswitch datapath: Correct version check for genetlink net namespaces. Network namespaces were introduced in 2.6.24, not 2.6.19 as some of the version checks were looking for. This caused compile errors in that kernel range when the functions couldn't be found. In addition, namespace support wasn't initially available in Netlink so the netns headers weren't included, causing compile problems for a few more kernels. Reported-by: Justin Pettit Signed-off-by: Jesse Gross --- diff --git a/datapath/linux-2.6/compat-2.6/include/net/genetlink.h b/datapath/linux-2.6/compat-2.6/include/net/genetlink.h index 37b25b2e..c91408ee 100644 --- a/datapath/linux-2.6/compat-2.6/include/net/genetlink.h +++ b/datapath/linux-2.6/compat-2.6/include/net/genetlink.h @@ -3,6 +3,7 @@ #include #include +#include /* Very special super-nasty workaround here: * @@ -152,14 +153,14 @@ int genl_register_family_with_ops(struct genl_family *family, struct genl_ops *ops, size_t n_ops); #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) #define genl_notify(skb, net, pid, group, nlh, flags) \ genl_notify(skb, pid, group, nlh, flags) #endif extern void genl_notify(struct sk_buff *skb, struct net *net, u32 pid, u32 group, struct nlmsghdr *nlh, gfp_t flags); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) && \ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) && \ LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) static inline struct net *genl_info_net(struct genl_info *info) {