Skip to content

[lte][agw] Fixing netmask parsing for Ipv6 address#6920

Merged
ardzoht merged 1 commit intomagma:masterfrom
ardzoht:fix_ipv6_config_parse
May 13, 2021
Merged

[lte][agw] Fixing netmask parsing for Ipv6 address#6920
ardzoht merged 1 commit intomagma:masterfrom
ardzoht:fix_ipv6_config_parse

Conversation

@ardzoht
Copy link
Copy Markdown
Contributor

@ardzoht ardzoht commented May 13, 2021

Signed-off-by: Alex Rodriguez [email protected]

Summary

May 12 14:01:08 phy-u5 mme[202957]: Traceback (most recent call last):
May 12 14:01:08 phy-u5 mme[202957]:   File "/usr/local/bin/generate_oai_config.py", line 279, in <module>
May 12 14:01:08 phy-u5 mme[202957]:     main()
May 12 14:01:08 phy-u5 mme[202957]:   File "/usr/local/bin/generate_oai_config.py", line 270, in main
May 12 14:01:08 phy-u5 mme[202957]:     context = _get_context()
May 12 14:01:08 phy-u5 mme[202957]:   File "/usr/local/bin/generate_oai_config.py", line 215, in _get_context
May 12 14:01:08 phy-u5 mme[202957]:     "mme_s11_ip": _get_iface_ip("mme", "s11_iface_name"),
May 12 14:01:08 phy-u5 mme[202957]:   File "/usr/local/bin/generate_oai_config.py", line 44, in _get_iface_ip
May 12 14:01:08 phy-u5 mme[202957]:     return get_ip_from_if_cidr(iface_name)
May 12 14:01:08 phy-u5 mme[202957]:   File "/usr/local/lib/python3.8/dist-packages/magma/common/misc_utils.py", line 168, in get_ip_from_if_cidr
May 12 14:01:08 phy-u5 mme[202957]:     ip, netmask = get_if_ip_with_netmask(iface_name, preference)
May 12 14:01:08 phy-u5 mme[202957]:   File "/usr/local/lib/python3.8/dist-packages/magma/common/misc_utils.py", line 50, in get_if_ip_with_netmask
May 12 14:01:08 phy-u5 mme[202957]:     ip_addresses[netifaces.AF_INET6][0]["netmask"].split("/")[1],
May 12 14:01:08 phy-u5 mme[202957]: IndexError: list index out of range

this PR fixes it.

Test Plan

  • Validated parsing works after change
  • make integ_test

Additional Information

  • This change is backwards-breaking

@ardzoht ardzoht requested review from a team and andreilee May 13, 2021 18:55
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines. label May 13, 2021
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for opening a PR! 💯 Please note that all commits must be signed off. This is enforced by the DCO check.

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

@ardzoht ardzoht requested a review from pshelar May 13, 2021 18:56
@pshelar pshelar added the apply-v1.5 Apply this commit to the v1.5 release branch as well. label May 13, 2021
Copy link
Copy Markdown
Contributor

@pshelar pshelar left a comment

Choose a reason for hiding this comment

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

Thanks.

@codecov
Copy link
Copy Markdown

codecov bot commented May 13, 2021

Codecov Report

Merging #6920 (dbc1217) into master (68b8a61) will increase coverage by 30.55%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #6920       +/-   ##
===========================================
+ Coverage   33.99%   64.55%   +30.55%     
===========================================
  Files        1156      666      -490     
  Lines      103754    45942    -57812     
  Branches     1318     1318               
===========================================
- Hits        35268    29656     -5612     
+ Misses      65108    12908    -52200     
  Partials     3378     3378               
Flag Coverage Δ
c_cpp ?
cloud_lint 65.69% <ø> (ø)
feg-lint 56.55% <ø> (ø)
lte-test 72.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
orc8r/gateway/python/magma/common/misc_utils.py 45.29% <ø> (ø)
...e/gateway/c/oai/tasks/sctp/sctpd_uplink_server.cpp
lte/gateway/c/oai/tasks/sgw/pgw_handlers.c
lte/gateway/c/oai/tasks/nas/emm/sap/emm_fsm.c
lte/gateway/c/oai/tasks/s1ap/s1ap_state.cpp
...te/gateway/c/oai/tasks/mme_app/mme_app_sgs_alert.c
...way/c/oai/tasks/nas/ies/TrackingAreaIdentityList.c
lte/gateway/c/session_manager/ChargingGrant.cpp
...ateway/c/oai/tasks/mme_app/mme_app_sgw_selection.c
lte/gateway/c/oai/tasks/mme_app/mme_app_ha.cpp
... and 481 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68b8a61...dbc1217. Read the comment docs.

@ardzoht ardzoht merged commit 45fba83 into magma:master May 13, 2021
themarwhal pushed a commit that referenced this pull request May 13, 2021
m-trojanowski pushed a commit to openEPC/magma that referenced this pull request Oct 20, 2021
m-trojanowski pushed a commit to openEPC/magma that referenced this pull request Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apply-v1.5 Apply this commit to the v1.5 release branch as well. backported-v1.5 size/XS Denotes a PR that changes 0-9 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants