This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15165 Change subject: Introduce define TLLI_UNASSIGNED ...................................................................... Introduce define TLLI_UNASSIGNED Change-Id: Ib8be5af2a5e92a7403505b73ce4c1751832de40d --- M include/osmocom/sgsn/gprs_llc.h M src/gprs/gprs_gmm.c M src/gprs/gprs_llc.c M src/gprs/gprs_sgsn.c 4 files changed, 18 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/65/15165/1 diff --git a/include/osmocom/sgsn/gprs_llc.h b/include/osmocom/sgsn/gprs_llc.h index 5b12248..8a0b9ef 100644 --- a/include/osmocom/sgsn/gprs_llc.h +++ b/include/osmocom/sgsn/gprs_llc.h @@ -192,6 +192,9 @@ #define GPRS_LLME_RESET_AGE (0) +/* 3GPP TS 44.064 § 8.3 TLLI assignment procedures */ +#define TLLI_UNASSIGNED (0xffffffff) + extern struct llist_head gprs_llc_llmes; /* LLC low level types */ diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index 5a6ea28..c8bc0f7 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -2077,7 +2077,7 @@ /* Unassign the old TLLI */ mmctx->gb.tlli = mmctx->gb.tlli_new; gprs_llme_copy_key(mmctx, mmctx->gb.llme); - gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff, + gprs_llgmm_assign(mmctx->gb.llme, TLLI_UNASSIGNED, mmctx->gb.tlli_new); } mmctx->gmm_state = GMM_REGISTERED_NORMAL; @@ -2102,7 +2102,7 @@ if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) { /* Unassign the old TLLI */ mmctx->gb.tlli = mmctx->gb.tlli_new; - gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff, + gprs_llgmm_assign(mmctx->gb.llme, TLLI_UNASSIGNED, mmctx->gb.tlli_new); } mmctx->gmm_state = GMM_REGISTERED_NORMAL; @@ -2125,7 +2125,7 @@ if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) { /* Unassign the old TLLI */ mmctx->gb.tlli = mmctx->gb.tlli_new; - //gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff, mmctx->gb.tlli_new, GPRS_ALGO_GEA0, NULL); + //gprs_llgmm_assign(mmctx->gb.llme, TLLI_UNASSIGNED, mmctx->gb.tlli_new, GPRS_ALGO_GEA0, NULL); } rc = 0; break; diff --git a/src/gprs/gprs_llc.c b/src/gprs/gprs_llc.c index acf4b54..a301a63 100644 --- a/src/gprs/gprs_llc.c +++ b/src/gprs/gprs_llc.c @@ -527,7 +527,7 @@ lle = &llme->lle[sapi]; return lle; } - + LOGP(DLLC, LOGL_NOTICE, "unknown TLLI(0x%08x)/SAPI(%d): Silently dropping\n", tlli, sapi); @@ -556,7 +556,7 @@ return NULL; llme->tlli = tlli; - llme->old_tlli = 0xffffffff; + llme->old_tlli = TLLI_UNASSIGNED; llme->state = GPRS_LLMS_UNASSIGNED; llme->age_timestamp = GPRS_LLME_RESET_AGE; llme->cksn = GSM_KEY_SEQ_INVAL; @@ -1042,19 +1042,19 @@ { unsigned int i; - if (old_tlli == 0xffffffff && new_tlli != 0xffffffff) { + if (old_tlli == TLLI_UNASSIGNED && new_tlli != TLLI_UNASSIGNED) { /* TLLI Assignment 8.3.1 */ /* New TLLI shall be assigned and used when (re)transmitting LLC frames */ - /* If old TLLI != 0xffffffff was assigned to LLME, then TLLI + /* If old TLLI != TLLI_UNASSIGNED was assigned to LLME, then TLLI * old is unassigned. Only TLLI new shall be accepted when * received from peer. */ - if (llme->old_tlli != 0xffffffff) { - llme->old_tlli = 0xffffffff; + if (llme->old_tlli != TLLI_UNASSIGNED) { + llme->old_tlli = TLLI_UNASSIGNED; llme->tlli = new_tlli; } else { - /* If TLLI old == 0xffffffff was assigned to LLME, then this is + /* If TLLI old == TLLI_UNASSIGNED was assigned to LLME, then this is * TLLI assignmemt according to 8.3.1 */ - llme->old_tlli = 0xffffffff; + llme->old_tlli = TLLI_UNASSIGNED; llme->tlli = new_tlli; llme->state = GPRS_LLMS_ASSIGNED; /* 8.5.3.1 For all LLE's */ @@ -1066,14 +1066,14 @@ /* FIXME Set parameters according to table 9 */ } } - } else if (old_tlli != 0xffffffff && new_tlli != 0xffffffff) { + } else if (old_tlli != TLLI_UNASSIGNED && new_tlli != TLLI_UNASSIGNED) { /* TLLI Change 8.3.2 */ /* Both TLLI Old and TLLI New are assigned; use New when * (re)transmitting. Accept both Old and New on Rx */ llme->old_tlli = old_tlli; llme->tlli = new_tlli; llme->state = GPRS_LLMS_ASSIGNED; - } else if (old_tlli != 0xffffffff && new_tlli == 0xffffffff) { + } else if (old_tlli != TLLI_UNASSIGNED && new_tlli == TLLI_UNASSIGNED) { /* TLLI Unassignment 8.3.3) */ llme->tlli = llme->old_tlli = 0; llme->state = GPRS_LLMS_UNASSIGNED; @@ -1091,7 +1091,7 @@ /* TLLI unassignment */ int gprs_llgmm_unassign(struct gprs_llc_llme *llme) { - return gprs_llgmm_assign(llme, llme->tlli, 0xffffffff); + return gprs_llgmm_assign(llme, llme->tlli, TLLI_UNASSIGNED); } /* Chapter 7.2.1.2 LLGMM-RESET.req */ diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c index 9a5de41..e01bc5c 100644 --- a/src/gprs/gprs_sgsn.c +++ b/src/gprs/gprs_sgsn.c @@ -362,7 +362,7 @@ if (llme) { /* TLLI unassignment, must be called after sgsn_mm_ctx_free */ - gprs_llgmm_assign(llme, tlli, 0xffffffff); + gprs_llgmm_assign(llme, tlli, TLLI_UNASSIGNED); } } -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15165 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Ib8be5af2a5e92a7403505b73ce4c1751832de40d Gerrit-Change-Number: 15165 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190812/9c5fb2ba/attachment.htm>