Skip to content

Commit 8244c6b

Browse files
LorenzoBianconiblp
authored andcommitted
OVN: do not distribute traffic for local FIP
Do not send traffic for local FIP through the overlay tunnels but manage it in the local hypervisor Acked-by: Numan Siddique <nusiddiq@redhat.com> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
1 parent 845f962 commit 8244c6b

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

northd/ovn-northd.8.xml

+7
Original file line numberDiff line numberDiff line change
@@ -1890,6 +1890,13 @@ reg1 = <var>EIP1</var>;
18901890
outport = <code>redirect-chassis-port</code>;
18911891
<code>REGBIT_DISTRIBUTED_NAT = 1; next;</code>.
18921892
</pre>
1893+
1894+
<p>
1895+
Morover a priority-400 logical flow is configured for each
1896+
<code>dnat_and_snat</code> NAT rule configured in order to
1897+
not send traffic for local FIP through the overlay tunnels
1898+
but manage it in the local hypervisor
1899+
</p>
18931900
</li>
18941901

18951902
<li>

northd/ovn-northd.c

+13
Original file line numberDiff line numberDiff line change
@@ -5277,6 +5277,19 @@ add_distributed_nat_routes(struct hmap *lflows, const struct ovn_port *op)
52775277
continue;
52785278
}
52795279

5280+
ds_put_format(&match, "inport == %s && "
5281+
"ip4.src == %s && ip4.dst == %s",
5282+
op->json_key, nat->logical_ip, nat->external_ip);
5283+
ds_put_format(&actions, "outport = %s; eth.dst = %s; "
5284+
REGBIT_DISTRIBUTED_NAT" = 1; "
5285+
REGBIT_NAT_REDIRECT" = 0; next;",
5286+
op->od->l3dgw_port->json_key,
5287+
nat->external_mac);
5288+
ovn_lflow_add(lflows, op->od, S_ROUTER_IN_IP_ROUTING, 400,
5289+
ds_cstr(&match), ds_cstr(&actions));
5290+
ds_clear(&match);
5291+
ds_clear(&actions);
5292+
52805293
for (size_t j = 0; j < op->od->nbr->n_nat; j++) {
52815294
const struct nbrec_nat *nat2 = op->od->nbr->nat[j];
52825295

0 commit comments

Comments
 (0)