aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmocom/sgsn/sgsn.h2
-rw-r--r--src/gprs/gprs_gmm.c2
-rw-r--r--src/gprs/sgsn_vty.c10
3 files changed, 9 insertions, 5 deletions
diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h
index e4eda17d2..464a64fe0 100644
--- a/include/osmocom/sgsn/sgsn.h
+++ b/include/osmocom/sgsn/sgsn.h
@@ -10,6 +10,7 @@
#include <osmocom/sgsn/common.h>
#include <ares.h>
+#include <gtp.h>
struct gprs_gsup_client;
struct hostent;
@@ -147,6 +148,7 @@ extern struct sgsn_instance *sgsn;
int sgsn_vty_init(struct sgsn_config *cfg);
int sgsn_parse_config(const char *config_file);
+char *sgsn_gtp_ntoa(struct ul16_t *ul);
/* sgsn.c */
diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c
index d11ecced8..147e0017b 100644
--- a/src/gprs/gprs_gmm.c
+++ b/src/gprs/gprs_gmm.c
@@ -120,6 +120,8 @@ static void mmctx_change_gtpu_endpoints_to_sgsn(struct sgsn_mm_ctx *mm_ctx)
{
struct sgsn_pdp_ctx *pdp;
llist_for_each_entry(pdp, &mm_ctx->pdp_list, list) {
+ LOGMMCTXP(LOGL_INFO, mm_ctx, "Changing GTP-U endpoints %s -> %s\n",
+ sgsn_gtp_ntoa(&pdp->lib->gsnlu), inet_ntoa(sgsn->cfg.gtp_listenaddr.sin_addr));
sgsn_pdp_upd_gtp_u(pdp,
&sgsn->cfg.gtp_listenaddr.sin_addr,
sizeof(sgsn->cfg.gtp_listenaddr.sin_addr));
diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c
index faac69b1d..496bd6806 100644
--- a/src/gprs/sgsn_vty.c
+++ b/src/gprs/sgsn_vty.c
@@ -425,7 +425,7 @@ const struct value_string gprs_mm_st_strs[] = {
{ 0, NULL }
};
-static char *gtp_ntoa(struct ul16_t *ul)
+char *sgsn_gtp_ntoa(struct ul16_t *ul)
{
if (ul->l == 4) {
struct in_addr *ia = (struct in_addr *) ul;
@@ -450,13 +450,13 @@ static void vty_dump_pdp(struct vty *vty, const char *pfx,
gprs_pdpaddr2str(pdp->lib->eua.v, pdp->lib->eua.l),
VTY_NEWLINE);
vty_out(vty, "%s GTP Local Control(%s / TEIC: 0x%08x) ", pfx,
- gtp_ntoa(&pdp->lib->gsnlc), pdp->lib->teic_own);
+ sgsn_gtp_ntoa(&pdp->lib->gsnlc), pdp->lib->teic_own);
vty_out(vty, "Data(%s / TEID: 0x%08x)%s",
- gtp_ntoa(&pdp->lib->gsnlu), pdp->lib->teid_own, VTY_NEWLINE);
+ sgsn_gtp_ntoa(&pdp->lib->gsnlu), pdp->lib->teid_own, VTY_NEWLINE);
vty_out(vty, "%s GTP Remote Control(%s / TEIC: 0x%08x) ", pfx,
- gtp_ntoa(&pdp->lib->gsnrc), pdp->lib->teic_gn);
+ sgsn_gtp_ntoa(&pdp->lib->gsnrc), pdp->lib->teic_gn);
vty_out(vty, "Data(%s / TEID: 0x%08x)%s",
- gtp_ntoa(&pdp->lib->gsnru), pdp->lib->teid_gn, VTY_NEWLINE);
+ sgsn_gtp_ntoa(&pdp->lib->gsnru), pdp->lib->teid_gn, VTY_NEWLINE);
}
vty_out_rate_ctr_group(vty, " ", pdp->ctrg);