diff options
author | Matus Fabian <matfabia@cisco.com> | 2018-12-06 03:11:09 -0800 |
---|---|---|
committer | Matus Fabian <matfabia@cisco.com> | 2018-12-18 13:36:39 +0000 |
commit | b686508c4edff42dac2ab140318de8aacb2ac18b (patch) | |
tree | 07cd05a8720548497bcecf1f8959fbbe9b9d6276 /src/plugins/nat/nat_format.c | |
parent | 003d5da298b2cd1e20400fb5fdcefce752ca616e (diff) |
NAT44: nat44_add_del_lb_static_mapping enhancements (VPP-1514)
Change-Id: I5419e06592b0402e911e132796368800321f355a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat_format.c')
-rw-r--r-- | src/plugins/nat/nat_format.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/plugins/nat/nat_format.c b/src/plugins/nat/nat_format.c index 8e5ac4cade4..8452940898d 100644 --- a/src/plugins/nat/nat_format.c +++ b/src/plugins/nat/nat_format.c @@ -231,8 +231,10 @@ format_snat_static_mapping (u8 * s, va_list * args) format_ip4_address, &m->local_addr, m->local_port); /* *INDENT-OFF* */ - vec_foreach (local, m->locals) + pool_foreach (local, m->locals, + ({ s = format (s, " vrf %d", local->vrf_id); + })); /* *INDENT-ON* */ return s; @@ -256,10 +258,16 @@ format_snat_static_mapping (u8 * s, va_list * args) m->twice_nat == TWICE_NAT ? "twice-nat" : m->twice_nat == TWICE_NAT_SELF ? "self-twice-nat" : "", is_out2in_only_static_mapping (m) ? "out2in-only" : ""); - vec_foreach (local, m->locals) + + /* *INDENT-OFF* */ + pool_foreach (local, m->locals, + ({ s = format (s, "\n local %U:%d vrf %d probability %d\%", format_ip4_address, &local->addr, local->port, local->vrf_id, local->probability); + })); + /* *INDENT-ON* */ + } else s = format (s, "%U local %U:%d external %U:%d vrf %d %s %s", |