1 #ifndef __NET_IP6_ROUTE_WRAPPER
2 #define __NET_IP6_ROUTE_WRAPPER
5 #include <net/ip.h> /* For OVS_VPORT_OUTPUT_PARAMS */
8 #include_next<net/ip6_route.h>
10 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
13 struct dst_entry *rpl_ip6_route_output(struct net *net, const struct sock *sk,
18 memset(&fl, 0, sizeof(fl));
19 fl.oif = fl6->flowi6_oif;
20 fl.fl6_dst = fl6->daddr;
21 fl.fl6_src = fl6->saddr;
22 fl.mark = fl6->flowi6_mark;
23 fl.proto = fl6->flowi6_proto;
25 return ip6_route_output(net, (struct sock *) sk, &fl);
27 #define ip6_route_output rpl_ip6_route_output
29 #define ip6_dst_hoplimit(dst) dst_metric(dst, RTAX_HOPLIMIT)
33 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
34 static inline int rpl_ip6_fragment(struct sock *sk, struct sk_buff *skb,
35 int (*output)(struct sk_buff *))
40 #define ip6_fragment rpl_ip6_fragment
41 #elif defined(OVS_FRAGMENT_BACKPORT)
42 int rpl_ip6_fragment(struct sock *sk, struct sk_buff *skb,
43 int (*output)(OVS_VPORT_OUTPUT_PARAMS));
44 #define ip6_fragment rpl_ip6_fragment
45 #endif /* OVS_FRAGMENT_BACKPORT */
47 #endif /* _NET_IP6_ROUTE_WRAPPER */