From 1fe18c91b4737c6e4faf2cfa8f069255bf1e44d4 Mon Sep 17 00:00:00 2001 From: Kobi Samoray Date: Tue, 16 Feb 2016 18:12:32 +0200 Subject: [PATCH] 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 --- .../plugins/nsx_v/drivers/distributed_router_driver.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py b/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py index 6350a0b750..758661bbce 100644 --- a/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py +++ b/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py @@ -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)