aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat
diff options
context:
space:
mode:
authorFilip Varga <fivarga@cisco.com>2020-08-18 11:46:01 +0200
committerOle Trøan <otroan@employees.org>2020-08-19 08:01:31 +0000
commit5c1cba5401b499b80bd46e783b5a444f18991922 (patch)
tree4078e3b1460d92ce74b4f74cd1b3e938e9e9abf9 /src/plugins/nat
parent587ea45ad84675cb62380c73c6f484cd6fce7934 (diff)
nat: session cli command fix
Type: fix Change-Id: I57ae649d1b26d5bea2df89c209f257372e565b49 Signed-off-by: Filip Varga <fivarga@cisco.com>
Diffstat (limited to 'src/plugins/nat')
-rw-r--r--src/plugins/nat/nat_format.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/plugins/nat/nat_format.c b/src/plugins/nat/nat_format.c
index e47ba69b167..3dfe6046969 100644
--- a/src/plugins/nat/nat_format.c
+++ b/src/plugins/nat/nat_format.c
@@ -121,14 +121,22 @@ format_snat_session (u8 * s, va_list * args)
s = format (s, " i2o %U proto %u fib %u\n",
format_ip4_address, &sess->in2out.addr,
sess->in2out.port, sess->in2out.fib_index);
- s = format (s, " o2i %U proto %u fib %u\n",
+ s = format (s, " o2i %U proto %u fib %u\n",
format_ip4_address, &sess->out2in.addr,
sess->out2in.port, sess->out2in.fib_index);
}
else
{
- s = format (s, " i2o %U\n", format_snat_key, &sess->in2out);
- s = format (s, " o2i %U\n", format_snat_key, &sess->out2in);
+ s = format (s, " i2o %U proto %U port %d fib %d\n",
+ format_ip4_address, &sess->in2out.addr,
+ format_nat_protocol, sess->nat_proto,
+ clib_net_to_host_u16 (sess->in2out.port),
+ sess->in2out.fib_index);
+ s = format (s, " o2i %U proto %U port %d fib %d\n",
+ format_ip4_address, &sess->out2in.addr,
+ format_nat_protocol, sess->nat_proto,
+ clib_net_to_host_u16 (sess->out2in.port),
+ sess->out2in.fib_index);
}
if (is_ed_session (sess) || is_fwd_bypass_session (sess))
{