diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2014-04-24 10:02:49 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-24 16:18:26 -0400 |
commit | f01ec1c017dead42092997a2b8684fcab4cbf126 (patch) | |
tree | 8fefd68d91d348f71b472b992021fefbb20add99 /include/net/vxlan.h | |
parent | 6afc0d7a85770abd282ebed41f0f35cde390d861 (diff) | |
download | blackbird-op-linux-f01ec1c017dead42092997a2b8684fcab4cbf126.tar.gz blackbird-op-linux-f01ec1c017dead42092997a2b8684fcab4cbf126.zip |
vxlan: add x-netns support
This patch allows to switch the netns when packet is encapsulated or
decapsulated.
The vxlan socket is openned into the i/o netns, ie into the netns where
encapsulated packets are received. The socket lookup is done into this netns to
find the corresponding vxlan tunnel. After decapsulation, the packet is
injecting into the corresponding interface which may stand to another netns.
When one of the two netns is removed, the tunnel is destroyed.
Configuration example:
ip netns add netns1
ip netns exec netns1 ip link set lo up
ip link add vxlan10 type vxlan id 10 group 239.0.0.10 dev eth0 dstport 0
ip link set vxlan10 netns netns1
ip netns exec netns1 ip addr add 192.168.0.249/24 broadcast 192.168.0.255 dev vxlan10
ip netns exec netns1 ip link set vxlan10 up
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/vxlan.h')
-rw-r--r-- | include/net/vxlan.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/vxlan.h b/include/net/vxlan.h index 5deef1ae78c9..7bb4084b1bd0 100644 --- a/include/net/vxlan.h +++ b/include/net/vxlan.h @@ -33,7 +33,7 @@ void vxlan_sock_release(struct vxlan_sock *vs); int vxlan_xmit_skb(struct vxlan_sock *vs, struct rtable *rt, struct sk_buff *skb, __be32 src, __be32 dst, __u8 tos, __u8 ttl, __be16 df, - __be16 src_port, __be16 dst_port, __be32 vni); + __be16 src_port, __be16 dst_port, __be32 vni, bool xnet); __be16 vxlan_src_port(__u16 port_min, __u16 port_max, struct sk_buff *skb); |