Skip to content

feat(feg): Add ulr command to s6a_cli#15277

Merged
panyogesh merged 1 commit intomagma:masterfrom
rogerpueyo:master_feg_s6a_cli_ulr
Aug 23, 2023
Merged

feat(feg): Add ulr command to s6a_cli#15277
panyogesh merged 1 commit intomagma:masterfrom
rogerpueyo:master_feg_s6a_cli_ulr

Conversation

@rogerpueyo
Copy link
Copy Markdown
Contributor

@rogerpueyo rogerpueyo commented Aug 2, 2023

Summary

The patch adds a new command, ulr, to the s6a_cli tool. It allows issuing an Update Location Request (ULR) to an HSS, and parse the received Update Location Answer (ULA).

Originally, the s6a_cli tool only had the air command, to issue an Authentication Information Request (AIR). The newly added ulr command comes handy to test an HSS for it to be properly working.

Test Plan

Sample of the air and ulr commands for s6a_cli executed in a Magma FeG connecting to an external Open5GS HSS:

vagrant@brave-gs41-magma-v1p8pp-feg-local-mno:~/magma/feg/gateway/docker$ docker compose exec s6a_proxy /var/opt/magma/bin/s6a_cli air 001010000036480
WARN[0000] The "USE_GY_FOR_AUTH_ONLY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "GY_SUPPORTED_VENDOR_IDS" variable is not set. Defaulting to a blank string. 
WARN[0000] The "GY_SERVICE_CONTEXT_ID" variable is not set. Defaulting to a blank string. 
WARN[0000] The "DISABLE_REQUESTED_SERVICE_UNIT_AVP" variable is not set. Defaulting to a blank string. 
Using IMSI: 1010000036480; MCC: 101; MNC: 000; PLMN ID: [1 1 0]
Using local S6a_proxy
Start sending requests 1
Sending AIR to 127.0.0.1:9098:
{
 "userName": "001010000036480",
 "visitedPlmn": "AQEA",
 "numRequestedEutranVectors": 3,
 "immediateResponsePreferred": true,
 "resyncInfo": null,
 "numRequestedUtranGeranVectors": 0,
 "utranGeranResyncInfo": null,
 "featureListId2": null
}
&protos.AuthenticationInformationRequest{state:impl.MessageState{NoUnkeyedLiterals:pragma.NoUnkeyedLiterals{}, DoNotCompare:pragma.DoNotCompare{}, DoNotCopy:pragma.DoNotCopy{}, atomicMessageInfo:(*impl.MessageInfo)(0xc000330000)}, sizeCache:0, unknownFields:[]uint8(nil), UserName:"001010000036480", VisitedPlmn:[]uint8{0x1, 0x1, 0x0}, NumRequestedEutranVectors:0x3, ImmediateResponsePreferred:true, ResyncInfo:[]uint8(nil), NumRequestedUtranGeranVectors:0x0, UtranGeranResyncInfo:[]uint8(nil), FeatureListId_2:(*protos.FeatureListId2)(nil)}

Received AIA:
{
 "errorCode": "UNDEFINED",
 "eutranVectors": [
  {
   "rand": "C/X1jOYnJjjOkWLnpNNsnQ==",
   "xres": "kSKS+zoHHug=",
   "autn": "UQ0WRKUKgADH1w88AsloCA==",
   "kasme": "UYsiCtFPZ8UtoIlwFR345p3v2JZpqeE8o4l2O9h8DFc="
  }
 ],
 "utranVectors": [
 ],
 "geranVectors": [
 ]
}
eutran_vectors:{rand:"\x0b\xf5\xf5\x8c\xe6'&8Αb\xe7\xa4\xd3l\x9d"  xres:"\x91\"\x92\xfb:\x07\x1e\xe8"  autn:"Q\r\x16D\xa5\n\x80\x00\xc7\xd7\x0f<\x02\xc9h\x08"  kasme:"Q\x8b\"\n\xd1Og\xc5-\xa0\x89p\x15\x1d\xf8\xe6\x9d\xefؖi\xa9\xe1<\xa3\x89v;\xd8|\x0cW"}
2023/08/02 11:24:25 
All request (1) got a response
vagrant@brave-gs41-magma-v1p8pp-feg-local-operator:~/magma/feg/gateway/docker$ docker compose exec s6a_proxy /var/opt/magma/bin/s6a_cli ulr 001010000036480
WARN[0000] The "GY_SUPPORTED_VENDOR_IDS" variable is not set. Defaulting to a blank string. 
WARN[0000] The "GY_SERVICE_CONTEXT_ID" variable is not set. Defaulting to a blank string. 
WARN[0000] The "DISABLE_REQUESTED_SERVICE_UNIT_AVP" variable is not set. Defaulting to a blank string. 
WARN[0000] The "USE_GY_FOR_AUTH_ONLY" variable is not set. Defaulting to a blank string. 
Using IMSI: 1010000036480; MCC: 101; MNC: 000; PLMN ID: [1 1 0]
Using local S6a_proxy
Start sending requests to 1
Sending ULR to 127.0.0.1:9098:
{
 "userName": "001010000036480",
 "visitedPlmn": "AQEA",
 "skipSubscriberData": false,
 "initialAttach": true,
 "dualRegistration5gIndicator": true,
 "featureListId2": null,
 "featureListId1": null
}
&protos.UpdateLocationRequest{state:impl.MessageState{NoUnkeyedLiterals:pragma.NoUnkeyedLiterals{}, DoNotCompare:pragma.DoNotCompare{}, DoNotCopy:pragma.DoNotCopy{}, atomicMessageInfo:(*impl.MessageInfo)(0xc0003ce290)}, sizeCache:0, unknownFields:[]uint8(nil), UserName:"001010000036480", VisitedPlmn:[]uint8{0x1, 0x1, 0x0}, SkipSubscriberData:false, InitialAttach:true, DualRegistration_5GIndicator:true, FeatureListId_2:(*protos.FeatureListId2)(nil), FeatureListId_1:(*protos.FeatureListId1)(nil)}

Received ULR:
{
 "errorCode": "UNDEFINED",
 "defaultContextId": 1,
 "totalAmbr": {
  "maxBandwidthUl": 1073741824,
  "maxBandwidthDl": 1073741824,
  "unit": "BPS"
 },
 "allApnsIncluded": true,
 "apn": [
  {
   "contextId": 1,
   "serviceSelection": "internet",
   "qosProfile": {
    "classId": 5,
    "priorityLevel": 1,
    "preemptionCapability": true,
    "preemptionVulnerability": true
   },
   "ambr": {
    "maxBandwidthUl": 524288,
    "maxBandwidthDl": 2097152,
    "unit": "BPS"
   },
   "pdn": "IPV4",
   "chargingCharacteristics": "",
   "servedPartyIpAddress": [
   ],
   "resource": null
  },
  {
   "contextId": 2,
   "serviceSelection": "volte",
   "qosProfile": {
    "classId": 65,
    "priorityLevel": 9,
    "preemptionCapability": false,
    "preemptionVulnerability": false
   },
   "ambr": {
    "maxBandwidthUl": 1073741824,
    "maxBandwidthDl": 1073741824,
    "unit": "BPS"
   },
   "pdn": "IPV6",
   "chargingCharacteristics": "",
   "servedPartyIpAddress": [
   ],
   "resource": null
  }
 ],
 "defaultChargingCharacteristics": "",
 "msisdn": null,
 "networkAccessMode": "PACKET_AND_CIRCUIT",
 "regionalSubscriptionZoneCode": [
 ],
 "featureListId2": null,
 "featureListId1": null
}
default_context_id:1  total_ambr:{max_bandwidth_ul:1073741824  max_bandwidth_dl:1073741824}  all_apns_included:true  apn:{context_id:1  service_selection:"internet"  qos_profile:{class_id:5  priority_level:1  preemption_capability:true  preemption_vulnerability:true}  ambr:{max_bandwidth_ul:524288  max_bandwidth_dl:2097152}}  apn:{context_id:2  service_selection:"volte"  qos_profile:{class_id:65  priority_level:9}  ambr:{max_bandwidth_ul:1073741824  max_bandwidth_dl:1073741824}  pdn:IPV6}
2023/08/02 11:24:33 
All request (1) got a response

Additional Information

  • This change is backwards-breaking
  • This change can be back ported to Magma v1.8.

Security Considerations

N/A

Authors

@mfuentesg2021 Miguel Fuentes [email protected]
@rogerpueyo Roger Pueyo Centelles [email protected]

@rogerpueyo rogerpueyo requested a review from a team as a code owner August 2, 2023 11:32
@rogerpueyo rogerpueyo requested a review from pshelar August 2, 2023 11:32
@pull-request-size pull-request-size bot added the size/L Denotes a Pull Request that changes 100-499 lines. label Aug 2, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 2, 2023

Thanks for opening a PR! 💯

A couple initial guidelines

Howto

  • Reviews. The "Reviewers" listed for this PR are the Magma maintainers who will shepherd it.
  • Checks. All required CI checks must pass before merge.
  • Merge. Once approved and passing CI checks, use the ready2merge label to indicate the maintainers can merge your PR.

More info

Please take a moment to read through the Magma project's

If this is your first Magma PR, also consider reading

@github-actions github-actions bot added the component: feg FEG-gateway related issues label Aug 2, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 2, 2023

✔️ The Semantic PR check ended with status success. See instructions on formatting your commit and pull request titles.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 2, 2023

DP Lint & Test

0 tests   0 ✔️  0s ⏱️
0 suites  0 💤
0 files    0

Results for commit af7a730.

♻️ This comment has been updated with latest results.

@rogerpueyo rogerpueyo force-pushed the master_feg_s6a_cli_ulr branch from 5837d9e to 9aa0556 Compare August 2, 2023 11:34
@rogerpueyo rogerpueyo changed the title [feg] Add ulr command to s6a_cli feat(feg) Add ulr command to s6a_cli Aug 2, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 2, 2023

FeG Lint & Test

    2 files  203 suites   39s ⏱️
374 tests 374 ✔️ 0 💤 0
388 runs  388 ✔️ 0 💤 0

Results for commit af7a730.

♻️ This comment has been updated with latest results.

@rogerpueyo rogerpueyo force-pushed the master_feg_s6a_cli_ulr branch 4 times, most recently from dbc43b2 to 5d475df Compare August 2, 2023 13:38
@rogerpueyo rogerpueyo changed the title feat(feg) Add ulr command to s6a_cli feat(feg): Add ulr command to s6a_cli Aug 2, 2023
@rogerpueyo rogerpueyo force-pushed the master_feg_s6a_cli_ulr branch from 5d475df to 5c77a2a Compare August 2, 2023 14:57
Copy link
Copy Markdown
Contributor

@panyogesh panyogesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The ulr command allows the s6a_cli to issue an Update Location Request
(ULR) to an HSS, and parse the received Update Location Answer (ULA).

Signed-off-by: Miguel Fuentes <[email protected]>
Reviewed-by: Roger Pueyo Centelles <[email protected]>
@rogerpueyo rogerpueyo force-pushed the master_feg_s6a_cli_ulr branch from 5c77a2a to af7a730 Compare August 22, 2023 18:35
@panyogesh panyogesh merged commit 4d667c0 into magma:master Aug 23, 2023
lucasgonze pushed a commit to lucasgonze/magma that referenced this pull request Feb 29, 2024
The ulr command allows the s6a_cli to issue an Update Location Request
(ULR) to an HSS, and parse the received Update Location Answer (ULA).


Reviewed-by: Roger Pueyo Centelles <[email protected]>

Signed-off-by: Miguel Fuentes <[email protected]>
Co-authored-by: Miguel Fuentes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: feg FEG-gateway related issues size/L Denotes a Pull Request that changes 100-499 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants