compat: Backport nf_connlabels_{get, put}().
[cascardo/ovs.git] / datapath / linux / compat / include / net / dst.h
1 #ifndef __NET_DST_WRAPPER_H
2 #define __NET_DST_WRAPPER_H 1
3
4 #include <linux/version.h>
5 #include_next <net/dst.h>
6
7 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) &&    \
8     LINUX_VERSION_CODE > KERNEL_VERSION(3,0,20)
9
10 #define dst_get_neighbour_noref dst_get_neighbour
11
12 #endif
13
14 #ifndef HAVE_SKB_DST_ACCESSOR_FUNCS
15
16 static inline void skb_dst_drop(struct sk_buff *skb)
17 {
18         if (skb->dst)
19                 dst_release(skb_dst(skb));
20         skb->dst = NULL;
21 }
22
23 #endif
24
25 #endif