From f55cbe475c50ec213781410d18ed99f853fa7f8d Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Mon, 5 Feb 2018 16:50:52 +0100
Subject: [PATCH] bugfix: fix initialUEMessage criticality

S1AP specs say:

    initialUEMessage S1AP-ELEMENTARY-PROCEDURE ::= {
        INITIATING MESSAGE      InitialUEMessage
        PROCEDURE CODE          id-initialUEMessage
        CRITICALITY             ignore
    }

So let's use "ignore", not "reject".

The online decoder http://asn1-playground.oss.com/ did
not decode a message encoded by the eNB because of this.

Only the S1AP messages captured while doing a simple connection
of one UE have been tested with the online decoder.

So, not all the S1AP messages have been checked, maybe some
instances of this problem are still there.

It does not seem to harm the actual UE<->eNB<->EPC communication
(because we don't check the integrity of messages or because
asn1c does not do it), so it's not a big deal.
---
 openair3/S1AP/s1ap_eNB_encoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openair3/S1AP/s1ap_eNB_encoder.c b/openair3/S1AP/s1ap_eNB_encoder.c
index 9a5f422158..7bd8bc09aa 100644
--- a/openair3/S1AP/s1ap_eNB_encoder.c
+++ b/openair3/S1AP/s1ap_eNB_encoder.c
@@ -470,7 +470,7 @@ int s1ap_eNB_encode_initial_ue_message(
   return s1ap_generate_initiating_message(buffer,
                                           length,
                                           S1ap_ProcedureCode_id_initialUEMessage,
-                                          S1ap_Criticality_reject,
+                                          S1ap_Criticality_ignore,
                                           &asn_DEF_S1ap_InitialUEMessage,
                                           initialUEMessage_p);
 }
-- 
GitLab