diff options
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", |