Skip to content

Add conditional check for interface type in PDI creation #7

Description

@tariromukute

Description:

The N6 PDI (Packet Detection Information) should not include a bogus S1-U interface type. Currently, the source interface type is being set unconditionally, which causes issues when creating PDIs for certain edge types.

Problem:

In src/smf_app/smf_procedure.cpp, the pdi.set(source_interface_type) is called without checking if a valid interface type has been set for the edge. This means the N6 PDI may carry an invalid S1-U interface type.

Solution:

Implement a conditional check using a flag (e.g., have_interface_type) to only set the source interface type in the PDI when it has been explicitly set for valid edge types (N3 3GPP Access and N9).

Suggested Implementation:

bool have_interface_type = false;
if (edge->type == n3_type) {
  // TS 29.244 Table 8.2.118-1: 11 = N3 3GPP Access.
  // 14 (N3 for data forwarding) is for indirect forwarding tunnels only.
  source_interface_type.interface_type_value =
      pfcp::_3GPP_INTERFACE_TYPE_N3_3GPP_ACCESS;
  have_interface_type = true;
} else if (edge->type == n9_type) {
  source_interface_type.interface_type_value = pfcp::_3GPP_INTERFACE_TYPE_N9;
  have_interface_type = true;
}

// Later, when setting PDI:
if (have_interface_type) {
  pdi.set(source_interface_type);
}

File: src/smf_app/smf_procedure.cpp

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions