datapath: Add support for lwtunnel
[cascardo/ovs.git] / datapath / linux / compat / include / net / ip6_route.h
1 #ifndef __NET_IP6_ROUTE_WRAPPER
2 #define __NET_IP6_ROUTE_WRAPPER
3
4 #include <net/route.h>
5 #include <net/ipv6.h>
6
7 #include_next<net/ip6_route.h>
8
9 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
10
11 static inline
12 struct dst_entry *rpl_ip6_route_output(struct net *net, const struct sock *sk,
13                                    struct flowi6 *fl6)
14 {
15         struct flowi fl;
16
17         memset(&fl, 0, sizeof(fl));
18         fl.oif = fl6->flowi6_oif;
19         fl.fl6_dst = fl6->daddr;
20         fl.fl6_src = fl6->saddr;
21         fl.mark = fl6->flowi6_mark;
22         fl.proto = fl6->flowi6_proto;
23
24         return ip6_route_output(net, (struct sock *) sk, &fl);
25 }
26 #define ip6_route_output rpl_ip6_route_output
27
28 #define ip6_dst_hoplimit(dst) dst_metric(dst, RTAX_HOPLIMIT)
29
30 #endif /* 2.6.39 */
31 #endif