From 8c78b480f9d1dbb0461f9294891687d43080abf5 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 29 Sep 2010 01:00:46 +0800 Subject: nat: Store the IMSI inside the SCCP Connection data Store the IMSI for the connections that we are tracking, it will be freed when the normnal SCCP connection is freed. --- openbsc/include/openbsc/bsc_nat_sccp.h | 1 + openbsc/src/nat/bsc_nat_utils.c | 1 + 2 files changed, 2 insertions(+) diff --git a/openbsc/include/openbsc/bsc_nat_sccp.h b/openbsc/include/openbsc/bsc_nat_sccp.h index c4f756e3d..eecd5dcfa 100644 --- a/openbsc/include/openbsc/bsc_nat_sccp.h +++ b/openbsc/include/openbsc/bsc_nat_sccp.h @@ -79,6 +79,7 @@ struct sccp_connections { int con_type; int con_local; int imsi_checked; + char *imsi; /* * audio handling. Remember if we have ever send a CRCX, diff --git a/openbsc/src/nat/bsc_nat_utils.c b/openbsc/src/nat/bsc_nat_utils.c index c1e3c9828..9e4ccc6e2 100644 --- a/openbsc/src/nat/bsc_nat_utils.c +++ b/openbsc/src/nat/bsc_nat_utils.c @@ -469,6 +469,7 @@ static int _dt_check_id_resp(struct bsc_connection *bsc, ret = auth_imsi(bsc, mi_string); con->imsi_checked = 1; + con->imsi = talloc_strdup(con, mi_string); return ret; } -- cgit v1.2.3