From dc802810df2a5471f987666cc2da58055f55174c Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 23 Feb 2019 11:10:08 +0100 Subject: NS: Don't print information about FR/GRE if not enabled! Change-Id: I9209ee4ba5ebfc4f96b4c1d42840e1906455bae7 --- src/gb/gprs_ns_vty.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gb/gprs_ns_vty.c b/src/gb/gprs_ns_vty.c index 667db7d0..15247639 100644 --- a/src/gb/gprs_ns_vty.c +++ b/src/gb/gprs_ns_vty.c @@ -198,9 +198,10 @@ static void dump_ns(struct vty *vty, const struct gprs_ns_inst *nsi, bool stats, vty_out(vty, "Encapsulation NS-UDP-IP Local IP: %s, UDP Port: %u%s", inet_ntoa(ia), vty_nsi->nsip.local_port, VTY_NEWLINE); - ia.s_addr = osmo_htonl(vty_nsi->frgre.local_ip); - vty_out(vty, "Encapsulation NS-FR-GRE-IP Local IP: %s%s", - inet_ntoa(ia), VTY_NEWLINE); + if (nsi->frgre.enabled) { + ia.s_addr = osmo_htonl(vty_nsi->frgre.local_ip); + vty_out(vty, "Encapsulation NS-FR-GRE-IP Local IP: %s%s", inet_ntoa(ia), VTY_NEWLINE); + } llist_for_each_entry(nsvc, &nsi->gprs_nsvcs, list) { if (nsvc == nsi->unknown_nsvc) -- cgit v1.2.3