<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/titan.TestPorts.AF_PACKET/+/22705">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">FrameRelay_Emulation: Use Rx SeqNR == 0 to force link down<br><br>In quickly repeated test case executions we have the problem that<br>both the Q.933 LMI detection of link outage/interruption, as well as<br>the NS-ALIVE mechanism are too slow to detect the outage, and in fact<br>don't detect the outage.  This leads to inconsistent state on both<br>sides, with one side thinking NS-VCs are still ALIVE/UNBLOCKED, while<br>the other side considers them DEAD.<br><br>A Q.933 conforming transmittere would never send a sequece number of<br>zero, but always start from one.  This means we can use this as<br>a flag to force the peer to assume a "service affecting condition"<br>which will make it tell NS that the link went down, etc.<br><br>Related: OS#4974<br>Change-Id: I3e38ade112e11c86db906da9846a966cb33ac1bd<br>---<br>M src/FrameRelay_Emulation.ttcn<br>1 file changed, 10 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/titan.TestPorts.AF_PACKET refs/changes/05/22705/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/FrameRelay_Emulation.ttcn b/src/FrameRelay_Emulation.ttcn</span><br><span>index 90cfd73..fbca3bd 100644</span><br><span>--- a/src/FrameRelay_Emulation.ttcn</span><br><span>+++ b/src/FrameRelay_Emulation.ttcn</span><br><span>@@ -207,7 +207,16 @@</span><br><span> </span><br><span> /* handle incoming Link Integrity Verification IE */</span><br><span> private function q933_handle_rx_link_int(Q933_LinkIntegrityIE link_int) runs on FR_Emulation_CT {</span><br><span style="color: hsl(0, 100%, 40%);">-        if (q933em.tx_seq_nr != link_int.recv_seq_nr) {</span><br><span style="color: hsl(120, 100%, 40%);">+       if (link_int.recv_seq_nr == 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+              /* The value '0' shall never be sent by a standards-conforming implementation,</span><br><span style="color: hsl(120, 100%, 40%);">+                 * See Q.933 section A.4.2 (NOTE).  In Osmocom we use it as "magic" value to</span><br><span style="color: hsl(120, 100%, 40%);">+                 * artificially indicate a 'service affecting condition' */</span><br><span style="color: hsl(120, 100%, 40%);">+           q933em.service_affecting_condition := true;</span><br><span style="color: hsl(120, 100%, 40%);">+           log("Detecting service affecting condition after zero receive sequence number");</span><br><span style="color: hsl(120, 100%, 40%);">+            notify_all_clients(FRemu_Event:{link_status:=FR_LINK_STS_UNAVAILABLE});</span><br><span style="color: hsl(120, 100%, 40%);">+               q933em.num_cycles := 0;</span><br><span style="color: hsl(120, 100%, 40%);">+               T392.stop;</span><br><span style="color: hsl(120, 100%, 40%);">+    } else if (q933em.tx_seq_nr != link_int.recv_seq_nr) {</span><br><span>               log("Link Integrity IE with discontiguous sequence numbers: expected=",</span><br><span>                q933em.tx_seq_nr, " received=", link_int.recv_seq_nr);</span><br><span>                 fill_err_bucket(true);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/titan.TestPorts.AF_PACKET/+/22705">change 22705</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/titan.TestPorts.AF_PACKET/+/22705"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: titan.TestPorts.AF_PACKET </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I3e38ade112e11c86db906da9846a966cb33ac1bd </div>
<div style="display:none"> Gerrit-Change-Number: 22705 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>