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
02871149
Commit
02871149
authored
Feb 20, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add mutex for PAA allocation
parent
021125d3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
src/nas/ies/ExtendedProtocolConfigurationOptions.c
src/nas/ies/ExtendedProtocolConfigurationOptions.c
+4
-4
src/nas/nas_message.c
src/nas/nas_message.c
+2
-0
src/smf_app/smf_paa_dynamic.hpp
src/smf_app/smf_paa_dynamic.hpp
+7
-1
No files found.
src/nas/ies/ExtendedProtocolConfigurationOptions.c
View file @
02871149
...
...
@@ -30,9 +30,9 @@
int
encode_extended_protocol_configuration_options
(
protocol_configuration_options_nas_t
extendedprotocolconfigurationoptions
,
uint8_t
iei
,
uint8_t
*
buffer
,
uint32_t
len
)
{
uint8_t
*
lenPtr
=
NULL
;
uint32_t
encoded
=
0
;
int
encode_result
=
0
;
uint8_t
*
lenPtr
=
NULL
;
uint32_t
encoded
=
0
;
//
int encode_result = 0;
CHECK_PDU_POINTER_AND_LENGTH_ENCODER
(
buffer
,
((
iei
>
0
)
?
...
...
@@ -150,7 +150,7 @@ int decode_extended_protocol_configuration_options(
//------------------------------------------------------------------------------
int
decode_protocol_configuration_options
(
protocol_configuration_options_nas_t
*
protocolconfigurationoptions
,
const
uint8_t
*
const
buffer
,
const
const
uint32_t
len
)
{
const
uint8_t
*
const
buffer
,
const
uint32_t
len
)
{
int
decoded
=
0
;
int
decode_result
=
0
;
...
...
src/nas/nas_message.c
View file @
02871149
...
...
@@ -33,6 +33,7 @@
#include "TLVEncoder.h"
#include "mmData.h"
#include "secu_defs.h"
#include "dynamic_memory_check.h"
/* L O C A L D E F I N I T I O N S */
#define SR_MAC_SIZE_BYTES 2
...
...
@@ -940,6 +941,7 @@ static int _nas_message_decrypt(
// OAILOG_ERROR(LOG_NAS, "Unknown security header type %u",
// security_header_type); OAILOG_FUNC_RETURN (LOG_NAS, 0);
};
return
0
;
}
static
int
_nas_message_plain_decode
(
...
...
src/smf_app/smf_paa_dynamic.hpp
View file @
02871149
...
...
@@ -157,7 +157,9 @@ class paa_dynamic {
std
::
map
<
std
::
string
,
dnn_dynamic_pools
>
dnns
;
paa_dynamic
()
:
ipv4_pools
(),
ipv6_pools
(),
dnns
(){};
mutable
std
::
shared_mutex
m_ipv4_pools
;
paa_dynamic
()
:
ipv4_pools
(),
ipv6_pools
(),
dnns
(),
m_ipv4_pools
(){};
public:
static
paa_dynamic
&
get_instance
()
{
...
...
@@ -173,6 +175,7 @@ class paa_dynamic {
const
struct
in_addr
&
first
,
const
int
range
)
{
if
(
pool_id
>=
0
)
{
uint32_t
uint32pool_id
=
uint32_t
(
pool_id
);
std
::
unique_lock
lock
(
m_ipv4_pools
);
if
(
!
ipv4_pools
.
count
(
uint32pool_id
))
{
ipv4_pool
pool
(
first
,
range
);
ipv4_pools
[
uint32pool_id
]
=
pool
;
...
...
@@ -206,6 +209,7 @@ class paa_dynamic {
if
(
dnns
.
count
(
dnn_label
))
{
dnn_dynamic_pools
&
dnn_pool
=
dnns
[
dnn_label
];
if
(
paa
.
pdu_session_type
.
pdu_session_type
==
PDU_SESSION_TYPE_E_IPV4
)
{
std
::
unique_lock
lock
(
m_ipv4_pools
);
for
(
std
::
vector
<
uint32_t
>::
const_iterator
it4
=
dnn_pool
.
ipv4_pool_ids
.
begin
();
it4
!=
dnn_pool
.
ipv4_pool_ids
.
end
();
++
it4
)
{
...
...
@@ -264,6 +268,7 @@ class paa_dynamic {
if
(
dnns
.
count
(
dnn_label
))
{
dnn_dynamic_pools
&
dnn_pool
=
dnns
[
dnn_label
];
if
(
paa
.
pdu_session_type
.
pdu_session_type
==
PDU_SESSION_TYPE_E_IPV4
)
{
std
::
unique_lock
lock
(
m_ipv4_pools
);
for
(
std
::
vector
<
uint32_t
>::
const_iterator
it4
=
dnn_pool
.
ipv4_pool_ids
.
begin
();
it4
!=
dnn_pool
.
ipv4_pool_ids
.
end
();
++
it4
)
{
...
...
@@ -295,6 +300,7 @@ class paa_dynamic {
bool
release_paa
(
const
std
::
string
&
dnn_label
,
const
struct
in_addr
&
ipv4_address
)
{
std
::
unique_lock
lock
(
m_ipv4_pools
);
if
(
dnns
.
count
(
dnn_label
))
{
dnn_dynamic_pools
&
dnn_pool
=
dnns
[
dnn_label
];
for
(
std
::
vector
<
uint32_t
>::
const_iterator
it4
=
...
...
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