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
alex037yang
OpenXG-RAN
Commits
04897ab6
Commit
04897ab6
authored
Nov 09, 2020
by
Xue Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GTPU's IP setting error
parent
bce573e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
11 deletions
+38
-11
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+28
-10
openair2/GNB_APP/gnb_paramdef.h
openair2/GNB_APP/gnb_paramdef.h
+10
-1
No files found.
openair2/GNB_APP/gnb_config.c
View file @
04897ab6
...
...
@@ -676,13 +676,16 @@ int RCconfig_nr_gtpu(void ) {
char
*
gnb_interface_name_for_NGU
=
NULL
;
char
*
gnb_ipv4_address_for_NGU
=
NULL
;
uint32_t
gnb_port_for_NGU
=
0
;
char
*
gnb_interface_name_for_S1U
=
NULL
;
char
*
gnb_ipv4_address_for_S1U
=
NULL
;
uint32_t
gnb_port_for_S1U
=
0
;
char
*
address
=
NULL
;
char
*
cidr
=
NULL
;
char
gtpupath
[
MAX_OPTNAME_SIZE
*
2
+
8
];
uint8_t
gnb_mode
=
0
;
paramdef_t
GNBSParams
[]
=
GNBSPARAMS_DESC
;
paramdef_t
NETParams
[]
=
GNBNETPARAMS_DESC
;
paramdef_t
GTPUParams
[]
=
GNBGTPUPARAMS_DESC
;
LOG_I
(
GTPU
,
"Configuring GTPu
\n
"
);
...
...
@@ -692,25 +695,40 @@ int RCconfig_nr_gtpu(void ) {
AssertFatal
(
num_gnbs
>
0
,
"Failed to parse config file no active gNodeBs in %s
\n
"
,
GNB_CONFIG_STRING_ACTIVE_GNBS
);
sprintf
(
gtpupath
,
"%s.[%i].%s"
,
GNB_CONFIG_STRING_GNB_LIST
,
0
,
GNB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG
);
config_get
(
GTPUParams
,
sizeof
(
GTPUParams
)
/
sizeof
(
paramdef_t
),
gtpupath
);
config_get
(
GTPUParams
,
sizeof
(
GTPUParams
)
/
sizeof
(
paramdef_t
),
gtpupath
);
config_get
(
NETParams
,
sizeof
(
NETParams
)
/
sizeof
(
paramdef_t
),
gtpupath
);
if
(
NETParams
[
0
].
strptr
!=
NULL
)
{
// SA
LOG_I
(
GTPU
,
"SA mode
\n
"
);
cidr
=
gnb_ipv4_address_for_NGU
;
gnb_mode
=
0
;
}
else
{
// NSA
LOG_I
(
GTPU
,
"NSA mode
\n
"
);
cidr
=
gnb_ipv4_address_for_S1U
;
gnb_mode
=
1
;
}
address
=
strtok
(
cidr
,
"/"
);
if
(
address
)
{
MessageDef
*
message
;
AssertFatal
((
message
=
itti_alloc_new_message
(
TASK_GNB_APP
,
GTPV1U_ENB_S1_REQ
))
!=
NULL
,
""
);
// IPV4_STR_ADDR_TO_INT_NWBO ( address, RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up, "BAD IP ADDRESS FORMAT FOR eNB
NG
_U !\n" );
// IPV4_STR_ADDR_TO_INT_NWBO ( address, RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up, "BAD IP ADDRESS FORMAT FOR eNB
S1
_U !\n" );
// LOG_I(GTPU,"Configuring GTPu address : %s -> %x\n",address,RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up);
IPV4_STR_ADDR_TO_INT_NWBO
(
address
,
GTPV1U_ENB_S1_REQ
(
message
).
enb_ip_address_for_S1u_S12_S4_up
,
"BAD IP ADDRESS FORMAT FOR eNB NG_U !
\n
"
);
LOG_I
(
GTPU
,
"Configuring GTPu address : %s -> %x
\n
"
,
address
,
GTPV1U_ENB_S1_REQ
(
message
).
enb_ip_address_for_S1u_S12_S4_up
);
GTPV1U_ENB_S1_REQ
(
message
).
enb_port_for_S1u_S12_S4_up
=
gnb_port_for_NGU
;
if
(
gnb_mode
==
1
)
{
// NSA
IPV4_STR_ADDR_TO_INT_NWBO
(
address
,
GTPV1U_ENB_S1_REQ
(
message
).
enb_ip_address_for_S1u_S12_S4_up
,
"BAD IP ADDRESS FORMAT FOR eNB S1_U !
\n
"
);
LOG_I
(
GTPU
,
"Configuring GTPu address : %s -> %x
\n
"
,
address
,
GTPV1U_ENB_S1_REQ
(
message
).
enb_ip_address_for_S1u_S12_S4_up
);
GTPV1U_ENB_S1_REQ
(
message
).
enb_port_for_S1u_S12_S4_up
=
gnb_port_for_S1U
;
}
else
{
// TODO SA
IPV4_STR_ADDR_TO_INT_NWBO
(
address
,
GTPV1U_ENB_S1_REQ
(
message
).
enb_ip_address_for_S1u_S12_S4_up
,
"BAD IP ADDRESS FORMAT FOR gNB NG_U !
\n
"
);
LOG_I
(
GTPU
,
"Configuring GTPu address : %s -> %x
\n
"
,
address
,
GTPV1U_ENB_S1_REQ
(
message
).
enb_ip_address_for_S1u_S12_S4_up
);
GTPV1U_ENB_S1_REQ
(
message
).
enb_port_for_S1u_S12_S4_up
=
gnb_port_for_NGU
;
}
itti_send_msg_to_task
(
TASK_GTPV1_U
,
0
,
message
);
// data model is wrong: gtpu doesn't have enb_id (or module_id)
}
else
LOG_E
(
GTPU
,
"invalid address for NGU
\n
"
);
...
...
openair2/GNB_APP/gnb_paramdef.h
View file @
04897ab6
...
...
@@ -324,6 +324,12 @@ typedef struct ccparams_nr_x2 {
#define GNB_PORT_FOR_X2C_IDX 6
/* S1 interface configuration parameters names */
#define GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_S1_MME "GNB_INTERFACE_NAME_FOR_S1_MME"
#define GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_S1_MME "GNB_IPV4_ADDRESS_FOR_S1_MME"
#define GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_S1U "GNB_INTERFACE_NAME_FOR_S1U"
#define GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_S1U "GNB_IPV4_ADDRESS_FOR_S1U"
#define GNB_CONFIG_STRING_GNB_PORT_FOR_S1U "GNB_PORT_FOR_S1U"
#define GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_NG_AMF "GNB_INTERFACE_NAME_FOR_NG_AMF"
#define GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_NG_AMF "GNB_IPV4_ADDRESS_FOR_NG_AMF"
#define GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_NGU "GNB_INTERFACE_NAME_FOR_NGU"
...
...
@@ -357,7 +363,10 @@ typedef struct ccparams_nr_x2 {
#define GNBGTPUPARAMS_DESC { \
{GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_NGU, NULL, 0, strptr:&gnb_interface_name_for_NGU, defstrval:"lo", TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_GNB_IPV4_ADDR_FOR_NGU, NULL, 0, strptr:&gnb_ipv4_address_for_NGU, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_GNB_PORT_FOR_NGU, NULL, 0, uptr:&gnb_port_for_NGU, defintval:2152, TYPE_UINT, 0} \
{GNB_CONFIG_STRING_GNB_PORT_FOR_NGU, NULL, 0, uptr:&gnb_port_for_NGU, defintval:2152, TYPE_UINT, 0}, \
{GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_S1U, NULL, 0, strptr:&gnb_interface_name_for_S1U, defstrval:"lo", TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_S1U, NULL, 0, strptr:&gnb_ipv4_address_for_S1U, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_GNB_PORT_FOR_S1U, NULL, 0, uptr:&gnb_port_for_S1U, defintval:2152, TYPE_UINT, 0} \
}
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
...
...
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