pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-gprs/+/32571 )


Change subject: llc: Fix N(U) wrongly reset during LLGM-ASSIGN.req
......................................................................

llc: Fix N(U) wrongly reset during LLGM-ASSIGN.req

Change-Id: Ifd6d59703cc2d267fc37595a1ad47e326ebd2a30
---
M src/llc/llc_llgmm.c
1 file changed, 20 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/71/32571/1

diff --git a/src/llc/llc_llgmm.c b/src/llc/llc_llgmm.c
index cd8c189..5834041 100644
--- a/src/llc/llc_llgmm.c
+++ b/src/llc/llc_llgmm.c
@@ -153,16 +153,24 @@
                        /* If TLLI old == TLLI_UNASSIGNED was assigned to LLME, 
then this is
                         * TLLI assignmemt according to 8.3.1 */
                        llme->old_tlli = TLLI_UNASSIGNED;
-                       llme->tlli = new_tlli;
                        llme->state = OSMO_GPRS_LLC_LLMS_ASSIGNED;
                        /* 8.5.3.1 For all LLE's */
                        for (i = 0; i < ARRAY_SIZE(llme->lle); i++) {
                                struct gprs_llc_lle *l = &llme->lle[i];
-                               l->vu_send = l->vu_recv = 0;
-                               l->retrans_ctr = 0;
                                l->state = OSMO_GPRS_LLC_LLES_ASSIGNED_ADM;
+                               if (llme->tlli != new_tlli) {
+                                       /* Only reset state if the new tlli is 
really changing.
+                                       * During GMM attachment, the TLLI is 
already known and
+                                       * used by LLC (LLME allocated on the 
fly), and hence it
+                                       * is expected to keep using previous 
state with the
+                                       * same TLLI from here onwards.
+                                       */
+                                       l->vu_send = l->vu_recv = 0;
+                                       l->retrans_ctr = 0;
+                               }
                                /* FIXME Set parameters according to table 9 */
                        }
+                       llme->tlli = new_tlli;
                }
        } else if (old_tlli != TLLI_UNASSIGNED && new_tlli != TLLI_UNASSIGNED) {
                /* TLLI Change 8.3.2 */

--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32571
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: Ifd6d59703cc2d267fc37595a1ad47e326ebd2a30
Gerrit-Change-Number: 32571
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to