Apply routes on VDR's PLR when no-snat is enabled

When creating a router with --no-snat option, routes were not published
to PLR and therefore returning traffic could not reach the TLR.
This patch addresses this issue

Change-Id: I50f7015547a9461da0d2e5cff6d8a3f3ca41c1e0
This commit is contained in:
Kobi Samoray 2016-02-16 18:12:32 +02:00
parent 905695951e
commit 1fe18c91b4

View File

@ -234,10 +234,12 @@ class RouterDistributedDriver(router_driver.RouterBaseDriver):
self.edge_manager.configure_dhcp_for_vdr_network(
context, network_id, router_id)
if router_db.gw_port and router_db.enable_snat:
if router_db.gw_port:
plr_id = self.edge_manager.get_plr_by_tlr_id(context,
router_id)
self.plugin._update_nat_rules(context, router_db, plr_id)
if router_db.enable_snat:
self.plugin._update_nat_rules(context, router_db, plr_id)
# Open firewall flows on plr
self.plugin._update_subnets_and_dnat_firewall(
context, router_db, router_id=plr_id)