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
wangjie
OpenXG-RAN
Commits
37ee9eb6
Commit
37ee9eb6
authored
Aug 03, 2020
by
masayuki.harada
Committed by
Haruki NAOI
Aug 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix x2 setup problem.
(cherry picked from commit 4c664da7d2ca85f60902f0ec929abe8d5c11bae0)
parent
32291b72
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
28 deletions
+34
-28
openair2/X2AP/x2ap_eNB.c
openair2/X2AP/x2ap_eNB.c
+2
-14
openair2/X2AP/x2ap_eNB_handler.c
openair2/X2AP/x2ap_eNB_handler.c
+19
-13
openair3/SCTP/sctp_eNB_task.c
openair3/SCTP/sctp_eNB_task.c
+13
-1
No files found.
openair2/X2AP/x2ap_eNB.c
View file @
37ee9eb6
...
@@ -111,8 +111,6 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
...
@@ -111,8 +111,6 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
X2AP_ERROR
(
"%s %d: sctp_new_association_resp is a NULL pointer
\n
"
,
__FILE__
,
__LINE__
);
X2AP_ERROR
(
"%s %d: sctp_new_association_resp is a NULL pointer
\n
"
,
__FILE__
,
__LINE__
);
return
;
return
;
}
}
printf
(
"x2ap_eNB_handle_sctp_association_resp at 1
\n
"
);
dump_trees
();
instance_p
=
x2ap_eNB_get_instance
(
instance
);
instance_p
=
x2ap_eNB_get_instance
(
instance
);
if
(
instance_p
==
NULL
)
{
if
(
instance_p
==
NULL
)
{
X2AP_ERROR
(
"%s %d: instance_p is a NULL pointer
\n
"
,
__FILE__
,
__LINE__
);
X2AP_ERROR
(
"%s %d: instance_p is a NULL pointer
\n
"
,
__FILE__
,
__LINE__
);
...
@@ -145,8 +143,6 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
...
@@ -145,8 +143,6 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
X2AP_ERROR
(
"%s %d: x2ap_enb_data_p is a NULL pointer
\n
"
,
__FILE__
,
__LINE__
);
X2AP_ERROR
(
"%s %d: x2ap_enb_data_p is a NULL pointer
\n
"
,
__FILE__
,
__LINE__
);
return
;
return
;
}
}
printf
(
"x2ap_eNB_handle_sctp_association_resp at 2
\n
"
);
dump_trees
();
if
(
sctp_new_association_resp
->
sctp_state
!=
SCTP_STATE_ESTABLISHED
)
{
if
(
sctp_new_association_resp
->
sctp_state
!=
SCTP_STATE_ESTABLISHED
)
{
X2AP_WARN
(
"Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u
\n
"
,
X2AP_WARN
(
"Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u
\n
"
,
...
@@ -154,28 +150,23 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
...
@@ -154,28 +150,23 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
instance
,
instance
,
sctp_new_association_resp
->
ulp_cnx_id
);
sctp_new_association_resp
->
ulp_cnx_id
);
x2ap_handle_x2_setup_message
(
instance_p
,
x2ap_enb_data_p
,
x2ap_handle_x2_setup_message
(
instance_p
,
x2ap_enb_data_p
,
sctp_new_association_resp
->
sctp_state
==
SCTP_STATE_SHUTDOWN
);
(
sctp_new_association_resp
->
sctp_state
==
SCTP_STATE_SHUTDOWN
)
|
(
sctp_new_association_resp
->
sctp_state
==
SCTP_STATE_UNREACHABLE
)
);
return
;
return
;
}
}
printf
(
"x2ap_eNB_handle_sctp_association_resp at 3
\n
"
);
dump_trees
();
/* Update parameters */
/* Update parameters */
x2ap_enb_data_p
->
assoc_id
=
sctp_new_association_resp
->
assoc_id
;
x2ap_enb_data_p
->
assoc_id
=
sctp_new_association_resp
->
assoc_id
;
x2ap_enb_data_p
->
in_streams
=
sctp_new_association_resp
->
in_streams
;
x2ap_enb_data_p
->
in_streams
=
sctp_new_association_resp
->
in_streams
;
x2ap_enb_data_p
->
out_streams
=
sctp_new_association_resp
->
out_streams
;
x2ap_enb_data_p
->
out_streams
=
sctp_new_association_resp
->
out_streams
;
printf
(
"x2ap_eNB_handle_sctp_association_resp at 4
\n
"
);
dump_trees
();
/* Prepare new x2 Setup Request */
/* Prepare new x2 Setup Request */
x2ap_eNB_generate_x2_setup_request
(
instance_p
,
x2ap_enb_data_p
);
x2ap_eNB_generate_x2_setup_request
(
instance_p
,
x2ap_enb_data_p
);
dump_trees
();
}
}
static
static
void
x2ap_eNB_handle_sctp_association_ind
(
instance_t
instance
,
sctp_new_association_ind_t
*
sctp_new_association_ind
)
{
void
x2ap_eNB_handle_sctp_association_ind
(
instance_t
instance
,
sctp_new_association_ind_t
*
sctp_new_association_ind
)
{
x2ap_eNB_instance_t
*
instance_p
;
x2ap_eNB_instance_t
*
instance_p
;
x2ap_eNB_data_t
*
x2ap_enb_data_p
;
x2ap_eNB_data_t
*
x2ap_enb_data_p
;
printf
(
"x2ap_eNB_handle_sctp_association_ind at 1 (called for instance %d)
\n
"
,
instance
);
dump_trees
();
if
(
sctp_new_association_ind
==
NULL
)
{
if
(
sctp_new_association_ind
==
NULL
)
{
X2AP_ERROR
(
"%s %d: sctp_new_association_ind is a NULL pointer
\n
"
,
__FILE__
,
__LINE__
);
X2AP_ERROR
(
"%s %d: sctp_new_association_ind is a NULL pointer
\n
"
,
__FILE__
,
__LINE__
);
...
@@ -219,13 +210,10 @@ void x2ap_eNB_handle_sctp_association_ind(instance_t instance, sctp_new_associat
...
@@ -219,13 +210,10 @@ void x2ap_eNB_handle_sctp_association_ind(instance_t instance, sctp_new_associat
X2AP_WARN
(
"x2ap_enb_data_p already exists
\n
"
);
X2AP_WARN
(
"x2ap_enb_data_p already exists
\n
"
);
}
}
printf
(
"x2ap_eNB_handle_sctp_association_ind at 2
\n
"
);
dump_trees
();
/* Update parameters */
/* Update parameters */
//x2ap_enb_data_p->assoc_id = sctp_new_association_ind->assoc_id;
//x2ap_enb_data_p->assoc_id = sctp_new_association_ind->assoc_id;
x2ap_enb_data_p
->
in_streams
=
sctp_new_association_ind
->
in_streams
;
x2ap_enb_data_p
->
in_streams
=
sctp_new_association_ind
->
in_streams
;
x2ap_enb_data_p
->
out_streams
=
sctp_new_association_ind
->
out_streams
;
x2ap_enb_data_p
->
out_streams
=
sctp_new_association_ind
->
out_streams
;
printf
(
"x2ap_eNB_handle_sctp_association_ind at 3
\n
"
);
dump_trees
();
dump_trees
();
}
}
...
...
openair2/X2AP/x2ap_eNB_handler.c
View file @
37ee9eb6
...
@@ -149,11 +149,6 @@ void x2ap_handle_x2_setup_message(x2ap_eNB_instance_t *instance_p, x2ap_eNB_data
...
@@ -149,11 +149,6 @@ void x2ap_handle_x2_setup_message(x2ap_eNB_instance_t *instance_p, x2ap_eNB_data
}
}
}
}
}
else
{
}
else
{
/* Check that at least one setup message is pending */
DevCheck
(
instance_p
->
x2_target_enb_pending_nb
>
0
,
instance_p
->
instance
,
instance_p
->
x2_target_enb_pending_nb
,
0
);
if
(
instance_p
->
x2_target_enb_pending_nb
>
0
)
{
if
(
instance_p
->
x2_target_enb_pending_nb
>
0
)
{
/* Decrease pending messages number */
/* Decrease pending messages number */
instance_p
->
x2_target_enb_pending_nb
--
;
instance_p
->
x2_target_enb_pending_nb
--
;
...
@@ -352,6 +347,24 @@ x2ap_eNB_handle_x2_setup_request(instance_t instance,
...
@@ -352,6 +347,24 @@ x2ap_eNB_handle_x2_setup_request(instance_t instance,
}
}
}
}
instance_p
=
x2ap_eNB_get_instance
(
instance
);
if
(
instance_p
==
NULL
)
{
X2AP_ERROR
(
"%s %d: instance_p is a NULL pointer
\n
"
,
__FILE__
,
__LINE__
);
itti_free
(
ITTI_MSG_ORIGIN_ID
(
msg
),
msg
);
return
-
1
;
}
X2AP_DEBUG
(
"Check eNB id %d my eNB id %d
\n
"
,
eNB_id
,
instance_p
->
eNB_id
);
if
(
eNB_id
==
instance_p
->
eNB_id
){
X2AP_ERROR
(
"Rejecting x2 setup request as eNB id %d is duplicated my eNB id assoc_id: %d
\n
"
,
eNB_id
,
assoc_id
);
x2ap_eNB_generate_x2_setup_failure
(
instance
,
assoc_id
,
X2AP_Cause_PR_protocol
,
X2AP_CauseProtocol_unspecified
,
-
1
);
return
-
1
;
}
X2AP_DEBUG
(
"Adding eNB to the list of associated eNBs
\n
"
);
X2AP_DEBUG
(
"Adding eNB to the list of associated eNBs
\n
"
);
if
((
x2ap_eNB_data
=
x2ap_is_eNB_id_in_list
(
eNB_id
))
==
NULL
)
{
if
((
x2ap_eNB_data
=
x2ap_is_eNB_id_in_list
(
eNB_id
))
==
NULL
)
{
...
@@ -413,13 +426,6 @@ x2ap_eNB_handle_x2_setup_request(instance_t instance,
...
@@ -413,13 +426,6 @@ x2ap_eNB_handle_x2_setup_request(instance_t instance,
}
}
}
}
instance_p
=
x2ap_eNB_get_instance
(
instance
);
if
(
instance_p
==
NULL
)
{
X2AP_ERROR
(
"%s %d: instance_p is a NULL pointer
\n
"
,
__FILE__
,
__LINE__
);
itti_free
(
ITTI_MSG_ORIGIN_ID
(
msg
),
msg
);
return
-
1
;
}
itti_send_msg_to_task
(
TASK_RRC_ENB
,
instance_p
->
instance
,
msg
);
itti_send_msg_to_task
(
TASK_RRC_ENB
,
instance_p
->
instance
,
msg
);
return
x2ap_eNB_generate_x2_setup_response
(
instance_p
,
x2ap_eNB_data
);
return
x2ap_eNB_generate_x2_setup_response
(
instance_p
,
x2ap_eNB_data
);
...
...
openair3/SCTP/sctp_eNB_task.c
View file @
37ee9eb6
...
@@ -967,7 +967,7 @@ sctp_eNB_read_from_socket(
...
@@ -967,7 +967,7 @@ sctp_eNB_read_from_socket(
&
sinfo
,
&
flags
);
&
sinfo
,
&
flags
);
if
(
n
<
0
)
{
if
(
n
<
0
)
{
if
(
(
errno
==
ENOTCONN
)
||
(
errno
==
ECONNRESET
)
||
(
errno
==
E
TIMEDOUT
)
||
(
errno
==
E
CONNREFUSED
)
)
if
(
(
errno
==
ENOTCONN
)
||
(
errno
==
ECONNRESET
)
||
(
errno
==
ECONNREFUSED
)
)
{
{
itti_unsubscribe_event_fd
(
TASK_SCTP
,
sctp_cnx
->
sd
);
itti_unsubscribe_event_fd
(
TASK_SCTP
,
sctp_cnx
->
sd
);
...
@@ -978,6 +978,18 @@ sctp_eNB_read_from_socket(
...
@@ -978,6 +978,18 @@ sctp_eNB_read_from_socket(
sctp_cnx
->
task_id
,
sctp_cnx
->
instance
,
-
1
,
sctp_cnx
->
task_id
,
sctp_cnx
->
instance
,
-
1
,
sctp_cnx
->
cnx_id
,
SCTP_STATE_UNREACHABLE
,
0
,
0
);
sctp_cnx
->
cnx_id
,
SCTP_STATE_UNREACHABLE
,
0
,
0
);
close
(
sctp_cnx
->
sd
);
STAILQ_REMOVE
(
&
sctp_cnx_list
,
sctp_cnx
,
sctp_cnx_list_elm_s
,
entries
);
sctp_nb_cnx
--
;
free
(
sctp_cnx
);
}
else
if
(
errno
==
ETIMEDOUT
)
{
SCTP_DEBUG
(
"SCTP heart beat timeout for sd %d
\n
"
,
sctp_cnx
->
sd
);
SCTP_ERROR
(
"sctp_recvmsg (fd %d, len %d ): %s:%d
\n
"
,
sctp_cnx
->
sd
,
n
,
strerror
(
errno
),
errno
);
sctp_itti_send_association_resp
(
sctp_cnx
->
task_id
,
sctp_cnx
->
instance
,
sctp_cnx
->
assoc_id
,
sctp_cnx
->
cnx_id
,
SCTP_STATE_SHUTDOWN
,
0
,
0
);
close
(
sctp_cnx
->
sd
);
close
(
sctp_cnx
->
sd
);
STAILQ_REMOVE
(
&
sctp_cnx_list
,
sctp_cnx
,
sctp_cnx_list_elm_s
,
entries
);
STAILQ_REMOVE
(
&
sctp_cnx_list
,
sctp_cnx
,
sctp_cnx_list_elm_s
,
entries
);
sctp_nb_cnx
--
;
sctp_nb_cnx
--
;
...
...
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