diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-02-21 00:39:36 +0100 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-03-15 19:18:14 +0100 |
commit | 10719b74c362591cd01c3766f74ef03639203e1d (patch) | |
tree | 4e0fed5a071f24099c9b565e11fe02f4af3f8774 /src/gprs/gprs_gmm.c | |
parent | 5926e840ccdea595fb63e0a51e3069882e4ce73c (diff) |
implement support for 3-digit MNC with leading zeros
Add 3-digit flags and use the new RAI and LAI API from libosmocore throughout
the code base to be able to handle an MNC < 100 that has three digits (leading
zeros).
Note that in gbproxy_test.ok, 0-0 changes to 000-000 instead of 000-00, because
the parsed ra buffer is 000000 which results in 000-000, while 00f000 would
result in 000-00. IOW this is expected.
Change-Id: I7437dfaa586689e2bef0d4be6537e5577a8f6c26
Diffstat (limited to 'src/gprs/gprs_gmm.c')
-rw-r--r-- | src/gprs/gprs_gmm.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index 9313e989e..c9fb8da8a 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -1673,12 +1673,11 @@ static int gsm48_rx_gmm_ra_upd_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg, LOGMMCTXP(LOGL_INFO, mmctx, "Looked up by matching TLLI and P_TMSI. " "BSSGP TLLI: %08x, P-TMSI: %08x (%08x), " - "TLLI: %08x (%08x), RA: %d-%d-%d-%d\n", + "TLLI: %08x (%08x), RA: %s\n", msgb_tlli(msg), mmctx->p_tmsi, mmctx->p_tmsi_old, mmctx->gb.tlli, mmctx->gb.tlli_new, - mmctx->ra.mcc, mmctx->ra.mnc, - mmctx->ra.lac, mmctx->ra.rac); + osmo_rai_name(&mmctx->ra)); mmctx->gmm_state = GMM_COMMON_PROC_INIT; } @@ -1687,8 +1686,8 @@ static int gsm48_rx_gmm_ra_upd_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg, { /* We cannot use the mmctx */ LOGMMCTXP(LOGL_INFO, mmctx, - "The MM context cannot be used, RA: %d-%d-%d-%d\n", - mmctx->ra.mcc, mmctx->ra.mnc, + "The MM context cannot be used, RA: %03d-%0*d-%d-%d\n", + mmctx->ra.mcc, mmctx->ra.mnc_3_digits, mmctx->ra.mnc, mmctx->ra.lac, mmctx->ra.rac); mmctx = NULL; } |