summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.c
diff options
context:
space:
mode:
authorDmitry Vakhrushev <dmitry@netgate.com>2019-08-20 14:44:51 -0400
committerDamjan Marion <dmarion@me.com>2019-09-23 12:43:13 +0000
commit6c57a4a985a1e4a49d1aeaf2684166cf2e122cfb (patch)
treee8e3b42f89799281e815d5b561bf907f66aa837d /src/plugins/nat/nat.c
parent4da1506d39eb8f67ed2c48c76916bb6bcca6fbf1 (diff)
nat: fix update of outside fibs (output-feature)
NAT hasn't worked when NAT interfaces wasn't in default VRF (fib_index = 0). This issue has been occurred with interfaces with output-feature in endpoint-dependent mode. Update VAT commands: - update nat44_add_del_address_range - add nat44_interface_add_del_output_feature Ticket: VPP-1732 Type: fix Change-Id: Iddea15dde4b948f159a0056d48c55bd917037fd1 Signed-off-by: Dmitry Vakhrushev <dmitry@netgate.com>
Diffstat (limited to 'src/plugins/nat/nat.c')
-rwxr-xr-xsrc/plugins/nat/nat.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c
index 248cd759414..85072bcda31 100755
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -2199,6 +2199,16 @@ snat_update_outside_fib (u32 sw_if_index, u32 new_fib_index,
match = 1;
}
}));
+
+ pool_foreach (i, sm->output_feature_interfaces,
+ ({
+ if (i->sw_if_index == sw_if_index)
+ {
+ if (!(nat_interface_is_outside (i)))
+ return;
+ match = 1;
+ }
+ }));
/* *INDENT-ON* */
if (!match)