Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF-Simple
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
Operations
Operations
Metrics
Environments
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
CommunityXG
OpenXG-SMF-Simple
Commits
bbac9e52
Commit
bbac9e52
authored
Jan 22, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for ePCO
parent
dd8c27ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
29 deletions
+61
-29
src/nas/ies/ExtendedProtocolConfigurationOptions.c
src/nas/ies/ExtendedProtocolConfigurationOptions.c
+39
-15
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+12
-4
src/smf_app/smf_pco.cpp
src/smf_app/smf_pco.cpp
+10
-10
No files found.
src/nas/ies/ExtendedProtocolConfigurationOptions.c
View file @
bbac9e52
...
...
@@ -46,15 +46,16 @@ int encode_extended_protocol_configuration_options(
}
lenPtr
=
(
buffer
+
encoded
);
encoded
++
;
lenPtr
=
(
buffer
+
encoded
);
encoded
++
;
uint16_t
temp
=
0
;
encoded
+=
2
;
//ENCODE_U16
encoded
+=
encode_protocol_configuration_options
(
extendedprotocolconfigurationoptions
,
buffer
+
encoded
,
len
-
encoded
);
*
lenPtr
=
encoded
-
1
-
((
iei
>
0
)
?
1
:
0
);
uint32_t
len_ie
=
encoded
-
2
-
((
iei
>
0
)
?
1
:
0
);
ENCODE_U16
(
lenPtr
,
len_ie
,
temp
);
//*lenPtr = encoded - 2 - ((iei > 0) ? 1 : 0);
return
encoded
;
}
...
...
@@ -84,16 +85,26 @@ int encode_protocol_configuration_options(
.
protocol_or_container_ids
[
num_protocol_or_container_id
]
.
length
;
encoded
++
;
if
(
protocolconfigurationoptions
.
protocol_or_container_ids
[
num_protocol_or_container_id
]
.
length
>
0
)
{
if
((
encode_result
=
encode_bstring
(
protocolconfigurationoptions
.
protocol_or_container_ids
[
num_protocol_or_container_id
]
.
contents
,
buffer
+
encoded
,
len
-
encoded
))
<
0
)
buffer
+
encoded
,
protocolconfigurationoptions
.
protocol_or_container_ids
[
num_protocol_or_container_id
]
.
length
))
<
0
)
return
encode_result
;
else
encoded
+=
encode_result
;
}
else
{
encoded
+=
protocolconfigurationoptions
.
protocol_or_container_ids
[
num_protocol_or_container_id
]
.
length
;
}
num_protocol_or_container_id
+=
1
;
}
return
encoded
;
...
...
@@ -111,11 +122,23 @@ int decode_extended_protocol_configuration_options(
decoded
++
;
}
ielen
=
*
(
buffer
+
decoded
);
DECODE_U16
(
buffer
+
decoded
,
ielen
,
decoded
);
if
(((
*
(
buffer
+
decoded
)
>>
7
)
&
0x1
)
!=
1
)
{
return
TLV_VALUE_DOESNT_MATCH
;
}
// Bits 7 to 4 of octet 3 are spare, read as 0
if
(((
*
(
buffer
+
decoded
)
&
0x78
)
>>
3
)
!=
0
)
{
return
TLV_VALUE_DOESNT_MATCH
;
}
extendedprotocolconfigurationoptions
->
configuration_protocol
=
(
*
(
buffer
+
decoded
)
>>
1
)
&
0x7
;
decoded
++
;
decode_result
=
decode_protocol_configuration_options
(
extendedprotocolconfigurationoptions
,
buffer
+
decoded
,
ielen
-
decoded
);
extendedprotocolconfigurationoptions
,
buffer
+
decoded
,
ielen
);
if
(
decode_result
<
0
)
{
return
decode_result
;
...
...
@@ -132,7 +155,7 @@ int decode_protocol_configuration_options(
const
uint8_t
*
const
buffer
,
const
const
uint32_t
len
)
{
int
decoded
=
0
;
int
decode_result
=
0
;
/*
if (((*(buffer + decoded) >> 7) & 0x1) != 1) {
return TLV_VALUE_DOESNT_MATCH;
}
...
...
@@ -141,10 +164,10 @@ int decode_protocol_configuration_options(
if (((*(buffer + decoded) & 0x78) >> 3) != 0) {
return TLV_VALUE_DOESNT_MATCH;
}
protocolconfigurationoptions
->
configuration_protocol
=
(
*
(
buffer
+
decoded
)
>>
1
)
&
0x7
;
decoded
++
;
*/
//
protocolconfigurationoptions->configuration_protocol =
//
(*(buffer + decoded) >> 1) & 0x7;
//
decoded++;
protocolconfigurationoptions
->
num_protocol_or_container_id
=
0
;
while
(
3
<=
((
int32_t
)
len
-
(
int32_t
)
decoded
))
{
...
...
@@ -155,6 +178,7 @@ int decode_protocol_configuration_options(
->
num_protocol_or_container_id
]
.
id
,
decoded
);
DECODE_U8
(
buffer
+
decoded
,
protocolconfigurationoptions
...
...
src/smf_app/smf_app.cpp
View file @
bbac9e52
...
...
@@ -713,16 +713,24 @@ void smf_app::handle_pdu_session_create_sm_context_request(
// TODO: AlwaysonPDUSessionRequested
// TODO: SMPDUDNRequestContainer
// TODO: ExtendedProtocolConfigurationOptions
if
(
decoded_nas_msg
.
plain
.
sm
.
pdu_session_establishment_request
.
extendedprotocolconfigurationoptions
.
num_protocol_or_container_id
>
0
)
{
Logger
::
smf_app
().
debug
(
"pco ext %d, spare %d, configuration protocol %d,number_ids %d"
,
decoded_nas_msg
.
plain
.
sm
.
pdu_session_establishment_request
.
extendedprotocolconfigurationoptions
.
ext
,
decoded_nas_msg
.
plain
.
sm
.
pdu_session_establishment_request
.
extendedprotocolconfigurationoptions
.
spare
,
decoded_nas_msg
.
plain
.
sm
.
pdu_session_establishment_request
.
extendedprotocolconfigurationoptions
.
configuration_protocol
,
decoded_nas_msg
.
plain
.
sm
.
pdu_session_establishment_request
.
extendedprotocolconfigurationoptions
.
num_protocol_or_container_id
);
// if (decoded_nas_msg.plain.sm.pdu_session_establishment_request
// .extendedprotocolconfigurationoptions.num_protocol_or_container_id >
// 0) {
protocol_configuration_options_t
pco
=
{};
xgpp_conv
::
protocol_configuration_options_nas_to_core
(
decoded_nas_msg
.
plain
.
sm
.
pdu_session_establishment_request
.
extendedprotocolconfigurationoptions
,
pco
);
smreq
->
req
.
set_pco
(
pco
);
}
//
}
// Get necessary information
supi_t
supi
=
smreq
->
req
.
get_supi
();
...
...
src/smf_app/smf_pco.cpp
View file @
bbac9e52
...
...
@@ -48,18 +48,18 @@ int smf_app::pco_push_protocol_or_container_id(
pco
.
num_protocol_or_container_id
)
{
return
RETURNerror
;
}
pco
.
protocol_or_container_ids
[
pco
.
num_protocol_or_container_id
].
protocol_id
=
pco_protocol_or_container_id_t
pco_item
=
{};
pco_item
.
protocol_id
=
poc_id
->
protocol_id
;
pco
.
protocol_or_container_ids
[
pco
.
num_protocol_or_container_id
]
.
length_of_protocol_id_contents
=
poc_id
->
length_of_protocol_id_contents
;
pco
.
protocol_or_container_ids
[
pco
.
num_protocol_or_container_id
]
.
protocol_id_contents
=
poc_id
->
protocol_id_contents
;
assert
(
pco
.
protocol_or_container_ids
[
pco
.
num_protocol_or_container_id
]
.
length_of_protocol_id_contents
==
pco
.
protocol_or_container_ids
[
pco
.
num_protocol_or_container_id
]
.
protocol_id_contents
.
size
());
pco_item
.
length_of_protocol_id_contents
=
poc_id
->
length_of_protocol_id_contents
;
pco_item
.
protocol_id_contents
=
poc_id
->
protocol_id_contents
;
// assert(
// pco.protocol_or_container_ids[pco.num_protocol_or_container_id]
// .length_of_protocol_id_contents ==
// pco.protocol_or_container_ids[pco.num_protocol_or_container_id]
// .protocol_id_contents.size());
// poc_id->protocol_id_contents = nullptr;
pco
.
protocol_or_container_ids
.
push_back
(
pco_item
);
pco
.
num_protocol_or_container_id
+=
1
;
return
RETURNok
;
}
...
...
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