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.
diff --git a/openbsc/include/openbsc/bsc_nat_sccp.h b/openbsc/include/openbsc/bsc_nat_sccp.h
index c4f756e..eecd5dc 100644
--- a/openbsc/include/openbsc/bsc_nat_sccp.h
+++ b/openbsc/include/openbsc/bsc_nat_sccp.h
@@ -79,6 +79,7 @@
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 c1e3c98..9e4ccc6 100644
--- a/openbsc/src/nat/bsc_nat_utils.c
+++ b/openbsc/src/nat/bsc_nat_utils.c
@@ -469,6 +469,7 @@
ret = auth_imsi(bsc, mi_string);
con->imsi_checked = 1;
+ con->imsi = talloc_strdup(con, mi_string);
return ret;
}