Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
promise
OpenXG-RAN
Commits
56b1d24f
Commit
56b1d24f
authored
Nov 05, 2020
by
yaojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix error InitialContextSetupResponse
parent
7bef73bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
63 deletions
+64
-63
openair3/NGAP/ngap_gNB_handlers.c
openair3/NGAP/ngap_gNB_handlers.c
+5
-5
openair3/NGAP/ngap_gNB_nas_procedures.c
openair3/NGAP/ngap_gNB_nas_procedures.c
+59
-58
No files found.
openair3/NGAP/ngap_gNB_handlers.c
View file @
56b1d24f
...
...
@@ -882,11 +882,11 @@ int ngap_gNB_handle_initial_context_request(uint32_t assoc_id,
}
/* Initial context request = UE-related procedure -> stream != 0 */
if
(
stream
==
0
)
{
NGAP_ERROR
(
"[SCTP %d] Received UE-related procedure on stream (%d)
\n
"
,
assoc_id
,
stream
);
return
-
1
;
}
//
if (stream == 0) {
//
NGAP_ERROR("[SCTP %d] Received UE-related procedure on stream (%d)\n",
//
assoc_id, stream);
//
return -1;
//
}
ue_desc_p
->
rx_stream
=
stream
;
ue_desc_p
->
amf_ue_ngap_id
=
amf_ue_ngap_id
;
...
...
openair3/NGAP/ngap_gNB_nas_procedures.c
View file @
56b1d24f
...
...
@@ -710,67 +710,68 @@ int ngap_gNB_initial_ctxt_resp(
ie
->
criticality
=
NGAP_Criticality_ignore
;
ie
->
value
.
present
=
NGAP_InitialContextSetupResponseIEs__value_PR_PDUSessionResourceSetupListCxtRes
;
for
(
i
=
0
;
i
<
initial_ctxt_resp_p
->
nb_of_pdusessions
;
i
++
)
{
NGAP_PDUSessionResourceSetupItemCxtRes_t
*
item
;
NGAP_PDUSessionResourceSetupResponseTransfer_t
*
pdusessionTransfer_p
=
NULL
;
/* mandatory */
item
=
(
NGAP_PDUSessionResourceSetupItemCxtRes_t
*
)
calloc
(
1
,
sizeof
(
NGAP_PDUSessionResourceSetupItemCxtRes_t
));
/* pDUSessionID */
item
->
pDUSessionID
=
initial_ctxt_resp_p
->
pdusessions
[
i
].
pdusession_id
;
/* dLQosFlowPerTNLInformation */
pdusessionTransfer_p
=
(
NGAP_PDUSessionResourceSetupResponseTransfer_t
*
)
calloc
(
1
,
sizeof
(
NGAP_PDUSessionResourceSetupResponseTransfer_t
));
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
present
=
NGAP_UPTransportLayerInformation_PR_gTPTunnel
;
GTP_TEID_TO_ASN1
(
initial_ctxt_resp_p
->
pdusessions
[
i
].
gtp_teid
,
&
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
gTP_TEID
);
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
buf
=
malloc
(
initial_ctxt_resp_p
->
pdusessions
[
i
].
gNB_addr
.
length
);
memcpy
(
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
buf
,
initial_ctxt_resp_p
->
pdusessions
[
i
].
gNB_addr
.
buffer
,
initial_ctxt_resp_p
->
pdusessions
[
i
].
gNB_addr
.
length
);
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
size
=
initial_ctxt_resp_p
->
pdusessions
[
i
].
gNB_addr
.
length
;
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
bits_unused
=
0
;
NGAP_DEBUG
(
"initial_ctxt_resp_p: pdusession ID %ld, gnb_addr %d.%d.%d.%d, SIZE %ld
\n
"
,
item
->
pDUSessionID
,
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
buf
[
0
],
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
buf
[
1
],
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
buf
[
2
],
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
buf
[
3
],
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
size
);
/* associatedQosFlowList. number of 1? */
for
(
int
j
=
0
;
j
<
initial_ctxt_resp_p
->
pdusessions
[
i
].
nb_of_qos_flow
;
j
++
)
{
NGAP_AssociatedQosFlowItem_t
*
ass_qos_item_p
;
ass_qos_item_p
=
(
NGAP_AssociatedQosFlowItem_t
*
)
calloc
(
1
,
sizeof
(
NGAP_AssociatedQosFlowItem_t
));
/* qosFlowIdentifier */
ass_qos_item_p
->
qosFlowIdentifier
=
initial_ctxt_resp_p
->
pdusessions
[
i
].
associated_qos_flows
[
j
].
qci
;
/* qosFlowMappingIndication */
if
(
initial_ctxt_resp_p
->
pdusessions
[
i
].
associated_qos_flows
[
j
].
qos_flow_mapping_ind
!=
QOSFLOW_MAPPING_INDICATION_NON
)
{
ass_qos_item_p
->
qosFlowMappingIndication
=
malloc
(
sizeof
(
*
ass_qos_item_p
->
qosFlowMappingIndication
));
*
ass_qos_item_p
->
qosFlowMappingIndication
=
initial_ctxt_resp_p
->
pdusessions
[
i
].
associated_qos_flows
[
j
].
qos_flow_mapping_ind
;
}
ASN_SEQUENCE_ADD
(
&
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
associatedQosFlowList
.
list
,
ass_qos_item_p
);
}
memset
(
&
res
,
0
,
sizeof
(
res
));
res
=
asn_encode_to_new_buffer
(
NULL
,
ATS_ALIGNED_CANONICAL_PER
,
&
asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer
,
pdusessionTransfer_p
);
item
->
pDUSessionResourceSetupResponseTransfer
.
buf
=
res
.
buffer
;
item
->
pDUSessionResourceSetupResponseTransfer
.
size
=
res
.
result
.
encoded
;
if
(
initial_ctxt_resp_p
->
nb_of_pdusessions
){
for
(
i
=
0
;
i
<
initial_ctxt_resp_p
->
nb_of_pdusessions
;
i
++
)
{
NGAP_PDUSessionResourceSetupItemCxtRes_t
*
item
;
NGAP_PDUSessionResourceSetupResponseTransfer_t
*
pdusessionTransfer_p
=
NULL
;
/* mandatory */
item
=
(
NGAP_PDUSessionResourceSetupItemCxtRes_t
*
)
calloc
(
1
,
sizeof
(
NGAP_PDUSessionResourceSetupItemCxtRes_t
));
ASN_STRUCT_FREE_CONTENTS_ONLY
(
asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer
,
pdusessionTransfer_p
);
ASN_SEQUENCE_ADD
(
&
ie
->
value
.
choice
.
PDUSessionResourceSetupListCxtRes
.
list
,
item
);
}
/* pDUSessionID */
item
->
pDUSessionID
=
initial_ctxt_resp_p
->
pdusessions
[
i
].
pdusession_id
;
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* dLQosFlowPerTNLInformation */
pdusessionTransfer_p
=
(
NGAP_PDUSessionResourceSetupResponseTransfer_t
*
)
calloc
(
1
,
sizeof
(
NGAP_PDUSessionResourceSetupResponseTransfer_t
));
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
present
=
NGAP_UPTransportLayerInformation_PR_gTPTunnel
;
GTP_TEID_TO_ASN1
(
initial_ctxt_resp_p
->
pdusessions
[
i
].
gtp_teid
,
&
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
gTP_TEID
);
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
buf
=
malloc
(
initial_ctxt_resp_p
->
pdusessions
[
i
].
gNB_addr
.
length
);
memcpy
(
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
buf
,
initial_ctxt_resp_p
->
pdusessions
[
i
].
gNB_addr
.
buffer
,
initial_ctxt_resp_p
->
pdusessions
[
i
].
gNB_addr
.
length
);
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
size
=
initial_ctxt_resp_p
->
pdusessions
[
i
].
gNB_addr
.
length
;
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
bits_unused
=
0
;
NGAP_DEBUG
(
"initial_ctxt_resp_p: pdusession ID %ld, gnb_addr %d.%d.%d.%d, SIZE %ld
\n
"
,
item
->
pDUSessionID
,
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
buf
[
0
],
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
buf
[
1
],
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
buf
[
2
],
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
buf
[
3
],
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
uPTransportLayerInformation
.
choice
.
gTPTunnel
->
transportLayerAddress
.
size
);
/* associatedQosFlowList. number of 1? */
for
(
int
j
=
0
;
j
<
initial_ctxt_resp_p
->
pdusessions
[
i
].
nb_of_qos_flow
;
j
++
)
{
NGAP_AssociatedQosFlowItem_t
*
ass_qos_item_p
;
ass_qos_item_p
=
(
NGAP_AssociatedQosFlowItem_t
*
)
calloc
(
1
,
sizeof
(
NGAP_AssociatedQosFlowItem_t
));
/* qosFlowIdentifier */
ass_qos_item_p
->
qosFlowIdentifier
=
initial_ctxt_resp_p
->
pdusessions
[
i
].
associated_qos_flows
[
j
].
qci
;
/* qosFlowMappingIndication */
if
(
initial_ctxt_resp_p
->
pdusessions
[
i
].
associated_qos_flows
[
j
].
qos_flow_mapping_ind
!=
QOSFLOW_MAPPING_INDICATION_NON
)
{
ass_qos_item_p
->
qosFlowMappingIndication
=
malloc
(
sizeof
(
*
ass_qos_item_p
->
qosFlowMappingIndication
));
*
ass_qos_item_p
->
qosFlowMappingIndication
=
initial_ctxt_resp_p
->
pdusessions
[
i
].
associated_qos_flows
[
j
].
qos_flow_mapping_ind
;
}
ASN_SEQUENCE_ADD
(
&
pdusessionTransfer_p
->
dLQosFlowPerTNLInformation
.
associatedQosFlowList
.
list
,
ass_qos_item_p
);
}
memset
(
&
res
,
0
,
sizeof
(
res
));
res
=
asn_encode_to_new_buffer
(
NULL
,
ATS_ALIGNED_CANONICAL_PER
,
&
asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer
,
pdusessionTransfer_p
);
item
->
pDUSessionResourceSetupResponseTransfer
.
buf
=
res
.
buffer
;
item
->
pDUSessionResourceSetupResponseTransfer
.
size
=
res
.
result
.
encoded
;
ASN_STRUCT_FREE_CONTENTS_ONLY
(
asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer
,
pdusessionTransfer_p
);
ASN_SEQUENCE_ADD
(
&
ie
->
value
.
choice
.
PDUSessionResourceSetupListCxtRes
.
list
,
item
);
}
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
}
/* optional */
if
(
initial_ctxt_resp_p
->
nb_of_pdusessions_failed
)
{
ie
=
(
NGAP_InitialContextSetupResponseIEs_t
*
)
calloc
(
1
,
sizeof
(
NGAP_InitialContextSetupResponseIEs_t
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment