You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added an extra log line before the issue to see it, if you see a correct discovery request gives an error
2024-06-10T13:25:25.789628634+02:00 [INFO][NRF][DISC] Handle NFDiscoveryRequest
2024-06-10T13:25:25.789733796+02:00 [WARN][NRF][DISC] Before the error the string is [{"mcc":"999","mnc":"01"}]
2024-06-10T13:25:25.789782108+02:00 [WARN][NRF][DISC] Unmarshal Error in targetPlmnListtruct: json: cannot unmarshal array into Go value of type models.PlmnId
2024-06-10T13:25:25.791295270+02:00 [INFO][NRF][GIN] | 200 | 172.28.112.214 | GET | /nnrf-disc/v1/nf-instances?target-nf-type=AUSF&requester-nf-type=AMF&service-names=nausf-auth&target-plmn-list=[{"mcc":"999","mnc":"01"}] |
An incorrect request without the [] doesn't show the error
2024-06-10T13:32:16.912941652+02:00 [INFO][NRF][DISC] Handle NFDiscoveryRequest
2024-06-10T13:32:16.913020873+02:00 [WARN][NRF][DISC] Before the error the string is {"mcc":"999","mnc":"01"}
2024-06-10T13:32:16.918108251+02:00 [INFO][NRF][GIN] | 200 | 172.28.112.214 | GET | /nnrf-disc/v1/nf-instances?target-nf-type=AUSF&requester-nf-type=AMF&target-plmn-list={"mcc":"999","mnc":"01"} |
The text was updated successfully, but these errors were encountered:
Thank you for your feedback.
This error will be fixed after the NRF refactor is released.
You can refer to this PR to check on the progress of the refactor.
Hello,
in the file https://github.com/free5gc/nrf/blob/72c93a38cb17930f87901c28f3eb51277ce55d39/internal/sbi/producer/nf_discovery.go#L273C1-L273C47 it handles a discovery that arrives with a target-plmn-list
According to the 3GPP Standard the target-plmn-list is an array of PlmnId but the code doesn't handle correctly the [] of the array
I tested with a curl request after I had registered the NFs,
curl --http2-prior-knowledge -H "User-Agent: SCP" -H "Content-type: application/json" "http://X.Y.Z.W:V/nnrf-disc/v1/nf-instances?target-nf-type=AUSF&requester-nf-type=AMF&target-plmn-list=\[\{\"mcc\":\"999\",\"mnc\":\"01\"\}\]"
I added an extra log line before the issue to see it, if you see a correct discovery request gives an error
2024-06-10T13:25:25.789628634+02:00 [INFO][NRF][DISC] Handle NFDiscoveryRequest
2024-06-10T13:25:25.789733796+02:00 [WARN][NRF][DISC] Before the error the string is [{"mcc":"999","mnc":"01"}]
2024-06-10T13:25:25.789782108+02:00 [WARN][NRF][DISC] Unmarshal Error in targetPlmnListtruct: json: cannot unmarshal array into Go value of type models.PlmnId
2024-06-10T13:25:25.791295270+02:00 [INFO][NRF][GIN] | 200 | 172.28.112.214 | GET | /nnrf-disc/v1/nf-instances?target-nf-type=AUSF&requester-nf-type=AMF&service-names=nausf-auth&target-plmn-list=[{"mcc":"999","mnc":"01"}] |
An incorrect request without the [] doesn't show the error
curl --http2-prior-knowledge -H "User-Agent: SCP" -H "Content-type: application/json" "http://X.Y.Z.W:V/nnrf-disc/v1/nf-instances?target-nf-type=AUSF&requester-nf-type=AMF&target-plmn-list=\{\"mcc\":\"999\",\"mnc\":\"01\"\}"
2024-06-10T13:32:16.912941652+02:00 [INFO][NRF][DISC] Handle NFDiscoveryRequest
2024-06-10T13:32:16.913020873+02:00 [WARN][NRF][DISC] Before the error the string is {"mcc":"999","mnc":"01"}
2024-06-10T13:32:16.918108251+02:00 [INFO][NRF][GIN] | 200 | 172.28.112.214 | GET | /nnrf-disc/v1/nf-instances?target-nf-type=AUSF&requester-nf-type=AMF&target-plmn-list={"mcc":"999","mnc":"01"} |
The text was updated successfully, but these errors were encountered: