Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modem-manager-autosetup: Use optional mvno_match_data for APN selection #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ktetzlaff
Copy link

@ktetzlaff ktetzlaff commented Apr 7, 2024

Note: This PR builds on #2.

In case that there are multiple APN definitions for the given combination of mnc, nmc (and type) and an mvno_match_data attribute of type imsi exists, the mvno_match_data can be used to select the correct APN from a set of otherwise equivalent ones.

This PR adds an additional step which uses mvno_match_data to improve the APN selection process.

This addresses the 2nd part of gitlab.nic.cz issue 951.

@ktetzlaff ktetzlaff force-pushed the 951-1-feat-use-mvno-match-data-to-improve-apn-info-selection branch from 37d1eb3 to b40a446 Compare April 7, 2024 23:48
The initial jq filter used to extract the APN info from apns-conf.json
fails with:

``` text
jq: error (...): null (null) and string ("default") cannot have their containment checked
```
when one of the apn objects selected by mcc/mnc doesn't have a
'type' attribute (as is the case for mcc=262, mnc=07). As a result,
otherwise matching APN objects will not be considered.

This commit fixes the jq filter by checking for the presence of
the 'type' attribute.
In case that there are multiple APN definitions for the given
combination of 'mnc', 'nmc' (and 'type') and an 'mvno_match_data'
attribute of type 'imsi' exists, the 'mvno_match_data' can be used to
select the correct APN from a set of otherwise equivalent ones.

This commit adds an additional step which uses 'mvno_match_data' to
improve the APN selection process.
@ktetzlaff ktetzlaff force-pushed the 951-1-feat-use-mvno-match-data-to-improve-apn-info-selection branch from b40a446 to 7a91d59 Compare April 8, 2024 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant