ovn-controller: race between binding-run and patch-run for localnet ports
[cascardo/ovs.git] / ofproto / tunnel.c
index 5cf6c75..a63cf71 100644 (file)
@@ -373,7 +373,7 @@ tnl_wc_init(struct flow *flow, struct flow_wildcards *wc)
                                   FLOW_TNL_F_CSUM |
                                   FLOW_TNL_F_KEY);
         wc->masks.tunnel.ip_tos = UINT8_MAX;
-        wc->masks.tunnel.ip_ttl = UINT8_MAX;
+        wc->masks.tunnel.ip_ttl = 0;
         /* The tp_src and tp_dst members in flow_tnl are set to be always
          * wildcarded, not to unwildcard them here. */
         wc->masks.tunnel.tp_src = 0;
@@ -427,6 +427,14 @@ tnl_port_send(const struct ofport_dpif *ofport, struct flow *flow,
             flow->tunnel.ipv6_dst = tnl_port->match.ipv6_dst;
         }
     }
+    if (ipv6_addr_is_set(&flow->tunnel.ipv6_dst) ||
+        ipv6_addr_is_set(&flow->tunnel.ipv6_src)) {
+        out_port = ODPP_NONE;
+        VLOG_WARN_RL(&rl, "port (%s): IPv6 tunnel endpoint is not supported",
+                     netdev_get_name(tnl_port->netdev));
+        goto out;
+    }
+
     flow->pkt_mark = tnl_port->match.pkt_mark;
 
     if (!cfg->out_key_flow) {