X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=datapath%2Flinux%2Fcompat%2Finclude%2Fnet%2Fip_tunnels.h;h=2a6470a791fe4ec69f9cefd94052d8917986e1ee;hb=fa6395df71913c749f104978a736f238fb20bc08;hp=ad17c9d9ab57b1fccbf9d46bc716232227b8f521;hpb=5ebaf571f9a3531d06eb52b62ac237ab7292f7b0;p=cascardo%2Fovs.git diff --git a/datapath/linux/compat/include/net/ip_tunnels.h b/datapath/linux/compat/include/net/ip_tunnels.h index ad17c9d9a..2a6470a79 100644 --- a/datapath/linux/compat/include/net/ip_tunnels.h +++ b/datapath/linux/compat/include/net/ip_tunnels.h @@ -1,6 +1,11 @@ #ifndef __NET_IP_TUNNELS_WRAPPER_H #define __NET_IP_TUNNELS_WRAPPER_H 1 +#include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) +#include_next +#else + #include #include #include @@ -31,24 +36,18 @@ struct tnl_ptk_info { #define PACKET_RCVD 0 #define PACKET_REJECT 1 -static inline void tunnel_ip_select_ident(struct sk_buff *skb, - const struct iphdr *old_iph, - struct dst_entry *dst) -{ - struct iphdr *iph = ip_hdr(skb); - - /* Use inner packet iph-id if possible. */ - if (skb->protocol == htons(ETH_P_IP) && old_iph->id) - iph->id = old_iph->id; - else - __ip_select_ident(iph, dst, - (skb_shinfo(skb)->gso_segs ?: 1) - 1); -} - -int iptunnel_xmit(struct net *net, struct rtable *rt, +int iptunnel_xmit(struct rtable *rt, struct sk_buff *skb, __be32 src, __be32 dst, __u8 proto, - __u8 tos, __u8 ttl, __be16 df); + __u8 tos, __u8 ttl, __be16 df, bool xnet); int iptunnel_pull_header(struct sk_buff *skb, int hdr_len, __be16 inner_proto); + +#endif + +/* Not yet upstream */ +#define TUNNEL_OAM __cpu_to_be16(0x0200) +#define TUNNEL_CRIT_OPT __cpu_to_be16(0x0400) +#define TUNNEL_OPTIONS_PRESENT __cpu_to_be16(0x0800) + #endif /* __NET_IP_TUNNELS_H */