File kernel-312.diff of Package openvswitch

Index: openvswitch-2.0.0/FAQ
===================================================================
--- openvswitch-2.0.0.orig/FAQ
+++ openvswitch-2.0.0/FAQ
@@ -149,7 +149,7 @@ A: The following table lists the Linux k
        1.10.x     2.6.18 to 3.8
        1.11.x     2.6.18 to 3.8
        2.0.x      2.6.32 to 3.10
-       2.1.x      2.6.32 to 3.11
+       2.1.x      2.6.32 to 3.12
 
    Open vSwitch userspace should also work with the Linux kernel module
    built into Linux 3.3 and later.
Index: openvswitch-2.0.0/acinclude.m4
===================================================================
--- openvswitch-2.0.0.orig/acinclude.m4
+++ openvswitch-2.0.0/acinclude.m4
@@ -271,6 +271,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   OVS_GREP_IFELSE([$KSRC/include/net/checksum.h], [csum_unfold])
 
   OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [parallel_ops])
+  OVS_GREP_IFELSE([$KSRC/include/net/vxlan.h], [vxlan_sock_add])
   OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_get_be16])
   OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_put_be16])
   OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_put_be32])
Index: openvswitch-2.0.0/datapath/linux/compat/include/net/ip_tunnels.h
===================================================================
--- openvswitch-2.0.0.orig/datapath/linux/compat/include/net/ip_tunnels.h
+++ openvswitch-2.0.0/datapath/linux/compat/include/net/ip_tunnels.h
@@ -11,6 +11,10 @@
 #include <net/ip.h>
 #include <net/rtnetlink.h>
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
+#include_next <net/ip_tunnels.h>
+#else
+
 #define TUNNEL_CSUM	__cpu_to_be16(0x01)
 #define TUNNEL_ROUTING	__cpu_to_be16(0x02)
 #define TUNNEL_KEY	__cpu_to_be16(0x04)
@@ -34,7 +38,9 @@ struct tnl_ptk_info {
 int iptunnel_xmit(struct net *net, 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 /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) */
 #endif /* __NET_IP_TUNNELS_H */
Index: openvswitch-2.0.0/datapath/linux/compat/include/net/vxlan.h
===================================================================
--- openvswitch-2.0.0.orig/datapath/linux/compat/include/net/vxlan.h
+++ openvswitch-2.0.0/datapath/linux/compat/include/net/vxlan.h
@@ -5,6 +5,13 @@
 #include <linux/netdevice.h>
 #include <linux/udp.h>
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) || \
+   defined(HAVE_VXLAN_SOCK_ADD)
+#include_next <net/vxlan.h>
+#endif
+
+#ifndef HAVE_VXLAN_SOCK_ADD
+
 struct vxlan_sock;
 typedef void (vxlan_rcv_t)(struct vxlan_sock *vs, struct sk_buff *skb, __be32 key);
 
@@ -20,7 +27,7 @@ struct vxlan_sock {
 
 struct vxlan_sock *vxlan_sock_add(struct net *net, __be16 port,
 				  vxlan_rcv_t *rcv, void *data,
-				  bool no_share);
+                                 bool no_share, bool ipv6);
 
 void vxlan_sock_release(struct vxlan_sock *vs);
 
@@ -31,4 +38,5 @@ int vxlan_xmit_skb(struct net *net, stru
 
 __be16 vxlan_src_port(__u16 port_min, __u16 port_max, struct sk_buff *skb);
 
+#endif /* HAVE_VXLAN_SOCK_ADD */
 #endif
Index: openvswitch-2.0.0/datapath/linux/compat/ip_tunnels_core.c
===================================================================
--- openvswitch-2.0.0.orig/datapath/linux/compat/ip_tunnels_core.c
+++ openvswitch-2.0.0/datapath/linux/compat/ip_tunnels_core.c
@@ -34,10 +34,12 @@
 #include "compat.h"
 #include "gso.h"
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0)
+
 int iptunnel_xmit(struct net *net, 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 pkt_len = skb->len;
 	struct iphdr *iph;
@@ -108,3 +110,5 @@ int iptunnel_pull_header(struct sk_buff
 	skb->pkt_type = PACKET_HOST;
 	return 0;
 }
+
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0) */
Index: openvswitch-2.0.0/datapath/linux/compat/vxlan.c
===================================================================
--- openvswitch-2.0.0.orig/datapath/linux/compat/vxlan.c
+++ openvswitch-2.0.0/datapath/linux/compat/vxlan.c
@@ -60,6 +60,9 @@
 
 /* IP header + UDP + VXLAN + Ethernet header */
 #define VXLAN_HEADROOM (20 + 8 + 8 + 14)
+
+#ifndef HAVE_VXLAN_SOCK_ADD
+
 #define VXLAN_HLEN (sizeof(struct udphdr) + sizeof(struct vxlanhdr))
 
 #define VXLAN_FLAGS 0x08000000	/* struct vxlanhdr.vx_flags required value. */
@@ -260,7 +263,7 @@ int vxlan_xmit_skb(struct net *net, stru
 		return err;
 
 	return iptunnel_xmit(net, rt, skb, src, dst,
-			IPPROTO_UDP, tos, ttl, df);
+			IPPROTO_UDP, tos, ttl, df, false);
 }
 
 static void rcu_free_vs(struct rcu_head *rcu)
@@ -339,7 +342,7 @@ static struct vxlan_sock *vxlan_socket_c
 
 struct vxlan_sock *vxlan_sock_add(struct net *net, __be16 port,
 				  vxlan_rcv_t *rcv, void *data,
-				  bool no_share)
+                                 bool no_share, bool ipv6)
 {
 	struct vxlan_net *vn;
 	struct vxlan_sock *vs;
@@ -413,3 +416,5 @@ static void vxlan_cleanup_module(void)
 out:
 	mutex_unlock(&init_lock);
 }
+
+#endif /* HAVE_VXLAN_SOCK_ADD */
Index: openvswitch-2.0.0/datapath/vport-gre.c
===================================================================
--- openvswitch-2.0.0.orig/datapath/vport-gre.c
+++ openvswitch-2.0.0/datapath/vport-gre.c
@@ -181,7 +181,7 @@ static int __send(struct vport *vport, s
 	return iptunnel_xmit(net, rt, skb, saddr,
 			     OVS_CB(skb)->tun_key->ipv4_dst, IPPROTO_GRE,
 			     OVS_CB(skb)->tun_key->ipv4_tos,
-			     OVS_CB(skb)->tun_key->ipv4_ttl, df);
+                            OVS_CB(skb)->tun_key->ipv4_ttl, df, false);
 err_free_rt:
 	ip_rt_put(rt);
 error:
Index: openvswitch-2.0.0/datapath/vport-vxlan.c
===================================================================
--- openvswitch-2.0.0.orig/datapath/vport-vxlan.c
+++ openvswitch-2.0.0/datapath/vport-vxlan.c
@@ -125,7 +125,7 @@ static struct vport *vxlan_tnl_create(co
 	vxlan_port = vxlan_vport(vport);
 	strncpy(vxlan_port->name, parms->name, IFNAMSIZ);
 
-	vs = vxlan_sock_add(net, htons(dst_port), vxlan_rcv, vport, true);
+       vs = vxlan_sock_add(net, htons(dst_port), vxlan_rcv, vport, true, false);
 	if (IS_ERR(vs)) {
 		ovs_vport_free(vport);
 		return (void *)vs;
Index: openvswitch-2.0.0/datapath/linux/compat/include/net/genetlink.h
===================================================================
--- openvswitch-2.0.0.orig/datapath/linux/compat/include/net/genetlink.h
+++ openvswitch-2.0.0/datapath/linux/compat/include/net/genetlink.h
@@ -17,7 +17,11 @@
 #define portid pid
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)
+
 extern void genl_notify(struct sk_buff *skb, struct net *net, u32 portid,
 			u32 group, struct nlmsghdr *nlh, gfp_t flags);
 
+#endif
+
 #endif /* genetlink.h */
openSUSE Build Service is sponsored by