summaryrefslogtreecommitdiff
path: root/net/openvswitch/vport-vxlan.c
diff options
context:
space:
mode:
authorJiri Benc <jbenc@redhat.com>2015-09-24 13:50:02 +0200
committerDavid S. Miller <davem@davemloft.net>2015-09-26 22:40:55 -0700
commitb1be00a6c39fda2ec380e168d7bcf96fb8c9da42 (patch)
treeeac61f37c5d1b01a861e935c402e9c0d1500b5b3 /net/openvswitch/vport-vxlan.c
parent205f356d165033443793a97a668a203a79a8723a (diff)
vxlan: support both IPv4 and IPv6 sockets in a single vxlan device
For metadata based vxlan interface, open both IPv4 and IPv6 socket. This is much more user friendly: it's not necessary to create two vxlan interfaces and pay attention to using the right one in routing rules. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/vport-vxlan.c')
-rw-r--r--net/openvswitch/vport-vxlan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/openvswitch/vport-vxlan.c b/net/openvswitch/vport-vxlan.c
index c11413d5075f..fb3cdb85905d 100644
--- a/net/openvswitch/vport-vxlan.c
+++ b/net/openvswitch/vport-vxlan.c
@@ -151,7 +151,8 @@ static int vxlan_get_egress_tun_info(struct vport *vport, struct sk_buff *skb,
{
struct vxlan_dev *vxlan = netdev_priv(vport->dev);
struct net *net = ovs_dp_get_net(vport->dp);
- __be16 dst_port = vxlan_dev_dst_port(vxlan);
+ unsigned short family = ip_tunnel_info_af(upcall->egress_tun_info);
+ __be16 dst_port = vxlan_dev_dst_port(vxlan, family);
__be16 src_port;
int port_min;
int port_max;