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
canghaiwuhen
OpenXG-RAN
Commits
2af1e45d
Commit
2af1e45d
authored
Nov 09, 2020
by
masayuki.harada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert x2 IE name and checking buffer size.
parent
c7f11447
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
openair2/X2AP/x2ap_eNB_generate_messages.c
openair2/X2AP/x2ap_eNB_generate_messages.c
+6
-6
openair2/X2AP/x2ap_eNB_handler.c
openair2/X2AP/x2ap_eNB_handler.c
+10
-3
No files found.
openair2/X2AP/x2ap_eNB_generate_messages.c
View file @
2af1e45d
...
...
@@ -839,8 +839,8 @@ int x2ap_eNB_generate_x2_handover_request_ack (x2ap_eNB_instance_t *instance_p,
ie
=
(
X2AP_HandoverRequestAcknowledge_IEs_t
*
)
calloc
(
1
,
sizeof
(
X2AP_HandoverRequestAcknowledge_IEs_t
));
ie
->
id
=
X2AP_ProtocolIE_ID_id_New_eNB_UE_X2AP_ID
;
ie
->
criticality
=
X2AP_Criticality_ignore
;
ie
->
value
.
present
=
X2AP_HandoverRequestAcknowledge_IEs__value_PR_UE_X2AP_ID
;
ie
->
value
.
choice
.
UE_X2AP_ID
=
id_target
;
ie
->
value
.
present
=
X2AP_HandoverRequestAcknowledge_IEs__value_PR_UE_X2AP_ID
_1
;
ie
->
value
.
choice
.
UE_X2AP_ID
_1
=
id_target
;
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* mandatory */
...
...
@@ -962,8 +962,8 @@ int x2ap_eNB_generate_x2_ue_context_release (x2ap_eNB_instance_t *instance_p, x2
ie
=
(
X2AP_UEContextRelease_IEs_t
*
)
calloc
(
1
,
sizeof
(
X2AP_UEContextRelease_IEs_t
));
ie
->
id
=
X2AP_ProtocolIE_ID_id_New_eNB_UE_X2AP_ID
;
ie
->
criticality
=
X2AP_Criticality_reject
;
ie
->
value
.
present
=
X2AP_UEContextRelease_IEs__value_PR_UE_X2AP_ID
;
ie
->
value
.
choice
.
UE_X2AP_ID
=
id_target
;
ie
->
value
.
present
=
X2AP_UEContextRelease_IEs__value_PR_UE_X2AP_ID
_1
;
ie
->
value
.
choice
.
UE_X2AP_ID
_1
=
id_target
;
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
if
(
x2ap_eNB_encode_pdu
(
&
pdu
,
&
buffer
,
&
len
)
<
0
)
{
...
...
@@ -1029,8 +1029,8 @@ int x2ap_eNB_generate_x2_handover_cancel (x2ap_eNB_instance_t *instance_p, x2ap_
ie
=
(
X2AP_HandoverCancel_IEs_t
*
)
calloc
(
1
,
sizeof
(
X2AP_HandoverCancel_IEs_t
));
ie
->
id
=
X2AP_ProtocolIE_ID_id_New_eNB_UE_X2AP_ID
;
ie
->
criticality
=
X2AP_Criticality_ignore
;
ie
->
value
.
present
=
X2AP_HandoverCancel_IEs__value_PR_UE_X2AP_ID
;
ie
->
value
.
choice
.
UE_X2AP_ID
=
id_target
;
ie
->
value
.
present
=
X2AP_HandoverCancel_IEs__value_PR_UE_X2AP_ID
_1
;
ie
->
value
.
choice
.
UE_X2AP_ID
_1
=
id_target
;
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
}
...
...
openair2/X2AP/x2ap_eNB_handler.c
View file @
2af1e45d
...
...
@@ -881,6 +881,10 @@ int x2ap_eNB_handle_handover_preparation (instance_t instance,
}
X2AP_RRC_Context_t
*
c
=
&
ie
->
value
.
choice
.
UE_ContextInformation
.
rRC_Context
;
if
(
c
->
size
>
8192
/* TODO: this is the size of rrc_buffer in struct x2ap_handover_req_s */
)
{
printf
(
"%s:%d: fatal: buffer too big
\n
"
,
__FILE__
,
__LINE__
);
abort
();
}
memcpy
(
X2AP_HANDOVER_REQ
(
msg
).
rrc_buffer
,
c
->
buf
,
c
->
size
);
X2AP_HANDOVER_REQ
(
msg
).
rrc_buffer_size
=
c
->
size
;
...
...
@@ -956,7 +960,7 @@ int x2ap_eNB_handle_handover_response (instance_t instance,
return
-
1
;
}
id_target
=
ie
->
value
.
choice
.
UE_X2AP_ID
;
id_target
=
ie
->
value
.
choice
.
UE_X2AP_ID
_1
;
ue_id
=
id_source
;
...
...
@@ -1039,6 +1043,9 @@ int x2ap_eNB_handle_handover_response (instance_t instance,
X2AP_TargeteNBtoSource_eNBTransparentContainer_t
*
c
=
&
ie
->
value
.
choice
.
TargeteNBtoSource_eNBTransparentContainer
;
if
(
c
->
size
>
1024
/* TODO: this is the size of rrc_buffer in struct x2ap_handover_req_ack_s */
)
{
printf
(
"%s:%d: fatal: buffer too big
\n
"
,
__FILE__
,
__LINE__
);
abort
();
}
memcpy
(
X2AP_HANDOVER_REQ_ACK
(
msg
).
rrc_buffer
,
c
->
buf
,
c
->
size
);
X2AP_HANDOVER_REQ_ACK
(
msg
).
rrc_buffer_size
=
c
->
size
;
...
...
@@ -1111,7 +1118,7 @@ int x2ap_eNB_handle_ue_context_release (instance_t instance,
return
-
1
;
}
id_target
=
ie
->
value
.
choice
.
UE_X2AP_ID
;
id_target
=
ie
->
value
.
choice
.
UE_X2AP_ID
_1
;
ue_id
=
id_source
;
if
(
ue_id
!=
x2ap_find_id_from_id_source
(
&
instance_p
->
id_manager
,
id_source
))
{
...
...
@@ -1199,7 +1206,7 @@ int x2ap_eNB_handle_handover_cancel (instance_t instance,
X2AP_INFO
(
"%s %d: ie is a NULL pointer
\n
"
,
__FILE__
,
__LINE__
);
id_target
=
-
1
;
}
else
id_target
=
ie
->
value
.
choice
.
UE_X2AP_ID
;
id_target
=
ie
->
value
.
choice
.
UE_X2AP_ID
_1
;
X2AP_FIND_PROTOCOLIE_BY_ID
(
X2AP_HandoverCancel_IEs_t
,
ie
,
x2HandoverCancel
,
X2AP_ProtocolIE_ID_id_Cause
,
true
);
...
...
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