edgecomllc / eupf

5G User Plane Function (UPF) based on eBPF
Apache License 2.0
95 stars 14 forks source link

Ignore empty SDF Filter field #537

Closed pirog-spb closed 2 months ago

pirog-spb commented 3 months ago

Discussed in https://github.com/edgecomllc/eupf/discussions/535

SDF Filter with no value could be ignored without causing PDR to be ignored as well. That would allow to apply PDRs with such filters.

Originally posted by **howardswe499** March 12, 2024 Hi All, I'm trying to perform integration with Nokia CMU (Nokia's 5G core solution), using eUPF as UPF and UERANSIM as UE+RAN. ... Here are the logs of eUPF: ```root@da-eupf:~/eupf-docker# docker compose up eupf-1 | Session Establishment Request: eupf-1 | CreatePDR ID: 18944 eupf-1 | Outer Header Removal: 1 eupf-1 | FAR ID: 327680 eupf-1 | QER ID: 57 eupf-1 | QER ID: 4117 eupf-1 | URR ID: 1610612737 eupf-1 | Source Interface: 0 eupf-1 | TEID: 0 eupf-1 | Ipv4: eupf-1 | Ipv6: eupf-1 | UE IPv4 Address: 10.246.115.216 eupf-1 | SDF Filter: permit out ip from any to any eupf-1 | CreatePDR ID: 35328 eupf-1 | FAR ID: 537198592 eupf-1 | QER ID: 57 eupf-1 | QER ID: 4117 eupf-1 | URR ID: 1610612737 eupf-1 | Source Interface: 1 eupf-1 | UE IPv4 Address: 10.246.115.216 eupf-1 | SDF Filter: eupf-1 | CreateFAR ID: 327680 eupf-1 | Apply Action: [2] eupf-1 | Forwarding Parameters: eupf-1 | Network Instance: 5gtest1 eupf-1 | CreateFAR ID: 537198592 eupf-1 | Apply Action: [4] eupf-1 | Forwarding Parameters: eupf-1 | Network Instance:n3-realm eupf-1 | BAR ID: 5 eupf-1 | CreateQER ID: 57 eupf-1 | Gate Status DL: 0 eupf-1 | Gate Status UL: 0 eupf-1 | Max Bitrate DL: 5000000 eupf-1 | Max Bitrate UL: 5000000 eupf-1 | CreateQER ID: 4117 eupf-1 | Gate Status DL: 0 eupf-1 | Gate Status UL: 0 eupf-1 | QFI: 5 eupf-1 | CreateURR ID: 1610612737 eupf-1 | Measurement Method: 3 eupf-1 | CreateURR ID: 1073741829 eupf-1 | Measurement Method: 2 eupf-1 | Volume Threshold: &{Flags:1 TotalVolume:104857600 UplinkVolume:0 DownlinkVolume:0} eupf-1 | CreateURR ID: 1073741825 eupf-1 | Measurement Method: 2 eupf-1 | CreateBAR ID: 5 eupf-1 | Downlink Data Notification Delay: 0s eupf-1 | eupf-1 | 2024/03/05 08:35:01 INF WARN: No OuterHeaderCreation eupf-1 | 2024/03/05 08:35:01 INF Saving FAR info to session: 327680, {Action:2 OuterHeaderCreation:0 Teid:0 RemoteIP:0 LocalIP:929474752 TransportLevelMarking:0} eupf-1 | 2024/03/05 08:35:01 DBG EBPF: Put FAR: internalId=3, qerInfo={Action:2 OuterHeaderCreation:0 Teid:0 RemoteIP:0 LocalIP:929474752 TransportLevelMarking:0} eupf-1 | 2024/03/05 08:35:01 INF WARN: No OuterHeaderCreation eupf-1 | 2024/03/05 08:35:01 INF Saving FAR info to session: 537198592, {Action:4 OuterHeaderCreation:0 Teid:0 RemoteIP:0 LocalIP:929474752 TransportLevelMarking:0} eupf-1 | 2024/03/05 08:35:01 DBG EBPF: Put FAR: internalId=4, qerInfo={Action:4 OuterHeaderCreation:0 Teid:0 RemoteIP:0 LocalIP:929474752 TransportLevelMarking:0} eupf-1 | 2024/03/05 08:35:01 INF Saving QER info to session: 57, {GateStatusUL:0 GateStatusDL:0 Qfi:0 MaxBitrateUL:705032704 MaxBitrateDL:705032704 StartUL:0 StartDL:0} eupf-1 | 2024/03/05 08:35:01 DBG EBPF: Put QER: internalId=1, qerInfo={GateStatusUL:0 GateStatusDL:0 Qfi:0 MaxBitrateUL:705032704 MaxBitrateDL:705032704 StartUL:0 StartDL:0} eupf-1 | 2024/03/05 08:35:01 INF Saving QER info to session: 4117, {GateStatusUL:0 GateStatusDL:0 Qfi:5 MaxBitrateUL:0 MaxBitrateDL:0 StartUL:0 StartDL:0} eupf-1 | 2024/03/05 08:35:01 DBG EBPF: Put QER: internalId=2, qerInfo={GateStatusUL:0 GateStatusDL:0 Qfi:5 MaxBitrateUL:0 MaxBitrateDL:0 StartUL:0 StartDL:0} eupf-1 | 2024/03/05 08:35:01 DBG EBPF: Put PDR Uplink: teid=1, pdrInfo={OuterHeaderRemoval:1 FarId:3 QerId:1 SdfFilter:{Protocol:1 SrcAddress:{Type:0 Ip: Mask:} SrcPortRange:{LowerBound:0 UpperBound:65535} DstAddress:{Type:0 Ip: Mask:} DstPortRange:{LowerBound:0 UpperBound:65535}}} eupf-1 | 2024/03/05 08:35:01 ERR SDFFilter err: SDF Filter: bad formatting. Should be compatible with regexp: ^permit out (icmp|ip|tcp|udp|\d+) from (any|[\d.]+|[\da-fA-F:]+)(?:/(\d+))?(?: (\d+|\d+-\d+))? to (assigned|any|[\d.]+|[\da-fA-F:]+)(?:/(\d+))?(?: (\d+|\d+-\d+))?$ eupf-1 | 2024/03/05 08:35:01 ERR error extracting PDR info: SDF Filter: bad formatting. Should be compatible with regexp: ^permit out (icmp|ip|tcp|udp|\d+) from (any|[\d.]+|[\da-fA-F:]+)(?:/(\d+))?(?: (\d+|\d+-\d+))? to (assigned|any|[\d.]+|[\da-fA-F:]+)(?:/(\d+))?(?: (\d+|\d+-\d+))?$ eupf-1 | 2024/03/05 08:35:01 INF Session Establishment Request from 10.246.112.62 accepted. eupf-1 | 2024/03/05 08:35:01 Matched groups: [permit out ip from any to any ip any any ] eupf-1 | 2024/03/05 08:35:01 Matched groups: [] BR Howard