sgsn: Show GSUP client info on 'show sgsn'

This commit adds a line to the output of 'show sgsn' if the GSUP
client has been initialized:

  - Remote authorization: [not] connected to HOST:PORT via GSUP

Sponsored-by: On-Waves ehf
diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c
index d847d91..4deb2ac 100644
--- a/openbsc/src/gprs/sgsn_vty.c
+++ b/openbsc/src/gprs/sgsn_vty.c
@@ -33,11 +33,14 @@
 #include <openbsc/gprs_sgsn.h>
 #include <openbsc/vty.h>
 #include <openbsc/gsm_04_08_gprs.h>
+#include <openbsc/gprs_gsup_client.h>
 
 #include <osmocom/vty/command.h>
 #include <osmocom/vty/vty.h>
 #include <osmocom/vty/misc.h>
 
+#include <osmocom/abis/ipa.h>
+
 #include <pdp.h>
 
 static struct sgsn_config *g_cfg = NULL;
@@ -272,6 +275,14 @@
 DEFUN(show_sgsn, show_sgsn_cmd, "show sgsn",
       SHOW_STR "Display information about the SGSN")
 {
+	if (sgsn->gsup_client) {
+		struct ipa_client_conn *link = sgsn->gsup_client->link;
+		vty_out(vty,
+			"  Remote authorization: %sconnected to %s:%d via GSUP%s",
+			sgsn->gsup_client->is_connected ? "" : "not ",
+			link->addr, link->port,
+			VTY_NEWLINE);
+	}
 	/* FIXME: statistics */
 	return CMD_SUCCESS;
 }