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 #ifndef HAVE_NF_IPV6_OPS_FRAGMENT
34 #ifdef OVS_FRAGMENT_BACKPORT
35 int rpl_ip6_fragment(struct sock *sk, struct sk_buff *skb,
36 int (*output)(OVS_VPORT_OUTPUT_PARAMS));
38 static inline int rpl_ip6_fragment(struct sock *sk, struct sk_buff *skb,
39 int (*output)(struct sk_buff *))
44 #endif /* OVS_FRAGMENT_BACKPORT */
45 #define ip6_fragment rpl_ip6_fragment
46 #endif /* HAVE_NF_IPV6_OPS_FRAGMENT */
48 #endif /* _NET_IP6_ROUTE_WRAPPER */