Hello Jenkins Builder,

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

    https://gerrit.osmocom.org/5452

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

MSC_ConnHdlr: Tighten permitted messages

Accept CRCX only once; Accept MDCX only after CRCX; Accept RSL MODIFY
only after RR MODIFY.

Change-Id: I44abdc3d000c76243f9885f0e30e15c2dc9aadaa
---
M bsc/MSC_ConnectionHandler.ttcn
1 file changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/52/5452/2

diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 1bc4350..d615497 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -106,6 +106,8 @@
        var RSL_Message rsl;
        timer T := 10.0;
        var boolean exp_compl := 
ischosen(exp_ass_cpl.pdu.bssmap.assignmentComplete);
+       var boolean crcx_seen := false;
+       var boolean rr_modify_seen := false;
 
        f_create_chan_and_exp(pars);
        /* we should now have a COMPL_L3 at the MSC */
@@ -118,24 +120,26 @@
                setverdict(pass);
                return bssap;
                }
-       [] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr)) -> value rsl {
+       [rr_modify_seen == false] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr)) -> 
value rsl {
                var PDU_ML3_NW_MS l3 := 
dec_PDU_ML3_NW_MS(rsl.ies[2].body.l3_info.payload);
                log("Rx L3 from net: ", l3);
                if (ischosen(l3.msgs.rrm.channelModeModify)) {
                        
f_rsl_reply(ts_RRM_ModeModifyAck(l3.msgs.rrm.channelModeModify.channelDescription,
                                                         
l3.msgs.rrm.channelModeModify.channelMode), rsl);
+                       rr_modify_seen := true;
                }
                repeat;
                }
-       [] RSL.receive(tr_RSL_MsgTypeD(RSL_MT_MODE_MODIFY_REQ)) -> value rsl {
+       [rr_modify_seen] RSL.receive(tr_RSL_MsgTypeD(RSL_MT_MODE_MODIFY_REQ)) 
-> value rsl {
                RSL.send(ts_RSL_MODE_MODIFY_ACK(g_chan_nr));
                repeat;
                }
-       [] RSL.receive(tr_RSL_IPA_CRCX(g_chan_nr)) -> value rsl {
+       [crcx_seen == false] RSL.receive(tr_RSL_IPA_CRCX(g_chan_nr)) -> value 
rsl {
                RSL.send(ts_RSL_IPA_CRCX_ACK(g_chan_nr, 1, 1, 1, 1));
+               crcx_seen := true;
                repeat;
                }
-       [] RSL.receive(tr_RSL_IPA_MDCX(g_chan_nr, ?)) -> value rsl{
+       [crcx_seen] RSL.receive(tr_RSL_IPA_MDCX(g_chan_nr, ?)) -> value rsl{
                RSL.send(ts_RSL_IPA_MDCX_ACK(g_chan_nr, 1, 1, 1, 1));
                repeat;
                }

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I44abdc3d000c76243f9885f0e30e15c2dc9aadaa
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder

Reply via email to