summaryrefslogtreecommitdiffstats
path: root/src/gb
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-02-23 11:10:08 +0100
committerHarald Welte <laforge@gnumonks.org>2019-02-23 11:34:31 +0100
commitdc802810df2a5471f987666cc2da58055f55174c (patch)
treef8df7e6b6d37d8324cc631bfa0a2de3e176f442b /src/gb
parent2e717c968d86b3b4d4671aea0019ba47e59bcc2c (diff)
NS: Don't print information about FR/GRE if not enabled!
Change-Id: I9209ee4ba5ebfc4f96b4c1d42840e1906455bae7
Diffstat (limited to 'src/gb')
-rw-r--r--src/gb/gprs_ns_vty.c7
1 files 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)