[PATCH] libosmocore[master]: lapd_core: fix program flow

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/.

dexter gerrit-no-reply at lists.osmocom.org
Fri Feb 3 11:41:13 UTC 2017


Hello Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/1726

to look at the new patch set (#3).

lapd_core: fix program flow

when the lapd core is in state LAPD_STATE_SABM_SENT, and the
retransmission counter exceeds (link down) lapd_t200_cb() will
send an RELASE_INDICATION and an MDL_ERROR_INDICATION to L3.
This action is done before the state is processed. This seems
to be no problem with standard retransmission counts (n200),
but may cause timing problems that lead to deadlock states when
custom timer configurations are in use. (Ericsson RBS).

This commit moves the functions calls for sending the indications
mentioned above to the very end of the if branch to relax the
timing again. (See lapd_t200_cb())

Change-Id: I1c1beb3701b19744a3ce9946abca7767d20a0b6a
---
M src/gsm/lapd_core.c
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/26/1726/3

diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c
index 84b1828..5af82aa 100644
--- a/src/gsm/lapd_core.c
+++ b/src/gsm/lapd_core.c
@@ -556,11 +556,6 @@
 	case LAPD_STATE_SABM_SENT:
 		/* 5.4.1.3 */
 		if (dl->retrans_ctr + 1 >= dl->n200_est_rel + 1) {
-			/* send RELEASE INDICATION to L3 */
-			send_dl_simple(PRIM_DL_REL, PRIM_OP_INDICATION,
-				&dl->lctx);
-			/* send MDL ERROR INIDCATION to L3 */
-			mdl_error(MDL_CAUSE_T200_EXPIRED, &dl->lctx);
 			/* flush tx and send buffers */
 			lapd_dl_flush_tx(dl);
 			lapd_dl_flush_send(dl);
@@ -569,6 +564,11 @@
 			/* NOTE: we must not change any other states or buffers
 			 * and queues, since we may reconnect after handover
 			 * failure. the buffered messages is replaced there */
+			/* send RELEASE INDICATION to L3 */
+			send_dl_simple(PRIM_DL_REL, PRIM_OP_INDICATION,
+				&dl->lctx);
+			/* send MDL ERROR INIDCATION to L3 */
+			mdl_error(MDL_CAUSE_T200_EXPIRED, &dl->lctx);
 			break;
 		}
 		/* retransmit SABM command */

-- 
To view, visit https://gerrit.osmocom.org/1726
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1c1beb3701b19744a3ce9946abca7767d20a0b6a
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list