Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE F-TEID fix #24

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/oai_spgwc/pgwc_procedure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@ int session_establishment_procedure::run(
// pfcp::framed_ipv6_route_t framed_ipv6_route = {};
source_interface.interface_value = pfcp::INTERFACE_VALUE_ACCESS;
local_fteid.ch = 1;
// TS 29.244 R15.05 8.2.3 -> At least one of the V4 and V6 flags shall be set
// to "1", and both may be set to "1" for scenarios
// when the UP function is requested to allocate the F-TEID, i.e. when
// CHOOSE bit is set to "1", and the IPv4 address and IPv6 address fields
// are not present.
local_fteid.v4 = 1;

// local_fteid.chid = 1;
xgpp_conv::paa_to_pfcp_ue_ip_address(
s5_triggered_pending->gtp_ies.paa.second, ue_ip_address);
Expand Down Expand Up @@ -1075,8 +1082,8 @@ void downlink_data_report_procedure::handle_itti_msg(
itti_s5s8_downlink_data_notification_acknowledge& ack) {
::cause_t gtp_cause = {};

pfcp::cause_t pfcp_cause = {.cause_value =
pfcp::CAUSE_VALUE_REQUEST_ACCEPTED};
pfcp::cause_t pfcp_cause = {
.cause_value = pfcp::CAUSE_VALUE_REQUEST_ACCEPTED};
if (ack.gtp_ies.get(gtp_cause)) {
switch (gtp_cause.cause_value) {
case REQUEST_ACCEPTED:
Expand Down
3 changes: 3 additions & 0 deletions src/pfcp/3gpp_29.244.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,9 @@ class pfcp_fteid_ie : public pfcp_ie {
if (u1.bf.v6) {
tlv.add_length(16);
}
}
if (u1.bf.ch & b.v4) {
u1.bf.v4 = b.v4;
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ipv4 and v6 address will be zeroed if not (u1.bf.ch & b.v4) ?

ipv4_address.s_addr = INADDR_ANY;
ipv6_address = in6addr_any;
Expand Down