1 #include <linux/module.h>
2 #include <linux/errno.h>
3 #include <linux/socket.h>
5 #include <linux/types.h>
6 #include <linux/kernel.h>
7 #include <net/ip_tunnels.h>
9 #include <net/udp_tunnel.h>
10 #include <net/net_namespace.h>
13 #ifndef HAVE_SOCK_CREATE_KERN_NET
14 #undef sock_create_kern
16 int ovs_sock_create_kern(struct net *net, int family, int type, int protocol, struct socket **res)
20 err = sock_create_kern(family, type, protocol, res);
24 sk_change_net((*res)->sk, net);
27 #undef sk_release_kernel
28 void ovs_sock_release(struct socket *sock)
30 sk_release_kernel(sock->sk);