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
61a95d7b
Commit
61a95d7b
authored
Aug 09, 2019
by
gauthier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP PGW-C send CSResp MISSING or UNKNOWN APN
parent
319db397
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
src/pgwc/pgw_app.cpp
src/pgwc/pgw_app.cpp
+21
-0
src/pgwc/pgw_app.hpp
src/pgwc/pgw_app.hpp
+1
-0
No files found.
src/pgwc/pgw_app.cpp
View file @
61a95d7b
...
@@ -293,6 +293,23 @@ pgw_app::pgw_app (const std::string& config_file) : m_s5s8_cp_teid_generator(),
...
@@ -293,6 +293,23 @@ pgw_app::pgw_app (const std::string& config_file) : m_s5s8_cp_teid_generator(),
Logger
::
pgwc_app
().
startup
(
"Started"
);
Logger
::
pgwc_app
().
startup
(
"Started"
);
}
}
//------------------------------------------------------------------------------
void
pgw_app
::
send_create_session_response_cause
(
const
uint64_t
gtpc_tx_id
,
const
teid_t
teid
,
const
endpoint
&
r_endpoint
,
const
cause_t
&
cause
)
const
{
itti_s5s8_create_session_response
*
s5s8
=
new
itti_s5s8_create_session_response
(
TASK_PGWC_APP
,
TASK_PGWC_S5S8
);
//------
// GTPV2C-Stack
//------
s5s8
->
gtpc_tx_id
=
gtpc_tx_id
;
s5s8
->
teid
=
teid
;
s5s8
->
r_endpoint
=
r_endpoint
;
s5s8
->
gtp_ies
.
set
(
cause
);
std
::
shared_ptr
<
itti_s5s8_create_session_response
>
msg
=
std
::
shared_ptr
<
itti_s5s8_create_session_response
>
(
s5s8
);
int
ret
=
itti_inst
->
send_msg
(
msg
);
if
(
RETURNok
!=
ret
)
{
Logger
::
pgwc_app
().
error
(
"Could not send ITTI message %s to task TASK_PGWC_S5S8"
,
s5s8
->
get_msg_name
());
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
pgw_app
::
send_delete_session_response_cause_request_accepted
(
const
uint64_t
gtpc_tx_id
,
const
teid_t
teid
,
void
pgw_app
::
send_delete_session_response_cause_request_accepted
(
const
uint64_t
gtpc_tx_id
,
const
teid_t
teid
,
...
@@ -411,6 +428,8 @@ void pgw_app::handle_itti_msg (std::shared_ptr<itti_s5s8_create_session_request>
...
@@ -411,6 +428,8 @@ void pgw_app::handle_itti_msg (std::shared_ptr<itti_s5s8_create_session_request>
}
}
if
((
csreq
->
teid
)
&&
(
not
pgw_app_inst
->
is_s5s8c_teid_exist
(
csreq
->
teid
)))
{
if
((
csreq
->
teid
)
&&
(
not
pgw_app_inst
->
is_s5s8c_teid_exist
(
csreq
->
teid
)))
{
Logger
::
pgwc_app
().
warn
(
"Received S5_S8 CREATE_SESSION_REQUEST with dest teid "
TEID_FMT
" unknown, ignore message"
,
csreq
->
teid
);
Logger
::
pgwc_app
().
warn
(
"Received S5_S8 CREATE_SESSION_REQUEST with dest teid "
TEID_FMT
" unknown, ignore message"
,
csreq
->
teid
);
cause_t
cause
=
{.
cause_value
=
CONTEXT_NOT_FOUND
,
.
pce
=
0
,
.
bce
=
0
,
.
cs
=
0
};
send_create_session_response_cause
(
csreq
->
gtpc_tx_id
,
csreq
->
teid
,
csreq
->
r_endpoint
,
cause
);
return
;
return
;
}
}
...
@@ -418,6 +437,8 @@ void pgw_app::handle_itti_msg (std::shared_ptr<itti_s5s8_create_session_request>
...
@@ -418,6 +437,8 @@ void pgw_app::handle_itti_msg (std::shared_ptr<itti_s5s8_create_session_request>
// MME sent request with teid = 0. This is not valid...
// MME sent request with teid = 0. This is not valid...
Logger
::
pgwc_app
().
warn
(
"Received CREATE_SESSION_REQUEST unknown requested APN %s, ignore message"
,
csreq
->
gtp_ies
.
apn
.
access_point_name
.
c_str
());
Logger
::
pgwc_app
().
warn
(
"Received CREATE_SESSION_REQUEST unknown requested APN %s, ignore message"
,
csreq
->
gtp_ies
.
apn
.
access_point_name
.
c_str
());
// TODO send reply
// TODO send reply
cause_t
cause
=
{.
cause_value
=
MISSING_OR_UNKNOWN_APN
,
.
pce
=
0
,
.
bce
=
0
,
.
cs
=
0
};
send_create_session_response_cause
(
csreq
->
gtpc_tx_id
,
csreq
->
teid
,
csreq
->
r_endpoint
,
cause
);
return
;
return
;
}
}
...
...
src/pgwc/pgw_app.hpp
View file @
61a95d7b
...
@@ -92,6 +92,7 @@ public:
...
@@ -92,6 +92,7 @@ public:
pgw_app
(
pgw_app
const
&
)
=
delete
;
pgw_app
(
pgw_app
const
&
)
=
delete
;
void
operator
=
(
pgw_app
const
&
)
=
delete
;
void
operator
=
(
pgw_app
const
&
)
=
delete
;
void
send_create_session_response_cause
(
const
uint64_t
gtpc_tx_id
,
const
teid_t
teid
,
const
endpoint
&
r_endpoint
,
const
cause_t
&
cause
)
const
;
void
send_delete_session_response_cause_request_accepted
(
const
uint64_t
gtpc_tx_id
,
const
teid_t
teid
,
const
endpoint
&
r_endpoint
)
const
;
void
send_delete_session_response_cause_request_accepted
(
const
uint64_t
gtpc_tx_id
,
const
teid_t
teid
,
const
endpoint
&
r_endpoint
)
const
;
void
send_delete_session_response_cause_context_not_found
(
const
uint64_t
gtpc_tx_id
,
const
teid_t
teid
,
const
endpoint
&
r_endpoint
)
const
;
void
send_delete_session_response_cause_context_not_found
(
const
uint64_t
gtpc_tx_id
,
const
teid_t
teid
,
const
endpoint
&
r_endpoint
)
const
;
void
send_modify_bearer_response_cause_context_not_found
(
const
uint64_t
gtpc_tx_id
,
const
teid_t
teid
,
const
endpoint
&
r_endpoint
)
const
;
void
send_modify_bearer_response_cause_context_not_found
(
const
uint64_t
gtpc_tx_id
,
const
teid_t
teid
,
const
endpoint
&
r_endpoint
)
const
;
...
...
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