diff options
Diffstat (limited to 'datapath/linux/compat/include/net/ip6_route.h')
-rw-r--r-- | datapath/linux/compat/include/net/ip6_route.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/datapath/linux/compat/include/net/ip6_route.h b/datapath/linux/compat/include/net/ip6_route.h new file mode 100644 index 000000000..3f495e783 --- /dev/null +++ b/datapath/linux/compat/include/net/ip6_route.h @@ -0,0 +1,31 @@ +#ifndef __NET_IP6_ROUTE_WRAPPER +#define __NET_IP6_ROUTE_WRAPPER + +#include <net/route.h> +#include <net/ipv6.h> + +#include_next<net/ip6_route.h> + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39) + +static inline +struct dst_entry *rpl_ip6_route_output(struct net *net, const struct sock *sk, + struct flowi6 *fl6) +{ + struct flowi fl; + + memset(&fl, 0, sizeof(fl)); + fl.oif = fl6->flowi6_oif; + fl.fl6_dst = fl6->daddr; + fl.fl6_src = fl6->saddr; + fl.mark = fl6->flowi6_mark; + fl.proto = fl6->flowi6_proto; + + return ip6_route_output(net, (struct sock *) sk, &fl); +} +#define ip6_route_output rpl_ip6_route_output + +#define ip6_dst_hoplimit(dst) dst_metric(dst, RTAX_HOPLIMIT) + +#endif /* 2.6.39 */ +#endif |