1 #ifndef __NETFILTER_IPV6_WRAPPER_H
2 #define __NETFILTER_IPV6_WRAPPER_H 1
4 #include_next <linux/netfilter_ipv6.h>
6 #include <linux/version.h>
7 #include <net/ip.h> /* For OVS_VPORT_OUTPUT_PARAMS */
8 #include <net/ip6_route.h>
10 #if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0)
11 /* Try to minimise changes required to the actions.c code for calling IPv6
12 * fragmentation. We can keep the fragment() API mostly the same, except that
13 * the callback parameter needs to be in the form that older kernels accept.
14 * We don't backport the other ipv6_ops as they're currently unused by OVS. */
15 struct ovs_nf_ipv6_ops {
16 int (*fragment)(struct sock *sk, struct sk_buff *skb,
17 int (*output)(OVS_VPORT_OUTPUT_PARAMS));
19 #define nf_ipv6_ops ovs_nf_ipv6_ops
21 #if defined(OVS_FRAGMENT_BACKPORT)
22 static struct ovs_nf_ipv6_ops ovs_ipv6_ops = {
23 .fragment = ip6_fragment,
26 static inline struct ovs_nf_ipv6_ops *ovs_nf_get_ipv6_ops(void)
30 #else /* !OVS_FRAGMENT_BACKPORT || !CONFIG_NETFILTER || || !CONFIG_IPV6 */
31 static inline const struct ovs_nf_ipv6_ops *ovs_nf_get_ipv6_ops(void)
36 #define nf_get_ipv6_ops ovs_nf_get_ipv6_ops
39 #endif /* __NETFILTER_IPV6_WRAPPER_H */