Don't define "skb_dst_drop" if other skb_dst accessor funcs are defined
authorJustin Pettit <jpettit@nicira.com>
Mon, 17 May 2010 20:57:29 +0000 (13:57 -0700)
committerJustin Pettit <jpettit@nicira.com>
Mon, 17 May 2010 22:06:33 +0000 (15:06 -0700)
When "skb_dst" is included in the kernel sources, don't redefine
"skb_dst_drop", which is defined in dst.h.

datapath/linux-2.6/compat-2.6/include/net/dst.h

index edb0f75e4e42d513410edd91957488d088fc0908..e51ac1d694e2f60da7eebcc7de5190298e9a7bdb 100644 (file)
@@ -3,8 +3,7 @@
 
 #include_next <net/dst.h>
 
-#include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
+#ifndef HAVE_SKB_DST_ACCESSOR_FUNCS
 
 static inline void skb_dst_drop(struct sk_buff *skb)
 {
@@ -13,6 +12,6 @@ static inline void skb_dst_drop(struct sk_buff *skb)
        skb->dst = 0UL;
 }
 
-#endif /* linux kernel < 2.6.31 */
+#endif
 
 #endif