]> git.proxmox.com Git - mirror_ovs.git/commit - ovn/northd/ovn-northd.c
ovn: Gratuitous ARP for centralized NAT rules on a distributed router
authorMickey Spiegel <mickeys.dev@gmail.com>
Thu, 30 Mar 2017 18:42:21 +0000 (11:42 -0700)
committerGurucharan Shetty <guru@ovn.org>
Thu, 30 Mar 2017 20:16:46 +0000 (13:16 -0700)
commit26b9e08d693ed01db0ee84e2010c4421821e40c1
treebaebbe6d383ab94a9f385e9d28cab77c39d6d794
parentb6dc6b9349bc758d23781ec755dcc0048553ae25
ovn: Gratuitous ARP for centralized NAT rules on a distributed router

This patch extends gratuitous ARP support for NAT addresses so that it
applies to centralized NAT rules on a distributed router, in addition to
the existing gratuitous ARP support for NAT addresses on gateway routers.
Centralized NAT rules have type other than "dnat_and_snat", or have type
"dnat_and_snat" but do not specify external_mac or logical_port.  These
NAT rules apply on the redirect-chassis.

Gratuitous ARP packets for centralized NAT rules on a distributed router
are only generated on the redirect-chassis.  This is achieved by extending
the syntax for "options:nat-addresses" in the southbound database,
allowing the condition 'is_chassis_resident("LPORT_NAME")' to be appended
after the MAC and IP addresses.  This condition is automatically inserted
by ovn-northd when the northbound "options:nat-addresses" is set to
"router" and the peer is a distributed gateway port.

A separate patch will be required to support gratuitous ARP for
distributed NAT rules that specify logical_port and external_mac.  Since
the MAC address differs and the logical port often resides on a different
chassis from the redirect-chassis, these addresses cannot be included in
the same "nat-addresses" string as for centralized NAT rules.

Signed-off-by: Mickey Spiegel <mickeys.dev@gmail.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
ovn/controller/pinctrl.c
ovn/lib/ovn-util.c
ovn/lib/ovn-util.h
ovn/northd/ovn-northd.c
ovn/ovn-nb.xml
ovn/ovn-sb.xml
tests/ovn.at