aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.c
diff options
context:
space:
mode:
authorDmitry Vakhrushev <dmitry@netgate.com>2019-08-20 14:44:51 -0400
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-10-03 08:40:25 +0000
commitcec9496dd5d8db1418c7f100eb9d41cc75701dbe (patch)
treea9bc23acf6afdd9438a9c1aa35e50985d06b03c3 /src/plugins/nat/nat.c
parentad32207681d6e77a4107d17899a7711c00c78905 (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> (cherry picked from commit 6c57a4a985a1e4a49d1aeaf2684166cf2e122cfb)
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)