omec-project / smf

7 stars 29 forks source link

Unable to install custome PCC rules #151

Open RamzahRehmanPAK opened 1 year ago

RamzahRehmanPAK commented 1 year ago

Hello Team,

I am trying to install custom PCC rules via npcf-policyauthorization/v1/app-sessions POST request to PCF.

According to 3GPP specification, the PCF informs SMF about updated rules and then SMF informs UPF about updated rules and UPF then enforces those rules on the data plane.

The URL of the post request: http://\<IP of PCF pod>:29507/npcf-policyauthorization/v1/app-sessions

The JSON request body for the post request is as follows:

{ "ascReqData": { "notifUri": "https://127.0.0.1:12345", "suppFeat":"3", "ueIpv4": "172.250.237.122", "medComponents":{ "1": { "medCompN": 1, "medSubComps": { "1": { "FNum": 1, "FStatus": "DISABLED", "FDescs": ["permit inout ip from any to assigned"] } } } } } }

HTTP Response:

I get 201 Created status when I post the request.

Explanation of the POST request:

I am trying to block any incoming or outgoing traffic to the connected UE.

How to test the functionality:

I check whether my PCC rules are installed correctly by sending ping messages from a connected UE. Even when I add the PCC rules to disable any traffic to/from the UE, the UE is still able to send the ping messages.

What's happening:

I looked into the code for PCF and SMF thoroughly. The request from PCF is sent to SMF. The SMF handles the request in HandleSMPolicyUpdateNotify function. SMF never informs UPF about the updated rules. I see that there's a comment added in the function here to inform UPF but it has not been implemented.

Questions:

  1. Is my understanding correct that the SMF is missing the functionality to inform the UPF about updated rules?
  2. Is there a particular reason this functionality is not implemented yet? Eg, the functionality is relatively complex, would take longer, etc.
  3. Please guide me regarding how I can implement the above-mentioned missing functionality.
onf-bot commented 3 months ago

This issue has been stale for 30 days and will be closed in 5 days. Comment to keep it open.