<p>pespin <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/20807">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  laforge: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">lapdm: Allow SABM L=0 in Timer Recovery State<br><br>3GPP TS 44.006 8.6.3 "Procedures for re-establishment" is quite<br>explicit:<br>"""<br>When the data link layer receives in the multiple frame established state<br>or !!!timer recovery state!!! a DL-ESTABLISH- REQUEST primitive from layer<br>3 or an SABM (with L=0), the normal establishment procedure of sub-clause<br>8.4.1.2 shall be initiated.<br>"""<br><br>If L>0 in that state, send a DM as stated in 8.4.1.2:<br>"""<br>If the data link layer entity is unable to enter the multiple-frame-established<br>state, it shall respond to the SABM command with a DM response with the F bit<br>set to the same binary value as the P bit in the received SABM command.<br>"""<br><br>Related: OS#4549<br>Related: OS#4819<br>Change-Id: I7959dc39f883cd5c56c36a21176a2401838d7b62<br>---<br>M src/gsm/lapd_core.c<br>1 file changed, 17 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c</span><br><span>index bcb64b0..ed0b320 100644</span><br><span>--- a/src/gsm/lapd_core.c</span><br><span>+++ b/src/gsm/lapd_core.c</span><br><span>@@ -849,6 +849,23 @@</span><br><span>         switch (dl->state) {</span><br><span>      case LAPD_STATE_IDLE:</span><br><span>                break;</span><br><span style="color: hsl(120, 100%, 40%);">+        case LAPD_STATE_TIMER_RECOV:</span><br><span style="color: hsl(120, 100%, 40%);">+          LOGDL(dl, LOGL_INFO, "SABM command, timer recovery state\n");</span><br><span style="color: hsl(120, 100%, 40%);">+               /* If link is lost on the remote side, we start over</span><br><span style="color: hsl(120, 100%, 40%);">+          * and send DL-ESTABLISH indication again. */</span><br><span style="color: hsl(120, 100%, 40%);">+          /* 3GPP TS 44.006 8.6.3 "Procedures for re-establishment" */</span><br><span style="color: hsl(120, 100%, 40%);">+                if (length) {</span><br><span style="color: hsl(120, 100%, 40%);">+                 /* check for contention resoultion */</span><br><span style="color: hsl(120, 100%, 40%);">+                 LOGDL(dl, LOGL_ERROR, "SABM L>0 not expected in timer "</span><br><span style="color: hsl(120, 100%, 40%);">+                        "recovery state\n");</span><br><span style="color: hsl(120, 100%, 40%);">+                  mdl_error(MDL_CAUSE_SABM_INFO_NOTALL, lctx);</span><br><span style="color: hsl(120, 100%, 40%);">+                  lapd_send_dm(lctx);</span><br><span style="color: hsl(120, 100%, 40%);">+                   msgb_free(msg);</span><br><span style="color: hsl(120, 100%, 40%);">+                       return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+             }</span><br><span style="color: hsl(120, 100%, 40%);">+             /* re-establishment, continue below */</span><br><span style="color: hsl(120, 100%, 40%);">+                lapd_stop_t200(dl);</span><br><span style="color: hsl(120, 100%, 40%);">+           break;</span><br><span>       case LAPD_STATE_MF_EST:</span><br><span>              LOGDL(dl, LOGL_INFO, "SABM command, multiple frame established state\n");</span><br><span>          /* If link is lost on the remote side, we start over</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/20807">change 20807</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmocore/+/20807"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I7959dc39f883cd5c56c36a21176a2401838d7b62 </div>
<div style="display:none"> Gerrit-Change-Number: 20807 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>