aboutsummaryrefslogtreecommitdiffstats
path: root/ggsn/ggsn.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-08-12 19:29:16 +0200
committerHarald Welte <laforge@gnumonks.org>2017-08-12 22:53:54 +0200
commitb10ee08c2ff4df8acc053d2ad9a2cba04e757061 (patch)
tree289b828c702e623f7dc71a462b5e0479d16374d7 /ggsn/ggsn.c
parent23eea1d132120198745dcca32728906d5f05dc5f (diff)
Properly format IMSI before using it in trap
For some reason Max' commits introducing the CTRL/trap interface about one year ago didn't convert the IMSI to its actual textual representation before usign it in the CTRL interface. Let's clean that up by properly interpreting the IMSI. Change-Id: I8b20d2e47a29de266d93a7ddd5e6877f7e346a63
Diffstat (limited to 'ggsn/ggsn.c')
-rw-r--r--ggsn/ggsn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 05a56ae..c6a6dac 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -146,7 +146,7 @@ static bool send_trap(const struct gsn_t *gsn, const struct pdp_t *pdp, const st
const char *addrstr = in46a_ntop(&member->addr, addrbuf, sizeof(addrbuf));
- snprintf(val, sizeof(val), "%" PRIu64 ",%s", pdp->imsi, addrstr);
+ snprintf(val, sizeof(val), "%s,%s", imsi_gtp2str(&pdp->imsi), addrstr);
if (ctrl_cmd_send_trap(gsn->ctrl, var, val) < 0) {
LOGP(DGGSN, LOGL_ERROR, "Failed to create and send TRAP for IMSI %" PRIu64 " [%s].\n", pdp->imsi, var);