Skip to content

contrib/pfcp: IE_UE_IP_Address lacks the IPv6D, CHV4, CHV6 and IP6PL flags #5282

Open

Description

@gomaja

Brief description

IE_UE_IP_Address in scapy/contrib/pfcp.py (lines 1548-1559 on master 7a9fde6) models octet 5 of the IE as a 5-bit spare field followed by SD, V4 and V6. 3GPP TS 29.244 assigns bits 4 to 7 of that octet: IPv6D (bit 4), CHV4 (bit 5), CHV6 (bit 6) and IP6PL (bit 7); only bit 8 is spare. The optional octets announced by IPv6D and IP6PL (IPv6 Prefix Delegation Bits and IPv6 Prefix Length) are not decoded either; they end up in extra_data.

CHV4/CHV6 are how a CP function asks the UP function to allocate the UE address, so building or dissecting those requests currently needs spare=2 / spare=4.

Scapy version

2.8.0, and master 7a9fde6

Python version

3.11.2

Operating system

Linux (Debian bookworm container)

Additional environment information

No response

How to reproduce

from scapy.contrib.pfcp import IE_UE_IP_Address

# UE IP Address with only CHV4 set (octet 5 = 0x10)
IE_UE_IP_Address(bytes.fromhex("005d000110")).show()

Actual result

###[ IE UE IP Address ]###
  ietype    = UE IP Address
  length    = 1
  spare     = 0x2
  SD        = 0
  V4        = 0
  V6        = 0
  extra_data= b''

Expected result

Named IPv6D, CHV4, CHV6 and IP6PL bits, with spare reduced to bit 8, and conditional fields for the IPv6 Prefix Delegation Bits (present when IPv6D is 1) and the IPv6 Prefix Length (present when IP6PL is 1) after the IPv6 address, as in Figure 8.2.62-1.

Related resources

3GPP TS 29.244 V20.1.0 (2026-09), clause 8.2.62 "UE IP Address", Figure 8.2.62-1. The same flags are already defined in V16.7.0.

Activity

  1. Shellghostt commented on Nov 12, 2026

    @Shellghostt

    I am working on this. Octet 5 holds spare, IP6PL, CHV6, CHV4, IPv6D, SD, V4 and V6 from bit 8 to bit 1, and the IPv6 prefix delegation bits and the IPv6 prefix length follow the IPv6 address when IPv6D and IP6PL are set, as in Figure 8.2.62-1. I will open a PR with a UTScapy case for the 005d000110 packet from the report and for a packet that carries both optional octets.

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