summaryrefslogtreecommitdiff
path: root/ofproto/tunnel.c
diff options
context:
space:
mode:
authorThadeu Lima de Souza Cascardo <cascardo@redhat.com>2016-04-01 10:06:05 -0300
committerBen Pfaff <blp@ovn.org>2016-04-21 11:03:55 -0700
commit110f7c75e567c3af55394dd0a294cc124067115b (patch)
tree65c3c707d798bc7f1ebaa799180927597a08f074 /ofproto/tunnel.c
parentc61e93d60231ef4a13945c5739889f8a4c6bdc54 (diff)
downloadopenvswitch-110f7c75e567c3af55394dd0a294cc124067115b.tar.gz
tunneling: Fix for concomitant IPv4 and IPv6 tunnels
When using an IPv6 tunnel on the same bridge as an IPv4 tunnel, the flow received from the IPv6 tunnel would have an IPv4 address added to it, causing problems when trying to put or execute the action on Linux datapath. Clearing the IPv6 address when we have a valid IPv4 address fixes this problem. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/tunnel.c')
-rw-r--r--ofproto/tunnel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ofproto/tunnel.c b/ofproto/tunnel.c
index 743099449..18297b212 100644
--- a/ofproto/tunnel.c
+++ b/ofproto/tunnel.c
@@ -419,12 +419,16 @@ tnl_port_send(const struct ofport_dpif *ofport, struct flow *flow,
flow->tunnel.ip_src = in6_addr_get_mapped_ipv4(&tnl_port->match.ipv6_src);
if (!flow->tunnel.ip_src) {
flow->tunnel.ipv6_src = tnl_port->match.ipv6_src;
+ } else {
+ flow->tunnel.ipv6_src = in6addr_any;
}
}
if (!cfg->ip_dst_flow) {
flow->tunnel.ip_dst = in6_addr_get_mapped_ipv4(&tnl_port->match.ipv6_dst);
if (!flow->tunnel.ip_dst) {
flow->tunnel.ipv6_dst = tnl_port->match.ipv6_dst;
+ } else {
+ flow->tunnel.ipv6_dst = in6addr_any;
}
}
flow->pkt_mark = tnl_port->match.pkt_mark;