diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index dda692afd86b..3e8a5b3f7020 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -12,7 +12,7 @@ ################################################################ # Devcontainer Image (for local development and CI) ################################################################ -FROM ghcr.io/magma/magma/bazel-base:latest as devcontainer +FROM ghcr.io/magma/magma/bazel-base:latest AS devcontainer # [Option] Install zsh ARG INSTALL_ZSH="true" @@ -76,7 +76,8 @@ RUN echo "Install general purpose packages" && \ ruby-dev \ software-properties-common \ tzdata \ - virtualenv=20.0.17-1ubuntu0.4 && \ + virtualenv=20.0.17-1ubuntu0.4 +RUN gem install dotenv -v 2.8.1 && \ gem install fpm # Install golang diff --git a/.devcontainer/bazel-base/Dockerfile b/.devcontainer/bazel-base/Dockerfile index 77b0da9fd6c6..12c7e8c2b9b9 100644 --- a/.devcontainer/bazel-base/Dockerfile +++ b/.devcontainer/bazel-base/Dockerfile @@ -12,7 +12,7 @@ ################################################################ # Builder Image (can also be used as developer's image) ################################################################ -FROM ubuntu:focal as bazel_builder +FROM ubuntu:focal AS bazel_builder ARG DEB_PORT=amd64 diff --git a/.devcontainer/post-create-commands.sh b/.devcontainer/post-create-commands.sh index 485dc210f546..f042d7e56149 100755 --- a/.devcontainer/post-create-commands.sh +++ b/.devcontainer/post-create-commands.sh @@ -1,12 +1,16 @@ #!/bin/bash - # $1: should be containerWorkspaceFolder from https://code.visualstudio.com/docs/remote/devcontainerjson-reference +if [ "$1" != "$MAGMA_ROOT" ] +then + sudo rm -rf "$MAGMA_ROOT" + sudo ln -s "$1" "$MAGMA_ROOT" +fi -sudo ln -s "$1"/lte/gateway/configs /etc/magma +sudo ln -s "$MAGMA_ROOT"/lte/gateway/configs /etc/magma echo "alias magtivate='source /home/vscode/build/python/bin/activate'" >> ~/.bashrc echo "Generating compile_commands.json for C/C++ code navigation" -"$1"/dev_tools/gen_compilation_database.py +"$MAGMA_ROOT"/dev_tools/gen_compilation_database.py echo "Setting up Bazel Bash completion" -"$1"/bazel/scripts/setup_bazel_bash_completion.sh $(cat "$1"/.bazelversion) +"$MAGMA_ROOT"/bazel/scripts/setup_bazel_bash_completion.sh $(cat "$MAGMA_ROOT"/.bazelversion) diff --git a/.github/workflows/agw-build-publish-container.yml b/.github/workflows/agw-build-publish-container.yml index cfe02ac0185a..23a3c37c3575 100644 --- a/.github/workflows/agw-build-publish-container.yml +++ b/.github/workflows/agw-build-publish-container.yml @@ -93,6 +93,7 @@ jobs: run: | c_image=${{ steps.set-registry.outputs.registry }}/${{ steps.set-registry.outputs.image_prefix }}agw_gateway_c python_image=${{ steps.set-registry.outputs.registry }}/${{ steps.set-registry.outputs.image_prefix }}agw_gateway_python + ovs_image=${{ steps.set-registry.outputs.registry }}/${{ steps.set-registry.outputs.image_prefix }}agw_gateway_ovs go_image=${{ steps.set-registry.outputs.registry }}/${{ steps.set-registry.outputs.image_prefix }}gateway_go echo image_tag=${commit_hash} >> $GITHUB_OUTPUT @@ -100,10 +101,12 @@ jobs: then echo c_image_tags=${c_image}:${commit_hash},${c_image}:latest >> $GITHUB_OUTPUT echo python_image_tags=${python_image}:${commit_hash},${python_image}:latest >> $GITHUB_OUTPUT + echo ovs_image_tags=${ovs_image}:${commit_hash},${ovs_image}:latest >> $GITHUB_OUTPUT echo go_image_tags=${go_image}:${commit_hash},${go_image}:latest >> $GITHUB_OUTPUT else echo c_image_tags=${c_image}:${commit_hash} >> $GITHUB_OUTPUT echo python_image_tags=${python_image}:${commit_hash} >> $GITHUB_OUTPUT + echo ovs_image_tags=${ovs_image}:${commit_hash} >> $GITHUB_OUTPUT echo go_image_tags=${go_image}:${commit_hash} >> $GITHUB_OUTPUT fi @@ -111,6 +114,7 @@ jobs: run: | echo "C image: ${{ steps.set-agwc-tags.outputs.c_image_tags }}" echo "Python image: ${{ steps.set-agwc-tags.outputs.python_image_tags }}" + echo "OVS image: ${{ steps.set-agwc-tags.outputs.ovs_image_tags }}" echo "Go image: ${{ steps.set-agwc-tags.outputs.go_image_tags }}" - uses: ./.github/workflows/composite/docker-builder-agw @@ -134,6 +138,16 @@ jobs: TAGS: ${{ steps.set-agwc-tags.outputs.python_image_tags }} TARGET: gateway_python - run: echo "docker-builder-python conclusion = ${{ steps.docker-builder-python.conclusion }}" + - uses: ./.github/workflows/composite/docker-builder-agw + id: docker-builder-ovs + with: + REGISTRY_USERNAME: ${{ secrets.LF_JFROG_USERNAME }} + REGISTRY_PASSWORD: ${{ secrets.LF_JFROG_PASSWORD }} + REGISTRY: ${{ env.registry }} + FILE: lte/gateway/docker/services/openvswitch/Dockerfile + TAGS: ${{ steps.set-agwc-tags.outputs.ovs_image_tags }} + TARGET: gateway_ovs + - run: echo "docker-builder-ovs conclusion = ${{ steps.docker-builder-ovs.conclusion }}" - uses: ./.github/workflows/composite/docker-builder-agw id: docker-builder-go @@ -233,35 +247,35 @@ jobs: run: mkdir -p lte/gateway/test_results - name: Download test results of precommit tests - uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # pin@v3.0.1 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # pin@v4 with: name: test_results_precommit path: "${{ github.workspace }}/lte/gateway/test_results" - name: Download final status of precommit tests - uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # pin@v3.0.1 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # pin@v4 with: name: test-status-precommit - name: Download test results of extended tests - uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # pin@v3.0.1 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # pin@v4 with: name: test_results_extended_tests path: "${{ github.workspace }}/lte/gateway/test_results" - name: Download final status of of extended tests - uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # pin@v3.0.1 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # pin@v4 with: name: test-status-extended_tests - name: Download test results of long extended tests - uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # pin@v3.0.1 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # pin@v4 with: name: test_results_extended_tests_long path: "${{ github.workspace }}/lte/gateway/test_results" - name: Download final status of of long extended tests - uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # pin@v3.0.1 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # pin@v4 with: name: test-status-extended_tests_long diff --git a/.github/workflows/agw-coverage.yml b/.github/workflows/agw-coverage.yml index 187c71f4e0ad..c992b2168b59 100644 --- a/.github/workflows/agw-coverage.yml +++ b/.github/workflows/agw-coverage.yml @@ -94,7 +94,7 @@ jobs: with: flags: c_cpp - name: Publish bazel profile - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: | always() && github.repository_owner == 'magma' && @@ -163,7 +163,7 @@ jobs: with: flags: lte-test - name: Publish bazel profile - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: | always() && github.repository_owner == 'magma' && diff --git a/.github/workflows/agw-workflow.yml b/.github/workflows/agw-workflow.yml index 9473acc3d941..9726e1d49221 100644 --- a/.github/workflows/agw-workflow.yml +++ b/.github/workflows/agw-workflow.yml @@ -57,21 +57,21 @@ jobs: if: ${{ needs.path_filter.outputs.should_not_skip == 'true' }} runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v3.1.0 + - uses: actions/checkout@v2 # pin@v0.18.1 - name: Check clang-format for orc8r/gateway/c - uses: DoozyX/clang-format-lint-action@9ea72631b74e61ce337d0839a90e76180e997283 # pin@v0.13 + uses: DoozyX/clang-format-lint-action@c71d0bf4e21876ebec3e5647491186f8797fde31 # pin@0.18.2 with: source: 'orc8r/gateway/c' extensions: 'h,hpp,c,cpp' - clangFormatVersion: 11.1.0 + clangFormatVersion: 18 # taken from .clang-format style: file - name: Check clang-format for lte/gateway - uses: DoozyX/clang-format-lint-action@9ea72631b74e61ce337d0839a90e76180e997283 # pin@v0.13 + uses: DoozyX/clang-format-lint-action@v0.18.1 with: source: 'lte/gateway/c lte/gateway/python' extensions: 'h,hpp,c,cpp' - clangFormatVersion: 11.1.0 + clangFormatVersion: 18 # taken from .clang-format style: file diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index 503503e066db..314580d8dc59 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -118,6 +118,7 @@ jobs: # Required for bazel-diff to perform git checkout. git config --global --add safe.directory /workspaces/magma + git config --global --add safe.directory /workspaces/magma/.git printf '\r%s\r' '###############################' 1>&2 printf '\r%s\r' 'Bazel-diff.' 1>&2 @@ -330,13 +331,13 @@ jobs: mkdir -p lte/gateway/test_results/ python3 lte/gateway/python/scripts/runtime_report.py -i "[^\/]+\.xml" -w "bazel_unit_test_results" -o "lte/gateway/test_results/merged_unit_test_reports.xml" - name: Publish bazel test profile - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: ${{ always() && github.event.inputs.publish_bazel_profile == 'true' }} with: name: Bazel test all profile ${{ matrix.bazel-config }} path: Bazel_test_all_profile - name: Upload Bazel unit-test results ${{ matrix.bazel-config }} - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: name: Bazel unit-test results ${{ matrix.bazel-config }} @@ -590,7 +591,7 @@ jobs: mv ./bazel-bin/lte/gateway/c/session_manager/sessiond ./sentry_services/sessiond - name: Upload services for sentry_release job - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: | github.repository_owner == 'magma' && ( github.ref_name == 'master' || startsWith(github.ref_name, 'v1.') ) @@ -662,7 +663,7 @@ jobs: COMMIT_MESSAGE: ${{ toJSON(github.event.head_commit.message) }} - name: Publish bazel profile - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: | always() && github.event.inputs.publish_bazel_profile == 'true' @@ -701,7 +702,7 @@ jobs: with: fetch-depth: 0 - run: mkdir sentry_services - - uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # pin@v3.0.1 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # pin@v4 with: name: sentry_services path: sentry_services diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 3c74cb1504c7..c15136a46a32 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -60,7 +60,7 @@ jobs: orc8r/tools/helm/package.sh --deployment-type all fi - name: Upload charts as artifacts - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: github.event_name == 'pull_request' with: name: helm-charts @@ -72,9 +72,9 @@ jobs: mkdir -p ./pr echo ${{ github.event.number }} > ./pr/pr_number echo "false" > ./pr/skipped - - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 with: - name: pr + name: jobs pr path: pr/ # Notify ci channel when failing # Plugin info: https://github.com/marketplace/actions/slack-notify @@ -260,9 +260,9 @@ jobs: run: | mkdir -p ./pr echo ${{ github.event.number }} > ./pr/pr_number - - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 with: - name: pr + name: deploy pr path: pr/ - name: Create release Tag if: github.event_name == 'push' @@ -331,9 +331,9 @@ jobs: run: | mkdir -p ./pr echo ${{ github.event.number }} > ./pr/pr_number - - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 with: - name: pr + name: operator pr path: pr/ - name: Create release Tag if: github.event_name == 'push' diff --git a/.github/workflows/cloud-workflow.yml b/.github/workflows/cloud-workflow.yml index e0903a89615c..298d3c763db8 100644 --- a/.github/workflows/cloud-workflow.yml +++ b/.github/workflows/cloud-workflow.yml @@ -57,7 +57,7 @@ jobs: run: | mkdir -p ./pr echo -n ${{ steps.changes.outputs.filesChanged == 'false' }} > ./pr/skipped - - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: name: pr @@ -111,7 +111,7 @@ jobs: timeout-minutes: 15 - name: Upload Test Results if: always() - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 with: name: Unit Test Results path: "${{ env.MAGMA_ROOT}}/orc8r/cloud/test-results/*" @@ -119,7 +119,7 @@ jobs: if: always() id: gateway_test_init with: - go-version: '1.20.1' + go-version: '1.21.12' - name: Download dependencies if: always() && steps.gateway_test_init.outcome=='success' id: gateway_test_dep diff --git a/.github/workflows/composite/dp-integ-tests/action.yml b/.github/workflows/composite/dp-integ-tests/action.yml index 524cbf4de09c..7eb61157af94 100644 --- a/.github/workflows/composite/dp-integ-tests/action.yml +++ b/.github/workflows/composite/dp-integ-tests/action.yml @@ -76,7 +76,7 @@ runs: - name: Upload integration test results if: always() - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 with: name: ${{ inputs.make_tests_target }}-results path: ${{ inputs.test_dir }} diff --git a/.github/workflows/cwf-integ-test.yml b/.github/workflows/cwf-integ-test.yml index 2b91c578afe4..b0dd897322fa 100644 --- a/.github/workflows/cwf-integ-test.yml +++ b/.github/workflows/cwf-integ-test.yml @@ -44,7 +44,7 @@ jobs: docker save cwf_cwag_go:latest | gzip > cwf_cwag_go.tar.gz docker save cwf_gateway_go:latest | gzip > cwf_gateway_go.tar.gz docker save cwf_gateway_pipelined:latest | gzip > cwf_gateway_pipelined.tar.gz - - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 with: name: docker-images path: images @@ -107,7 +107,7 @@ jobs: pip3 install --upgrade pip pip3 install ansible fabric jsonpickle requests PyYAML firebase_admin sudo apt install virtualbox - - uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # pin@v3.0.1 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # pin@v4 with: name: docker-images - uses: geekyeggo/delete-artifact@54ab544f12cdb7b71613a16a2b5a37a9ade990af # pin@v2.0.0 @@ -134,7 +134,7 @@ jobs: fab integ-test --destroy-vm --transfer-images --test-result-xml=tests.xml --rerun-fails=3 --skip-docker-load --tar-path="/tmp/cwf-images" - name: Upload test results if: always() - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 with: name: test-results path: cwf/gateway/tests.xml @@ -154,7 +154,7 @@ jobs: cp *.log logs/ - name: Upload logs if: always() - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 with: name: test-logs path: cwf/gateway/logs diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index 837fd5eb4177..78adfc047ae7 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -49,10 +49,10 @@ jobs: mkdir -p ./pr echo -n ${{ steps.reverted_pr_check.outputs.is_reverted_pr }} > ./pr/is_reverted_pr echo -n "false" > ./pr/skipped - - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: - name: pr + name: reverted check pr path: pr/ dco_check_job: @@ -66,7 +66,7 @@ jobs: uses: tim-actions/get-pr-commits@c64db31d359214d244884dd68f971a110b29ab83 # pin@master with: token: ${{ secrets.GITHUB_TOKEN }} - - name: DCO Check + - name: Perform DCO Check uses: tim-actions/dco@f2279e6e62d5a7d9115b0cb8e837b777b1b02e21 # pin@master with: commits: ${{ steps.get-pr-commits.outputs.commits }} @@ -76,8 +76,8 @@ jobs: run: | mkdir -p ./pr echo -n ${{ github.event.number }} > ./pr/pr_number - - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: - name: pr + name: dco check job pr path: pr/ diff --git a/.github/workflows/docs-workflow.yml b/.github/workflows/docs-workflow.yml index 1b3ffabe3096..211b8c357b93 100644 --- a/.github/workflows/docs-workflow.yml +++ b/.github/workflows/docs-workflow.yml @@ -52,7 +52,7 @@ jobs: echo -n ${{ github.event.number }} > ./pr/pr_number echo -n ${{ steps.changes.outputs.filesChanged == 'false' }} > ./pr/skipped echo -n "false" > ./pr/is_reverted_pr - - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: name: pr diff --git a/.github/workflows/dp-workflow.yml b/.github/workflows/dp-workflow.yml index dbfa9711641f..577018470f2f 100644 --- a/.github/workflows/dp-workflow.yml +++ b/.github/workflows/dp-workflow.yml @@ -83,7 +83,7 @@ jobs: run: | mkdir -p ./pr echo -n ${{ steps.filter.outputs.integration_tests == 'false' }} > ./pr/skipped - - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: name: pr @@ -160,7 +160,9 @@ jobs: working-directory: "${{ github.workspace }}" run: | sudo cp keys/linux_foundation_registry_key.asc /etc/apt/trusted.gpg.d/magma.asc - sudo add-apt-repository 'deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main' + #[TODO_GPG_KEY_WORKAROUND]Temporary steps to be removed once GPG public key issue has been fixed. + #sudo add-apt-repository 'deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main' + echo "deb [trusted=yes] https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" | sudo tee /etc/apt/sources.list.d/magma.list > /dev/null sudo apt-get update -y sudo apt-get install -y python3-aioeventlet sudo rm -rf /var/lib/apt/lists/* diff --git a/.github/workflows/federated-integ-test.yml b/.github/workflows/federated-integ-test.yml index 85a72a7c641e..e7b578d526ca 100644 --- a/.github/workflows/federated-integ-test.yml +++ b/.github/workflows/federated-integ-test.yml @@ -43,7 +43,7 @@ jobs: docker save orc8r_controller:latest | gzip > fed_orc8r_controller.tar.gz docker save orc8r_fluentd:latest | gzip > fed_orc8r_fluentd.tar.gz docker save orc8r_test:latest | gzip > fed_orc8r_test.tar.gz - - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 with: name: docker-build-orc8r-images path: images @@ -70,7 +70,7 @@ jobs: cd images docker save feg_gateway_go:latest | gzip > fed_feg_gateway_go.tar.gz docker save feg_gateway_python:latest | gzip > fed_feg_gateway_python.tar.gz - - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 with: name: docker-build-feg-images path: images @@ -154,11 +154,11 @@ jobs: [ -f ~/.ssh/id_rsa.pub ] || ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa -q fab install-agw # Download to local and delete artifacts from remote - - uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # pin@v3.0.1 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # pin@v4 with: name: docker-build-orc8r-images path: ${{ env.AGW_ROOT }} - - uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # pin@v3.0.1 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # pin@v4 with: name: docker-build-feg-images path: ${{ env.AGW_ROOT }} @@ -191,7 +191,7 @@ jobs: fab get-test-summaries --integration-tests ls -R - name: Upload test results - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: name: test_results @@ -202,7 +202,7 @@ jobs: cd lte/gateway fab get-test-logs --gateway-host-name=magma_deb --dst-path=./logs.tar.gz - name: Upload test logs - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: name: test-logs diff --git a/.github/workflows/feg-workflow.yml b/.github/workflows/feg-workflow.yml index 2fd817eb0e7e..bfe2ca87f0b1 100644 --- a/.github/workflows/feg-workflow.yml +++ b/.github/workflows/feg-workflow.yml @@ -50,7 +50,7 @@ jobs: run: | mkdir -p ./pr echo -n ${{ steps.changes.outputs.filesChanged == 'false' }} > ./pr/skipped - - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: name: pr @@ -102,7 +102,7 @@ jobs: - name: Upload Test Results id: feg-precommit-upload if: always() - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 with: name: Unit Test Results path: "/tmp/test-results" diff --git a/.github/workflows/lte-integ-test-bazel-magma-deb.yml b/.github/workflows/lte-integ-test-bazel-magma-deb.yml index 0abf050a6178..a46ddf565a5d 100644 --- a/.github/workflows/lte-integ-test-bazel-magma-deb.yml +++ b/.github/workflows/lte-integ-test-bazel-magma-deb.yml @@ -90,7 +90,7 @@ jobs: fab get-test-summaries --integration-tests ls -R - name: Upload test results - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: name: test_results @@ -109,7 +109,7 @@ jobs: cd lte/gateway fab get-test-logs --gateway-host-name=magma_deb --dst-path=./logs.tar.gz - name: Upload test logs - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: name: test-logs diff --git a/.github/workflows/lte-integ-test-containerized.yml b/.github/workflows/lte-integ-test-containerized.yml index d0bb42f45aa5..6417abddd6b7 100644 --- a/.github/workflows/lte-integ-test-containerized.yml +++ b/.github/workflows/lte-integ-test-containerized.yml @@ -135,13 +135,13 @@ jobs: echo fail > test_status_${{ inputs.test_targets }}.txt fi - name: Upload test results - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: name: test_results_${{ inputs.test_targets }} path: lte/gateway/test_results/**/*.xml - name: Upload final_status - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: name: test-status-${{ inputs.test_targets }} diff --git a/.github/workflows/nms-workflow.yml b/.github/workflows/nms-workflow.yml index c8492b0cf56c..8af3b3baecdd 100644 --- a/.github/workflows/nms-workflow.yml +++ b/.github/workflows/nms-workflow.yml @@ -53,7 +53,7 @@ jobs: run: | mkdir -p ./pr echo -n ${{ steps.changes.outputs.filesChanged == 'false' }} > ./pr/skipped - - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: name: pr @@ -204,7 +204,7 @@ jobs: ./e2e_test_setup.sh - name: Publish Test Results if: always() - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 with: name: NMS Test Results path: "/tmp/nms_artifacts/*" diff --git a/.github/workflows/python-workflow.yml b/.github/workflows/python-workflow.yml index a4b115cda4ea..025cc3326be4 100644 --- a/.github/workflows/python-workflow.yml +++ b/.github/workflows/python-workflow.yml @@ -57,7 +57,7 @@ jobs: echo -n ${{ github.event.number }} > ./pr/pr_number echo -n ${{ steps.changes.outputs.filesChanged == 'false' }} > ./pr/skipped echo -n "false" > ./pr/is_reverted_pr - - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: name: pr @@ -103,7 +103,7 @@ jobs: run: | mkdir -p ./pr echo ${{ github.event.number }} > ./pr/pr_number - - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: name: pr diff --git a/.github/workflows/semantic-pr.yml b/.github/workflows/semantic-pr.yml index db114df8d361..e627f567fad9 100644 --- a/.github/workflows/semantic-pr.yml +++ b/.github/workflows/semantic-pr.yml @@ -68,6 +68,7 @@ jobs: deps deps-dev directoryd + docusaurus dp eap eap_aka diff --git a/.github/workflows/sudo-python-tests.yml b/.github/workflows/sudo-python-tests.yml index 5920aff3af6d..1d89dbd9ebc2 100644 --- a/.github/workflows/sudo-python-tests.yml +++ b/.github/workflows/sudo-python-tests.yml @@ -80,7 +80,7 @@ jobs: fab get-test-summaries --sudo-tests ls -R - name: Upload test results - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v3 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 if: always() with: name: test_results diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 924ab9156cca..0b2202b967ea 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,10 +18,14 @@ a. The Technical Steering Committee (the “TSC”) will be responsible for all b. Membership in the TSC is by vote of the Committers and Contributors of the project. -    i. There may be as few as three TSC members and as many as five. If active membership falls below a quorum, its powers and responsibilities are assumed by the Governing Board. +    i. There may be three, five, or seven seats in the TSC. The procedure for membership is to sort candidates by votes received and then a random number used for tie breaking; cull candidates receiving less than two votes; cull all candidates beyond the first seven. If the remaining set is four or six, cull the last candidate.     ii. A TSC member who attends no TSC meetings in a month is removed, unless they have a genuine excuse or had a proxy attend on their behalf. They will be notified and have two weeks to respond. On removal there will be a special election to fill their seat. +    iii. If active membership falls below three, the TSC's powers and responsibilities are assumed by the Governing Board. + +    iv. No more than one candidate from the same company can stand for election. If more than one candidate from the same company stands for election, no candidates from that company will be accepted. It is the responsibility of a company to ensure it has no more than one candidate in the running. + c. The Project Committers may choose an alternative approach for determining the voting members of the TSC, and any such alternative approach will be documented in the CONTRIBUTING file. Any meetings of the Technical Steering Committee are intended to be open to the public, and can be conducted electronically, via teleconference, or in person. d. TSC projects generally will involve Contributors and Committers. The TSC may adopt or modify roles so long as the roles are documented in the CONTRIBUTING file. Unless otherwise documented: @@ -73,4 +77,3 @@ d. Every vote should have a Github issue. It might be a dedicated issue only for e. The +1 vote of the proposer and seconder are assumed. They do not have to restate their vote. f. Abstention from voting does not count towards quorum. - diff --git a/README.md b/README.md index 2e4e928568c7..39b1ec1b5d56 100644 --- a/README.md +++ b/README.md @@ -64,11 +64,9 @@ The Magma materials are provided in accordance with the licenses made available Responsible disclosures from independent researchers are gratefully accepted. See the [Security Policy](/magma/magma/security/policy) for submission details and [Security Overview for Contributors](https://github.com/magma/magma/wiki/Security-Overview-for-Contributors) to learn about other ways of contributing. -We wish to acknowledge valuable disclosures by the following security researchers: +We appreciate very much the valuable disclosures (and often fixes) from the following security researchers: +- Nathaniel Bennett (University of Florida). The contributions by Mr. Bennett required deep knowledge of code, networking, security, and Magma. We're grateful. +- Yilu Dong, Tianchang Yang, Abdullah Al Ishtiaq, Syed Md Mukit Rashid, Ali Ranjbar, Kai Tu, Tianwei Wu, Md Sultan Mahmud, Syed Rafiul Hussain (The Pennsylvania State University) - Guarang Maheta - Phi Trần -- Nathaniel Bennett (University of Florida) - -The contributions by Mr. Bennett required deep knowledge of code, networking, security, and Magma. We're grateful. - diff --git a/bazel/asn1c.bzl b/bazel/asn1c.bzl index 7813335739d2..58f40eb4c740 100644 --- a/bazel/asn1c.bzl +++ b/bazel/asn1c.bzl @@ -148,7 +148,7 @@ def cc_asn1_library( """ gen_name = name + "_genrule" - flags = "-pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-example" + flags = "-pdu=all -fcompound-names -fno-include-deps -no-gen-example" # Taken from https://github.com/magma/magma/blob/14c1cf643a61d576b3d24642e17ed3911d19210d/lte/gateway/c/core/oai/tasks/s1ap/CMakeLists.txt#L35 # The original PR (PR2707) doesn't give an explanation on why this is necessary. diff --git a/bazel/cpp_repositories.bzl b/bazel/cpp_repositories.bzl index 2526b7d68eef..ac98a7f0b292 100644 --- a/bazel/cpp_repositories.bzl +++ b/bazel/cpp_repositories.bzl @@ -104,12 +104,11 @@ def cpp_repositories(): sha256 = "a9fed73e13f06b06a4857d342bb30815fa8c359d00bd69547e567eecbbb4c3a1", ) - new_git_repository( + http_archive( name = "liblfds", + urls = ["https://liblfds.org/downloads/liblfds%20release%207.1.0%20source.zip"], + sha256 = "1b1938db2c6928cd8668087effcf4a1211585d24310ab2a82fe446442473c1c4", build_file = "//bazel/external:liblfds.BUILD", - commit = "b36a48014574225723779c7e1e9fb8cb6fa8f7f4", - remote = "https://liblfds.org/git/liblfds", - shallow_since = "1657356839 +0000", ) new_git_repository( diff --git a/cwf/gateway/docker/c/Dockerfile b/cwf/gateway/docker/c/Dockerfile index bc9ca3f077ca..b09e72030f67 100644 --- a/cwf/gateway/docker/c/Dockerfile +++ b/cwf/gateway/docker/c/Dockerfile @@ -17,7 +17,7 @@ ARG OS_DIST=ubuntu OS_RELEASE=focal EXTRA_REPO=https://linuxfoundation.jfrog.io/artifactory/magma-packages-test -FROM ghcr.io/magma/magma/bazel-cache-plain:latest as builder +FROM ghcr.io/magma/magma/bazel-cache-plain:latest AS builder ENV MAGMA_ROOT /magma WORKDIR /magma diff --git a/cwf/gateway/docker/go/Dockerfile b/cwf/gateway/docker/go/Dockerfile index 23045a1bb918..409ccef36081 100644 --- a/cwf/gateway/docker/go/Dockerfile +++ b/cwf/gateway/docker/go/Dockerfile @@ -10,7 +10,7 @@ # limitations under the License. ARG baseImage="ubuntu:focal" -FROM ${baseImage} as base +FROM ${baseImage} AS base # Add the magma apt repo RUN apt-get update && \ @@ -18,7 +18,15 @@ RUN apt-get update && \ # Add the magma apt repo COPY keys/linux_foundation_registry_key.asc /etc/apt/trusted.gpg.d/magma.asc -RUN add-apt-repository "deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" + +#[TODO_GPG_KEY_WORKAROUND]Temporary steps to be removed once GPG public key issue has been fixed. +#RUN add-apt-repository "deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" +RUN echo "deb [trusted=yes] https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" \ + > /etc/apt/sources.list.d/magma.list + +#[TODO_GPG_KEY_WORKAROUND]Temporary steps to be removed once GPG public key issue has been fixed. +RUN echo "Acquire::AllowInsecureRepositories true;" > /etc/apt/apt.conf.d/99AllowInsecureRepositories && \ + echo "APT::Get::AllowUnauthenticated true;" >> /etc/apt/apt.conf.d/99AllowInsecureRepositories # Install the runtime deps. RUN apt-get update && apt-get install -y \ @@ -106,7 +114,7 @@ RUN ln -s /build/python/bin/generate_nghttpx_config.py /usr/local/bin/generate_n # ----------------------------------------------------------------------------- # Builder image with binary # ----------------------------------------------------------------------------- -FROM base as builder +FROM base AS builder # Build the code. COPY cwf $MAGMA_ROOT/cwf diff --git a/cwf/gateway/docker/python/Dockerfile b/cwf/gateway/docker/python/Dockerfile index 1e31a199686f..b7cba8121857 100644 --- a/cwf/gateway/docker/python/Dockerfile +++ b/cwf/gateway/docker/python/Dockerfile @@ -76,8 +76,15 @@ COPY cwf/gateway/deploy/roles/ovs/files/magma-preferences /etc/apt/preferences.d # Add the magma apt repo COPY keys/linux_foundation_registry_key.asc /etc/apt/trusted.gpg.d/magma.asc -RUN add-apt-repository "deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" && \ - add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ focal-proposed restricted main multiverse universe" + +#[TODO_GPG_KEY_WORKAROUND]Temporary steps to be removed once GPG public key issue has been fixed. +RUN echo "deb [trusted=yes] https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" \ + > /etc/apt/sources.list.d/magma.list +RUN add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ focal-proposed restricted main multiverse universe" + +#[TODO_GPG_KEY_WORKAROUND]Temporary steps to be removed once GPG public key issue has been fixed. +RUN echo "Acquire::AllowInsecureRepositories true;" > /etc/apt/apt.conf.d/99AllowInsecureRepositories && \ + echo "APT::Get::AllowUnauthenticated true;" >> /etc/apt/apt.conf.d/99AllowInsecureRepositories RUN apt-get -y update && apt-get -y install \ curl \ diff --git a/cwf/gateway/go.mod b/cwf/gateway/go.mod index 54b7a35fed27..4ba037a7ec4a 100644 --- a/cwf/gateway/go.mod +++ b/cwf/gateway/go.mod @@ -41,7 +41,7 @@ require ( github.com/sparrc/go-ping v0.0.0-20190613174326-4e5b6552494c github.com/stretchr/testify v1.9.0 github.com/vishvananda/netlink v1.1.0 - golang.org/x/crypto v0.24.0 + golang.org/x/crypto v0.31.0 google.golang.org/grpc v1.64.1 layeh.com/radius v0.0.0-20210819152912-ad72663a72ab magma/cwf/cloud/go v0.0.0-00010101000000-000000000000 @@ -136,8 +136,8 @@ require ( go.opentelemetry.io/otel/sdk v1.28.0 // indirect go.opentelemetry.io/otel/trace v1.28.0 // indirect golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect google.golang.org/protobuf v1.34.2 // indirect diff --git a/cwf/gateway/go.sum b/cwf/gateway/go.sum index edb1a7672d05..2d0d9fa62938 100644 --- a/cwf/gateway/go.sum +++ b/cwf/gateway/go.sum @@ -642,8 +642,8 @@ golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -801,13 +801,13 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -817,8 +817,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/cwf/k8s/cwf_operator/docker/Dockerfile b/cwf/k8s/cwf_operator/docker/Dockerfile index 9e31ed19897a..29f6ff16a5da 100644 --- a/cwf/k8s/cwf_operator/docker/Dockerfile +++ b/cwf/k8s/cwf_operator/docker/Dockerfile @@ -9,7 +9,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -FROM ubuntu:bionic as builder +FROM ubuntu:bionic AS builder # Add the magma apt repo RUN apt-get update && \ @@ -64,7 +64,7 @@ RUN go install ./cmd/manager/ # ----------------------------------------------------------------------------- # Production image # ----------------------------------------------------------------------------- -FROM ubuntu:bionic as cwf_operator +FROM ubuntu:bionic AS cwf_operator ENV OPERATOR=/usr/local/bin/cwf-operator \ USER_UID=1001 \ diff --git a/cwf/k8s/cwf_operator/go.mod b/cwf/k8s/cwf_operator/go.mod index c6974f9f4cd0..04bb15107659 100644 --- a/cwf/k8s/cwf_operator/go.mod +++ b/cwf/k8s/cwf_operator/go.mod @@ -160,13 +160,13 @@ require ( github.com/xeipuuv/gojsonschema v1.1.0 // indirect go.mongodb.org/mongo-driver v1.8.2 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect - golang.org/x/net v0.7.0 // indirect + golang.org/x/crypto v0.35.0 // indirect + golang.org/x/net v0.36.0 // indirect golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect - golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect - golang.org/x/sys v0.7.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/sync v0.11.0 // indirect + golang.org/x/sys v0.30.0 // indirect + golang.org/x/term v0.29.0 // indirect + golang.org/x/text v0.22.0 // indirect golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect gomodules.xyz/jsonpatch/v2 v2.0.1 // indirect gomodules.xyz/jsonpatch/v3 v3.0.1 // indirect diff --git a/cwf/k8s/cwf_operator/go.sum b/cwf/k8s/cwf_operator/go.sum index ad1cb63511a5..5e4a961b98df 100644 --- a/cwf/k8s/cwf_operator/go.sum +++ b/cwf/k8s/cwf_operator/go.sum @@ -1290,6 +1290,8 @@ golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= +golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1395,6 +1397,8 @@ golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= +golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1430,6 +1434,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1539,11 +1545,15 @@ golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1557,6 +1567,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/docs/docusaurus/Dockerfile b/docs/docusaurus/Dockerfile index 6d5d95715b8b..3f924508c7b1 100644 --- a/docs/docusaurus/Dockerfile +++ b/docs/docusaurus/Dockerfile @@ -9,7 +9,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM node:14 +FROM node:20 WORKDIR /app/website diff --git a/docs/readmes/orc8r/deploy_install.md b/docs/readmes/orc8r/deploy_install.md index 7740047dca48..27c4217fcd20 100644 --- a/docs/readmes/orc8r/deploy_install.md +++ b/docs/readmes/orc8r/deploy_install.md @@ -322,8 +322,7 @@ deployment by visiting the host NMS organization at e.g. NOTE: the `https://` is required. If you self-signed certs above, the browser will rightfully complain. Either ignore the browser warnings at your own risk (some versions of Chrome won't allow this at all), or e.g. -[import the root CA from above on a per-browser basis -](https://stackoverflow.com/questions/7580508/getting-chrome-to-accept-self-signed-localhost-certificate). +[import the root CA from above on a per-browser basis](https://stackoverflow.com/questions/7580508/getting-chrome-to-accept-self-signed-localhost-certificate). For interacting with the Orchestrator REST API, a good starting point is the Swagger UI available at `https://api.yoursubdomain.yourdomain.com/swagger/v1/ui/`. diff --git a/dp/cloud/docker/python/configuration_controller/Dockerfile b/dp/cloud/docker/python/configuration_controller/Dockerfile index 6c39d2c1e0f4..0976a42826ed 100644 --- a/dp/cloud/docker/python/configuration_controller/Dockerfile +++ b/dp/cloud/docker/python/configuration_controller/Dockerfile @@ -10,7 +10,7 @@ # limitations under the License. ARG ENV=standard -FROM python:3.9.2-slim-buster as protos-generator +FROM python:3.9.2-slim-buster AS protos-generator RUN apt-get update && apt-get install -y --no-install-recommends curl zip make unzip RUN curl -Lfs https://github.com/protocolbuffers/protobuf/releases/download/v3.10.0/protoc-3.10.0-linux-x86_64.zip \ @@ -35,7 +35,7 @@ WORKDIR /magma/dp RUN mkdir -p $PYTHON_BUILD && make protos ARG ENV=standard -FROM python:3.9.2-slim-buster as standard-version +FROM python:3.9.2-slim-buster AS standard-version ENV CC_DIRECTORY=dp/cloud/python/magma/configuration_controller ENV DB_DIRECTORY=dp/cloud/python/magma/db_service @@ -47,13 +47,13 @@ COPY $CC_DIRECTORY/requirements.txt \ WORKDIR /$CC_DIRECTORY RUN pip3 install --upgrade pip --no-cache-dir -r requirements.txt -#FROM standard-version as tests-version +#FROM standard-version AS tests-version #COPY $CC_DIRECTORY/tests/requirements.txt \ # /$CC_DIRECTORY/tests/requirements.txt #RUN pip3 install --upgrade pip --no-cache-dir -r tests/requirements.txt # hadolint ignore=DL3006 -FROM ${ENV}-version as final +FROM ${ENV}-version AS final COPY $CC_DIRECTORY /$CC_DIRECTORY/ COPY $DB_DIRECTORY /$DB_DIRECTORY/ COPY $FC_DIRECTORY /$FC_DIRECTORY/ diff --git a/dp/cloud/docker/python/db_service/Dockerfile b/dp/cloud/docker/python/db_service/Dockerfile index 99cca2ebff3a..ed69493e707e 100644 --- a/dp/cloud/docker/python/db_service/Dockerfile +++ b/dp/cloud/docker/python/db_service/Dockerfile @@ -10,7 +10,7 @@ # limitations under the License. ARG ENV=standard -FROM python:3.9.2-slim-buster as builder +FROM python:3.9.2-slim-buster AS builder COPY dp/cloud/python/magma/db_service/requirements.txt /dp/cloud/python/magma/db_service/requirements.txt WORKDIR /dp/cloud/python/magma/db_service/migrations @@ -19,7 +19,7 @@ RUN pip3 install --upgrade pip --no-cache-dir -r ../requirements.txt COPY dp/cloud/python/magma/db_service /dp/cloud/python/magma/db_service/ COPY dp/cloud/python/magma/mappings /dp/cloud/python/magma/mappings/ -FROM builder as final +FROM builder AS final ENV PYTHONPATH=/:/dp/cloud/python ENV ALEMBIC_CONFIG=./alembic.ini diff --git a/dp/cloud/docker/python/radio_controller/Dockerfile b/dp/cloud/docker/python/radio_controller/Dockerfile index 480535b6590b..d07048a4fc92 100644 --- a/dp/cloud/docker/python/radio_controller/Dockerfile +++ b/dp/cloud/docker/python/radio_controller/Dockerfile @@ -11,6 +11,6 @@ # TODO remove AMC from deployment scripts -FROM python:3.9.2-slim-buster as protos-generator +FROM python:3.9.2-slim-buster AS protos-generator CMD ["sleep", "infinity"] \ No newline at end of file diff --git a/dp/cloud/docker/python/test_runner/Dockerfile b/dp/cloud/docker/python/test_runner/Dockerfile index 750ab3513452..ab53f962cacd 100644 --- a/dp/cloud/docker/python/test_runner/Dockerfile +++ b/dp/cloud/docker/python/test_runner/Dockerfile @@ -10,7 +10,7 @@ # limitations under the License. ARG ENV=standard -FROM python:3.9.2-slim-buster as protos-generator +FROM python:3.9.2-slim-buster AS protos-generator RUN apt-get update && apt-get install -y --no-install-recommends curl zip make unzip RUN curl -Lfs https://github.com/protocolbuffers/protobuf/releases/download/v3.10.0/protoc-3.10.0-linux-x86_64.zip \ @@ -34,7 +34,7 @@ COPY ./dp $MAGMA_ROOT/dp/ WORKDIR /magma/dp RUN mkdir -p $PYTHON_BUILD && make protos -FROM python:3.9.2-slim-buster as standard-version +FROM python:3.9.2-slim-buster AS standard-version COPY dp/cloud/python/magma/test_runner/requirements.txt /dp/cloud/python/magma/test_runner/requirements.txt RUN pip3 install --upgrade pip --no-cache-dir -r dp/cloud/python/magma/test_runner/requirements.txt diff --git a/dp/cloud/go/go.mod b/dp/cloud/go/go.mod index 6d479f825ca6..82067e888d6e 100644 --- a/dp/cloud/go/go.mod +++ b/dp/cloud/go/go.mod @@ -27,14 +27,14 @@ require ( github.com/go-openapi/strfmt v0.21.1 github.com/go-openapi/swag v0.19.15 github.com/go-openapi/validate v0.20.3 - github.com/golang/glog v1.0.0 - github.com/golang/protobuf v1.5.2 + github.com/golang/glog v1.1.0 + github.com/golang/protobuf v1.5.3 github.com/labstack/echo/v4 v4.9.0 github.com/olivere/elastic/v7 v7.0.6 github.com/stretchr/testify v1.7.0 golang.org/x/exp v0.0.0-20220907003533-145caa8ea1d0 - google.golang.org/grpc v1.53.0 - google.golang.org/protobuf v1.28.1 + google.golang.org/grpc v1.56.3 + google.golang.org/protobuf v1.30.0 gopkg.in/DATA-DOG/go-sqlmock.v1 v1.3.0 magma/orc8r/cloud/go v0.0.0-00010101000000-000000000000 magma/orc8r/lib/go v0.0.0-00010101000000-000000000000 @@ -90,12 +90,12 @@ require ( github.com/valyala/fasttemplate v1.2.1 // indirect go.mongodb.org/mongo-driver v1.8.2 // indirect golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/net v0.9.0 // indirect + golang.org/x/sys v0.7.0 // indirect + golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect - golang.org/x/tools v0.1.12 // indirect - google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect + golang.org/x/tools v0.6.0 // indirect + google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect magma/gateway v0.0.0 // indirect diff --git a/dp/cloud/go/go.sum b/dp/cloud/go/go.sum index 0cff2be6506e..79961fa73497 100644 --- a/dp/cloud/go/go.sum +++ b/dp/cloud/go/go.sum @@ -239,8 +239,8 @@ github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= +github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -266,8 +266,9 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -597,8 +598,8 @@ golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1 golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -606,7 +607,7 @@ golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= +golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -668,8 +669,8 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -682,8 +683,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -738,8 +739,8 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -797,8 +798,8 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -812,8 +813,8 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= +google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -826,8 +827,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/DATA-DOG/go-sqlmock.v1 v1.3.0 h1:FVCohIoYO7IJoDDVpV2pdq7SgrMH6wHnuTyrdrxJNoY= gopkg.in/DATA-DOG/go-sqlmock.v1 v1.3.0/go.mod h1:OdE7CF6DbADk7lN8LIKRzRJTTZXIjtWgA5THM5lhBAw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= diff --git a/dp/cloud/python/magma/configuration_controller/requirements.txt b/dp/cloud/python/magma/configuration_controller/requirements.txt index 515d9e69e4f4..14ab056f6617 100644 --- a/dp/cloud/python/magma/configuration_controller/requirements.txt +++ b/dp/cloud/python/magma/configuration_controller/requirements.txt @@ -1,7 +1,7 @@ APScheduler==3.7.0 certifi==2024.7.4 click==7.1.2 -cryptography==41.0.3 +cryptography==44.0.1 grpcio==1.53.2 grpcio-tools==1.37.1 idna==2.10 diff --git a/dp/cloud/python/magma/radio_controller/requirements.txt b/dp/cloud/python/magma/radio_controller/requirements.txt index 4075a2bd7789..64a8f47fef77 100644 --- a/dp/cloud/python/magma/radio_controller/requirements.txt +++ b/dp/cloud/python/magma/radio_controller/requirements.txt @@ -3,5 +3,5 @@ grpcio==1.53.2 grpcio-tools==1.37.1 prometheus_client==0.3.1 psycopg2-binary==2.8.6 -requests==2.31.0 +requests==2.32.2 sqlalchemy==1.4.15 diff --git a/dp/tools/fake_crl/Dockerfile b/dp/tools/fake_crl/Dockerfile index 659cb337456c..0521dbbf9449 100644 --- a/dp/tools/fake_crl/Dockerfile +++ b/dp/tools/fake_crl/Dockerfile @@ -9,7 +9,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM python:2.7.18-alpine3.11 as builder +FROM python:2.7.18-alpine3.11 AS builder RUN apk add --no-cache \ gcc=9.3.0-r0 \ diff --git a/dp/tools/fake_sas/Dockerfile b/dp/tools/fake_sas/Dockerfile index 150dc4c67b7f..befbc9ce84c4 100644 --- a/dp/tools/fake_sas/Dockerfile +++ b/dp/tools/fake_sas/Dockerfile @@ -9,7 +9,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM python:2.7.18-alpine3.11 as builder +FROM python:2.7.18-alpine3.11 AS builder RUN apk add --no-cache \ gcc=9.3.0-r0 \ diff --git a/dp/tools/harness/Dockerfile b/dp/tools/harness/Dockerfile index 3ed6bacf0cc4..3ec268942828 100644 --- a/dp/tools/harness/Dockerfile +++ b/dp/tools/harness/Dockerfile @@ -9,7 +9,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM python:2.7.18-alpine3.11 as builder +FROM python:2.7.18-alpine3.11 AS builder RUN apk add --no-cache \ gcc=9.3.0-r0 \ diff --git a/dp/tools/skaffold_hooks/hooks.sh b/dp/tools/skaffold_hooks/hooks.sh index 82e9938d6ac3..0cde7912c32e 100755 --- a/dp/tools/skaffold_hooks/hooks.sh +++ b/dp/tools/skaffold_hooks/hooks.sh @@ -37,7 +37,7 @@ build_nginx() { build_magmalte() { cd "$MAGMA_ROOT/nms" || exit 1 - COMPOSE_PROJECT_NAME=magmalte docker-compose build magmalte && + COMPOSE_PROJECT_NAME=magmalte docker compose --compatibility build magmalte && docker tag magmalte_magmalte:latest "$IMAGE" if $PUSH_IMAGE; then docker push "$IMAGE" diff --git a/feg/gateway/docker/go/Dockerfile b/feg/gateway/docker/go/Dockerfile index 62447895107f..f8e8c918f8db 100755 --- a/feg/gateway/docker/go/Dockerfile +++ b/feg/gateway/docker/go/Dockerfile @@ -13,14 +13,22 @@ # Development image for test, precommit, etc. # ----------------------------------------------------------------------------- ARG baseImage="ubuntu:focal" -FROM ${baseImage} as base +FROM ${baseImage} AS base # Add the magma apt repo RUN apt-get update && \ apt-get install -y apt-utils software-properties-common apt-transport-https # Add the magma apt repo COPY keys/linux_foundation_registry_key.asc /etc/apt/trusted.gpg.d/magma.asc -RUN add-apt-repository "deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" + +#[TODO_GPG_KEY_WORKAROUND]Temporary steps to be removed once GPG public key issue has been fixed. +#RUN add-apt-repository "deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" +RUN echo "deb [trusted=yes] https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" \ + > /etc/apt/sources.list.d/magma.list + +#[TODO_GPG_KEY_WORKAROUND]Temporary steps to be removed once GPG public key issue has been fixed. +RUN echo "Acquire::AllowInsecureRepositories true;" > /etc/apt/apt.conf.d/99AllowInsecureRepositories && \ + echo "APT::Get::AllowUnauthenticated true;" >> /etc/apt/apt.conf.d/99AllowInsecureRepositories # Install the runtime deps. RUN apt-get update && apt-get install -y \ @@ -118,7 +126,7 @@ COPY orc8r/gateway/go $MAGMA_ROOT/orc8r/gateway/go # ----------------------------------------------------------------------------- # Builder image with binaries # ----------------------------------------------------------------------------- -FROM base as builder +FROM base AS builder # Enable make gen if proto gen is required # RUN make -C $MAGMA_ROOT/feg/gateway gen RUN make -C $MAGMA_ROOT/feg/gateway build @@ -129,7 +137,7 @@ RUN ./run.sh build # ----------------------------------------------------------------------------- # Go-cache base image # ----------------------------------------------------------------------------- -FROM ${baseImage} as gocache +FROM ${baseImage} AS gocache COPY --from=builder /root/.cache /root/.cache # ----------------------------------------------------------------------------- diff --git a/feg/gateway/docker/python/Dockerfile b/feg/gateway/docker/python/Dockerfile index 47c0d9908477..fb128af7c8fe 100644 --- a/feg/gateway/docker/python/Dockerfile +++ b/feg/gateway/docker/python/Dockerfile @@ -79,10 +79,22 @@ RUN apt-get update && \ apt-get install -y apt-utils software-properties-common apt-transport-https curl COPY keys/linux_foundation_registry_key.asc /etc/apt/trusted.gpg.d/magma.asc -RUN add-apt-repository "deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" + +#[TODO_GPG_KEY_WORKAROUND]Temporary steps to be removed once GPG public key issue has been fixed. +#RUN add-apt-repository "deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" +RUN echo "deb [trusted=yes] https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" \ + > /etc/apt/sources.list.d/magma.list + +#[TODO_GPG_KEY_WORKAROUND]Temporary steps to be removed once GPG public key issue has been fixed. +RUN echo "Acquire::AllowInsecureRepositories true;" > /etc/apt/apt.conf.d/99AllowInsecureRepositories && \ + echo "APT::Get::AllowUnauthenticated true;" >> /etc/apt/apt.conf.d/99AllowInsecureRepositories + RUN curl -L http://packages.fluentbit.io/fluentbit.key > /tmp/fluentbit.key -RUN apt-key add /tmp/fluentbit.key && \ - add-apt-repository "deb https://packages.fluentbit.io/ubuntu/focal focal main" +RUN apt-key add /tmp/fluentbit.key +#[TODO_GPG_KEY_WORKAROUND]Temporary steps to be removed once GPG public key issue has been fixed. +#&& add-apt-repository "deb https://packages.fluentbit.io/ubuntu/focal focal main" +RUN echo "deb [trusted=yes] https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" \ + > /etc/apt/sources.list.d/magma.list # Install the runtime deps from apt. RUN apt-get -y update && apt-get -y install \ diff --git a/feg/gateway/docker/radius/Dockerfile b/feg/gateway/docker/radius/Dockerfile index e3bf46d10822..07e23e788b61 100644 --- a/feg/gateway/docker/radius/Dockerfile +++ b/feg/gateway/docker/radius/Dockerfile @@ -9,7 +9,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:alpine as builder +FROM golang:alpine AS builder RUN apk add git gcc musl-dev bash protobuf netcat-openbsd RUN go get -d -u github.com/golang/protobuf/protoc-gen-go diff --git a/feg/radius/src/Dockerfile b/feg/radius/src/Dockerfile index 21d0a347fdd8..85c265c28802 100644 --- a/feg/radius/src/Dockerfile +++ b/feg/radius/src/Dockerfile @@ -9,7 +9,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:alpine as builder +FROM golang:alpine AS builder RUN apk add git gcc musl-dev bash protobuf ENV MAGMA_ROOT /magma diff --git a/keys/linux_foundation_registry_key.asc b/keys/linux_foundation_registry_key.asc index bf3de4e42cef..1bf336b25d4a 100644 --- a/keys/linux_foundation_registry_key.asc +++ b/keys/linux_foundation_registry_key.asc @@ -1,41 +1,15 @@ -----BEGIN PGP PUBLIC KEY BLOCK----- -mQGNBGNya+ABDAC68Zs5lAl3CfHB4bGfMnVfa5tz1nS9QjsGn42xC2r4yVsqIzFZ -w4atAjIGgL1ZJGuEBCbGBzHGAieCJLK8WGEHa3lrpuZMDypmLK4g5OEqL3tzRwEe -+vHZ0mAOYuJnAiqSk/+5up4C6qJxMEcdSR5kGAnX+cW3UK363s1AkPRWofHZHo0O -/3PwaYRCC3+wgxuqrDXh+ffFWH08jvEwVsri38O4MOmeAKUmH2iPQEFJhxKuKDmy -wvuW30oL2dHbliPr0lb+qKB3ZkmDWqREDg2c4ubxmQitHLadvzlBgCQ6eovLBwVN -FKW9SnkySh2Xuff23uCFqVQ+eQ9Mf83FWw3QmgfLig2Gsw39mtsd02eKnImRr4Mu -X3rg6pzs81kBXWF5but/YC/yIxoh++SV6Vs+EMyS0w2XpjugRd4cs1gdPTuHauQB -d5TW01YuwPWXnKh3Z4qtLR6FapJITiBLjCpHB4fwHenS6C+2g+T5oROE8xz8lt5p -0qSYMrUfjY2RlkkAEQEAAbQkbWFnbWFjaSA8cmVsZW5nQGxpbnV4Zm91bmRhdGlv -bi5vcmc+iQHUBBMBCgA+FiEE+wcuUA5pL04zN57lBuO/sZukGKgFAmNya+ACGwMF -CQPCZwAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQBuO/sZukGKju6wv/Vlqd -1ifPmcynvSD3Mf//tCcCz3I4XMwT6uxB6tvTD4xoY7d5rn2KH1/J2teOxEQCCr38 -CUEDLvzDfRWP8MCqHVhO5ofHUJZ+YIBKwF9/VA21U48SMlUAcmNEqeCUctFTh8IN -Fz4yZ16dhXtgVPYU3CWECqvwxIfUvdfn1BKr9L6jW6eO12IGP3ZsgriOsLSXl+9u -HaT/p5t+1n8tXS2A0+VPYaqzZCqqHEYBJ+A7isHg3kS7/UOzI1ndyldJPhcTDdEf -Lu5UQ1jZWeAj2ZHw2xCHNQz3mHQYD89F17bnG/9LsRNnJIHTsY5WDiYFNBcwC//J -IR6nCkZuWOuLI5eVI0nccZ8RKky2M8ycV1vF+DAX724/55ZN5waEx1nu6quNX2c8 -FQpUTi++9XA4uDI4d0OIsd5UBFK3yS3bxaK7hg2niYC2y3a/l8EbPc9ly5yPRsfl -gJ9CVRpXwuMoCuqiqOaBQy0svvRoR2u1ujyo02fSlNo6Remzya0EAwDMcIzYuQGN -BGNya+ABDACtNc0XQUZy87JX6EBZKcksqe8cQs3B7PJeLRVzLqWJkeC0WzhOTb4j -pDZL+483Z1Lx7+6s8fgQoNj399u/WC+xE8NHANdtZgvKrclaAH+3vV8bMxNLeYYA -ReoaeUWbgG9T7faD3aiN6caZvu3xbYE++R7s2rVwf5TjXcE9RgV9a64kC2Zt7Geg -3NMoX53xivkMFGh/UrsyoazEKsTjZzT6fd/vUASnRFLE2l8/pH23HNtwVzkvtxOH -tohYB2wTsUARx43eXY4hpKuvb2YdBQjrwiqfRIq+OIqFXzc6+RGh66+VC9vi4fb3 -lH3aFIRWZfKvbIv0CdI/s6d/yhPCc6P1vNvKjADGbhGuFzq2Q5tr/4IoVMrxpDHT -P6zrWpz4ERzv5iC+99olrlyHhw6rwKCmhNOOW8fE95pydEeXN11UjsOrVXb4T26/ -ulR3FqlaER57vhM9zu1Cs6jG+pfgRXUf6F5IF//peXNCI9BuGSm4lolghxLyX6Ob -1z/Om9VxLdkAEQEAAYkBvAQYAQoAJhYhBPsHLlAOaS9OMzee5Qbjv7GbpBioBQJj -cmvgAhsMBQkDwmcAAAoJEAbjv7GbpBioYEkMAItvP6X7GNeKNyNI2VtwKZx4Qe/q -yyw5lUUonrNKBwJJR+np8zo0cfdPrm/XLW5ABa3HFsKG8lumgabtin7Z0zAfnnZD -Xa7XJeCVUv7HxyFb/30xKwK1axc3I7oImZFNNolfpd6lDELdVsvEA6C6ztM9RQ+z -j1vccKmivM7lwR8p32EGyaybNFjljFEXpttejNB/aRRERHah8yBJgQPbPXl47z4Z -uQvuC+of2iympudWPb2TmIp3IEZcG1x25KnUeXe8a8sR/9x6ROuLQRbyOiJ7iFTk -BiSYbOxoAfjthshhQpUsEH6S0H2oQolRhTVfKazFA6R7nwyW0DTauxaB0+cBvbIh -XBjlfFq+aw6XR/lqHa4AM4r60EGknJgHc8hCOVc1P2XLehjQmBgSJFSsmtZo5Gj+ -EueVhER87lK1SBPKF8/mj65xCw9ieXGYqsxCp27TqueCf+Bd1K8BR+jnTCmnJr/I -bL+s9AikT05CdwLE8e8aY1tqKJDSaJMPHrUG7g== -=kbV2 ------END PGP PUBLIC KEY BLOCK----- \ No newline at end of file +mDMEZ6o/DhYJKwYBBAHaRw8BAQdANiPcnnZELWnddRJ7mEuGr2Kx4Y4U9aV4d1k7 +782/VB20Km1hZ21hY2kgPHJlbGVuZyttYWdtYUBsaW51eGZvdW5kYXRpb24ub3Jn +PoiZBBMWCgBBFiEEEVK1u65RHzKURfXpImZco2yNQB4FAmeqPw4CGwMFCQWjmoAF +CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQImZco2yNQB5P+AD/a6qn69CU +IAoVcn0qkkvuh2f/1o45anYgfqx2nmYINyYBAP7aXYnMviCBActiSfLaHfQG1nxY +fFQpc/AZjx0Fa1YKuDgEZ6o/DhIKKwYBBAGXVQEFAQEHQBJAurqV2kE5q2U/tKRY +39mYTHWSx7aIGWMVLqWJ92BGAwEIB4h+BBgWCgAmFiEEEVK1u65RHzKURfXpImZc +o2yNQB4FAmeqPw4CGwwFCQWjmoAACgkQImZco2yNQB5idwD/SDukRz7T1sSNOxGz +nWTdIiZLA7w6zEVWpzNWnWnpp44BAKnwxyobmPhn3wG9yCbSDcL9rNufBAtGD6w7 +JlaRCcQI +=WTCw +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/lte/gateway/c/core/oai/common/conversions.h b/lte/gateway/c/core/oai/common/conversions.h index 5bccba4f4f17..a90b0a7b01b8 100644 --- a/lte/gateway/c/core/oai/common/conversions.h +++ b/lte/gateway/c/core/oai/common/conversions.h @@ -388,7 +388,7 @@ (bITsTRING)->buf = (uint8_t*)calloc(3, sizeof(uint8_t)); \ (bITsTRING)->buf[0] = ((mACRO) >> 12); \ (bITsTRING)->buf[1] = (mACRO) >> 4; \ - (bITsTRING)->buf[2] = ((mACRO)&0x0f) << 4; \ + (bITsTRING)->buf[2] = ((mACRO) & 0x0f) << 4; \ (bITsTRING)->size = 3; \ (bITsTRING)->bits_unused = 4; \ } while (0) @@ -399,15 +399,15 @@ * Identity correspond to the eNB * ID (defined in subclause 9.2.1.37). */ -#define MACRO_ENB_ID_TO_CELL_IDENTITY(mACRO, cELL_iD, bITsTRING) \ - do { \ - (bITsTRING)->buf = (uint8_t*)calloc(4, sizeof(uint8_t)); \ - (bITsTRING)->buf[0] = ((mACRO) >> 12); \ - (bITsTRING)->buf[1] = (mACRO) >> 4; \ - (bITsTRING)->buf[2] = (((mACRO)&0x0f) << 4) | ((cELL_iD) >> 4); \ - (bITsTRING)->buf[3] = ((cELL_iD)&0x0f) << 4; \ - (bITsTRING)->size = 4; \ - (bITsTRING)->bits_unused = 4; \ +#define MACRO_ENB_ID_TO_CELL_IDENTITY(mACRO, cELL_iD, bITsTRING) \ + do { \ + (bITsTRING)->buf = (uint8_t*)calloc(4, sizeof(uint8_t)); \ + (bITsTRING)->buf[0] = ((mACRO) >> 12); \ + (bITsTRING)->buf[1] = (mACRO) >> 4; \ + (bITsTRING)->buf[2] = (((mACRO) & 0x0f) << 4) | ((cELL_iD) >> 4); \ + (bITsTRING)->buf[3] = ((cELL_iD) & 0x0f) << 4; \ + (bITsTRING)->size = 4; \ + (bITsTRING)->bits_unused = 4; \ } while (0) /* Used to format an uint32_t containing an ipv4 address */ @@ -727,11 +727,11 @@ void hexa_to_ascii(uint8_t* from, char* to, size_t length); int ascii_to_hex(uint8_t* dst, const char* h); #define UINT8_TO_BINARY_FMT "%c%c%c%c%c%c%c%c" -#define UINT8_TO_BINARY_ARG(bYtE) \ - ((bYtE)&0x80 ? '1' : '0'), ((bYtE)&0x40 ? '1' : '0'), \ - ((bYtE)&0x20 ? '1' : '0'), ((bYtE)&0x10 ? '1' : '0'), \ - ((bYtE)&0x08 ? '1' : '0'), ((bYtE)&0x04 ? '1' : '0'), \ - ((bYtE)&0x02 ? '1' : '0'), ((bYtE)&0x01 ? '1' : '0') +#define UINT8_TO_BINARY_ARG(bYtE) \ + ((bYtE) & 0x80 ? '1' : '0'), ((bYtE) & 0x40 ? '1' : '0'), \ + ((bYtE) & 0x20 ? '1' : '0'), ((bYtE) & 0x10 ? '1' : '0'), \ + ((bYtE) & 0x08 ? '1' : '0'), ((bYtE) & 0x04 ? '1' : '0'), \ + ((bYtE) & 0x02 ? '1' : '0'), ((bYtE) & 0x01 ? '1' : '0') int get_time_zone(void); #define GUTI_STRING_LEN 21 diff --git a/lte/gateway/c/core/oai/common/log.c b/lte/gateway/c/core/oai/common/log.c index 1e7272c34da4..e21919d752fa 100644 --- a/lte/gateway/c/core/oai/common/log.c +++ b/lte/gateway/c/core/oai/common/log.c @@ -150,8 +150,7 @@ typedef struct oai_log_s { log_level_t log_level[MAX_LOG_PROTOS]; /*!< \brief Loglevel id of each client (protocol/layer) */ int log_level2syslog[MAX_LOG_LEVEL]; - log_message_number_t - log_message_number; /*!< \brief Counter of log message */ + log_message_number_t log_message_number; /*!< \brief Counter of log message */ hash_table_ts_t* thread_context_htbl; /*!< \brief Container for log_thread_ctxt_t */ int max_threads; /*!< \brief Maximum number of log threads */ diff --git a/lte/gateway/c/core/oai/common/log.h b/lte/gateway/c/core/oai/common/log.h index ee15584eba05..d5ea6f1b2651 100644 --- a/lte/gateway/c/core/oai/common/log.h +++ b/lte/gateway/c/core/oai/common/log.h @@ -596,4 +596,4 @@ const char* get_short_file_name(const char* const source_file_nameP); log_message_prefix_id(OAILOG_LEVEL_INFO, pRoTo, __FILE__, __LINE__, ue_id, \ ##__VA_ARGS__); \ } while (0) /*!< \brief informational */ -#endif /* FILE_LOG_SEEN */ +#endif /* FILE_LOG_SEEN */ diff --git a/lte/gateway/c/core/oai/common/queue.h b/lte/gateway/c/core/oai/common/queue.h index 78f96e9f1867..153a0fe9244f 100644 --- a/lte/gateway/c/core/oai/common/queue.h +++ b/lte/gateway/c/core/oai/common/queue.h @@ -104,8 +104,7 @@ struct type* lh_first; /* first element */ \ } -#define LIST_HEAD_INITIALIZER(head) \ - { NULL } +#define LIST_HEAD_INITIALIZER(head) {NULL} #define LIST_ENTRY(type) \ struct { \ @@ -170,8 +169,7 @@ struct type* slh_first; /* first element */ \ } -#define SLIST_HEAD_INITIALIZER(head) \ - { NULL } +#define SLIST_HEAD_INITIALIZER(head) {NULL} #define SLIST_ENTRY(type) \ struct { \ @@ -233,8 +231,7 @@ struct type** stqh_last; /* addr of last next element */ \ } -#define STAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).stqh_first } +#define STAILQ_HEAD_INITIALIZER(head) {NULL, &(head).stqh_first} #define STAILQ_ENTRY(type) \ struct { \ @@ -319,8 +316,7 @@ struct type** sqh_last; /* addr of last next element */ \ } -#define SIMPLEQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).sqh_first } +#define SIMPLEQ_HEAD_INITIALIZER(head) {NULL, &(head).sqh_first} #define SIMPLEQ_ENTRY(type) \ struct { \ @@ -396,8 +392,7 @@ } #define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type, ) -#define TAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).tqh_first } +#define TAILQ_HEAD_INITIALIZER(head) {NULL, &(head).tqh_first} #define _TAILQ_ENTRY(type, qual) \ struct { \ @@ -498,8 +493,7 @@ struct type* cqh_last; /* last element */ \ } -#define CIRCLEQ_HEAD_INITIALIZER(head) \ - { (void*)&head, (void*)&head } +#define CIRCLEQ_HEAD_INITIALIZER(head) {(void*)&head, (void*)&head} #define CIRCLEQ_ENTRY(type) \ struct { \ diff --git a/lte/gateway/c/core/oai/common/shared_ts_log.c b/lte/gateway/c/core/oai/common/shared_ts_log.c index 3a0440bc262e..2ce2f50c91c9 100644 --- a/lte/gateway/c/core/oai/common/shared_ts_log.c +++ b/lte/gateway/c/core/oai/common/shared_ts_log.c @@ -68,8 +68,7 @@ typedef struct oai_shared_log_s { int log_start_time_second; /*!< \brief Logging utility reference time */ - log_message_number_t - log_message_number; /*!< \brief Counter of log message */ + log_message_number_t log_message_number; /*!< \brief Counter of log message */ struct lfds710_queue_bmm_element* qbmme; struct lfds710_queue_bmm_state log_message_queue; /*!< \brief Thread safe log message queue */ diff --git a/lte/gateway/c/core/oai/common/tree.h b/lte/gateway/c/core/oai/common/tree.h index 89a53dcc7ba7..0d2923d4cda6 100644 --- a/lte/gateway/c/core/oai/common/tree.h +++ b/lte/gateway/c/core/oai/common/tree.h @@ -58,8 +58,7 @@ struct type* sph_root; /* root of the tree */ \ } -#define SPLAY_INITIALIZER(root) \ - { NULL } +#define SPLAY_INITIALIZER(root) {NULL} #define SPLAY_INIT(root) \ do { \ @@ -276,8 +275,7 @@ struct type* rbh_root; /* root of the tree */ \ } -#define RB_INITIALIZER(root) \ - { NULL } +#define RB_INITIALIZER(root) {NULL} #define RB_INIT(root) \ do { \ diff --git a/lte/gateway/c/core/oai/include/3gpp_requirements_24.301.h b/lte/gateway/c/core/oai/include/3gpp_requirements_24.301.h index 5e38fb74b430..4f72fd5dc8c4 100644 --- a/lte/gateway/c/core/oai/include/3gpp_requirements_24.301.h +++ b/lte/gateway/c/core/oai/include/3gpp_requirements_24.301.h @@ -271,7 +271,7 @@ then process the challenge \ information as normal."*/ //- after sending the AUTHENTICATION FAILURE message with the EMM cause #20 "MAC // failure" the timer T3418 expires; //- the UE detects any combination of the authentication failures: EMM causes -//#20 "MAC failure" and #21 "synch failure", during three consecutive +// #20 "MAC failure" and #21 "synch failure", during three consecutive // authentication challenges. The authentication challenges shall be considered // as consecutive only, if the authentication challenges causing the second and // third authentication failure are received by the UE, while the timer T3418 or @@ -462,19 +462,19 @@ subclause 5.4.2.5)."*/ procedure;" #define R10_5_4_3_2__2_BRIEF "SMC initiation, reset DL NAS count, use SC" -//#define R10_5_4_3_2__3 "NAS security mode control initiation by the network -// The MME shall reset the downlink NAS COUNT counter and use it to integrity -// protect the initial SECURITY MODE COMMAND message if the security mode -// control procedure is initiated: -// - upon receipt of TRACKING AREA UPDATE REQUEST message including a GPRS -// ciphering key sequence -// number IE, if the MME wishes to create a mapped EPS security context -// (i.e. the type of security context flag is set to \"mapped security -// context\" in the NAS key set identifier IE included in the SECURITY MODE -// COMMAND message)." +// #define R10_5_4_3_2__3 "NAS security mode control initiation by the network +// The MME shall reset the downlink NAS COUNT counter and use it to +// integrity protect the initial SECURITY MODE COMMAND message if the +// security mode control procedure is initiated: +// - upon receipt of TRACKING AREA UPDATE REQUEST message including a GPRS +// ciphering key sequence +// number IE, if the MME wishes to create a mapped EPS security context +// (i.e. the type of security context flag is set to \"mapped security +// context\" in the NAS key set identifier IE included in the SECURITY +// MODE COMMAND message)." // Done for KASME (not K'ASME) but have to trace it -//#define R10_5_4_3_2__4 "NAS security mode control initiation by the network +// #define R10_5_4_3_2__4 "NAS security mode control initiation by the network // The MME shall send the SECURITY MODE COMMAND message unciphered, but shall // integrity protect the message with the NAS integrity key based on K ASME // or mapped K' ASME indicated by the eKSI included in the message. The MME @@ -740,12 +740,12 @@ subclause 5.4.2.5)."*/ an attach type set to \"EPS emergency attach\"." #define R10_5_5_1__1_BRIEF "" -//#define R10_5_5_1__2 "Attach procedure - General -// With a successful attach procedure, a context is established for the UE in -// the MME, and a default bearer is established between the UE and the PDN -// GW, thus enabling always-on IP connectivity to the UE. The network may -// also initiate the activation of dedicated bearers as part of the attach -// procedure." +// #define R10_5_5_1__2 "Attach procedure - General +// With a successful attach procedure, a context is established for the UE +// in the MME, and a default bearer is established between the UE and the +// PDN GW, thus enabling always-on IP connectivity to the UE. The network +// may also initiate the activation of dedicated bearers as part of the +// attach procedure." //... @@ -759,20 +759,20 @@ subclause 5.4.2.5)."*/ #define R10_5_5_1_2_3__1_BRIEF \ "EMM common procedure initiation during attach procedure" -//#define R10_5_5_1_2_3__2 "Attach procedure - EMM common procedure initiation -// If the network receives an ATTACH REQUEST message containing the Old GUTI -// type IE and the EPS mobile identity IE with type of identity indicating -// \"GUTI\", and the network does not follow the use of the most significant -// bit of the as specified in 3GPP TS 23.003 [2], -// subclause 2.8.2.2.2, the network shall use the Old GUTI type IE to -// determine whether the mobile identity included in the EPS mobile identity -// IE is a native GUTI or a mapped GUTI." - -//#define R10_5_5_1_2_3__3 "Attach procedure - EMM common procedure initiation -// During an attach for emergency bearer services, the MME may choose to skip -// the authentication procedure even if no EPS security context is available -// and proceed directly to the execution of the security mode control -// procedure as specified in subclause 5.4.3." +// #define R10_5_5_1_2_3__2 "Attach procedure - EMM common procedure initiation +// If the network receives an ATTACH REQUEST message containing the Old GUTI +// type IE and the EPS mobile identity IE with type of identity indicating +// \"GUTI\", and the network does not follow the use of the most significant +// bit of the as specified in 3GPP TS 23.003 [2], +// subclause 2.8.2.2.2, the network shall use the Old GUTI type IE to +// determine whether the mobile identity included in the EPS mobile identity +// IE is a native GUTI or a mapped GUTI." + +// #define R10_5_5_1_2_3__3 "Attach procedure - EMM common procedure initiation +// During an attach for emergency bearer services, the MME may choose to +// skip the authentication procedure even if no EPS security context is +// available and proceed directly to the execution of the security mode +// control procedure as specified in subclause 5.4.3." //------------------------------ @@ -1062,13 +1062,13 @@ subclause 5.4.2.5)."*/ // TAU //----------------------------------------------------------------------------------------------------------------------- -//#define R10_5_5_3_2_3__1 "EMM common procedure initiation -// If the network receives a TRACKING AREA UPDATE REQUEST message containing -// the Old GUTI type IE, and the network does not follow the use of the most -// significant bit of the to distinguish the node type as -// specified in 3GPP TS 23.003 [2], subclause 2.8.2.2.2, the network shall -// use the Old GUTI type IE to determine whether the mobile identity included -// in the Old GUTI IE is a native GUTI or a mapped GUTI." +// #define R10_5_5_3_2_3__1 "EMM common procedure initiation +// If the network receives a TRACKING AREA UPDATE REQUEST message containing +// the Old GUTI type IE, and the network does not follow the use of the most +// significant bit of the to distinguish the node type as +// specified in 3GPP TS 23.003 [2], subclause 2.8.2.2.2, the network shall +// use the Old GUTI type IE to determine whether the mobile identity +// included in the Old GUTI IE is a native GUTI or a mapped GUTI." #define R10_5_5_3_2_3__2 \ "EMM common procedure initiation \ @@ -1076,28 +1076,28 @@ subclause 5.4.2.5)."*/ authentication and security mode control procedures." #define R10_5_5_3_2_3__2_BRIEF "" -//#define R10_5_5_3_2_3__3 "EMM common procedure initiation -// The MME may be configured to skip the authentication procedure even if no -// EPS security context is available and proceed directly to the execution of -// the security mode control procedure as specified in subclause 5.4.3, -// during a tracking area updating procedure for a UE that has only a PDN -// connection for emergency bearer services."" - -//#define R10_5_5_3_2_3__4 "EMM common procedure initiation -// The MME shall not initiate an EMM authentication procedure before -// completion of the tracking area updating procedure, if the following -// conditions apply: a) the UE initiated the tracking area updating procedure -// after handover or inter-system handover to S1 mode; b) the target cell is -// a shared network cell; and -// -the UE has provided its GUTI in the Old GUTI IE or the Additional -// GUTI IE in the TRACKING AREA -// UPDATE REQUEST message, and the PLMN identity included in the GUTI is -// different from the selected PLMN identity of the target cell; or -// -the UE has mapped the P-TMSI and RAI into the Old GUTI IE and not -// included an Additional GUTI IE in -// the TRACKING AREA UPDATE REQUEST message, and the PLMN identity -// included in the RAI is different from the selected PLMN identity of -// the target cell." +// #define R10_5_5_3_2_3__3 "EMM common procedure initiation +// The MME may be configured to skip the authentication procedure even if no +// EPS security context is available and proceed directly to the execution +// of the security mode control procedure as specified in subclause 5.4.3, +// during a tracking area updating procedure for a UE that has only a PDN +// connection for emergency bearer services."" + +// #define R10_5_5_3_2_3__4 "EMM common procedure initiation +// The MME shall not initiate an EMM authentication procedure before +// completion of the tracking area updating procedure, if the following +// conditions apply: a) the UE initiated the tracking area updating +// procedure after handover or inter-system handover to S1 mode; b) the +// target cell is a shared network cell; and +// -the UE has provided its GUTI in the Old GUTI IE or the Additional +// GUTI IE in the TRACKING AREA +// UPDATE REQUEST message, and the PLMN identity included in the GUTI +// is different from the selected PLMN identity of the target cell; or +// -the UE has mapped the P-TMSI and RAI into the Old GUTI IE and not +// included an Additional GUTI IE in +// the TRACKING AREA UPDATE REQUEST message, and the PLMN identity +// included in the RAI is different from the selected PLMN identity of +// the target cell." //------------------------------ @@ -1145,356 +1145,368 @@ subclause 5.4.2.5)."*/ use it for the downlink transfer of signalling and user data." #define R10_5_5_3_2_4__4_BRIEF "" -//#define R10_5_5_3_2_4__5 "Normal and periodic tracking area updating procedure -// accepted by the network -// If an EPS bearer context status IE is included in the TRACKING AREA UPDATE -// REQUEST message, the MME shall deactivate all those EPS bearer contexts -// locally (without peer-to-peer signalling between the MME and the UE) which -// are active on the network side, but are indicated by the UE as being -// inactive. If a default EPS bearer context is marked as inactive in the EPS -// bearer context status IE included in the TRACKING AREA UPDATE REQUEST -// message, and this default bearer is not associated with the last PDN of -// the user in the MME, the MME shall locally deactivate all EPS bearer -// contexts associated to the PDN connection with the default EPS bearer -// context without peer-to-peer ESM signalling to the UE." - -//#define R10_5_5_3_2_4__6 "Normal and periodic tracking area updating procedure -// accepted by the network -// If the EPS bearer context status IE is included in the TRACKING AREA -// UPDATE REQUEST, the MME shall include an EPS bearer context status IE in -// the TRACKING AREA UPDATE ACCEPT message, indicating which EPS bearer -// contexts are active in the MME." - -//#define R10_5_5_3_2_4__7 "Normal and periodic tracking area updating procedure -// accepted by the network -// If the EPS update type IE included in the TRACKING AREA UPDATE REQUEST -// message indicates \"periodic updating\", and the UE was previously -// successfully attached for EPS and non-EPS services, subject to operator -// policies the MME should allocate a TAI list that does not span more than -// one location area." - -//#define R10_5_5_3_2_4__8 "Normal and periodic tracking area updating procedure -// accepted by the network -// If the TRACKING AREA UPDATE ACCEPT message contains T3412 extended value -// IE, then the UE shall use the T3412 extended value IE as periodic tracking -// area update timer (T3412). If the TRACKING AREA UPDATE ACCEPT contains -// T3412 value IE, but not T3412 extended value IE, then the UE shall use -// value in T3412 value IE as periodic tracking area update timer (T3412). If -// neither T3412 value IE nor T3412 extended value IE is included, the UE -// shall use the value currently stored, e.g. from a prior ATTACH ACCEPT or -// TRACKING AREA UPDATE ACCEPT message." - -//#define R10_5_5_3_2_4__9 "Normal and periodic tracking area updating procedure -// accepted by the network -// Also during the tracking area updating procedure without "active" flag, if -// the MME has deactivated EPS bearer context(s) locally for any reason, the -// MME shall inform the UE of the deactivated EPS bearer context(s) by -// including the EPS bearer context status IE in the TRACKING AREA UPDATE -// ACCEPT message." - -//#define R10_5_5_3_2_4__10 "Normal and periodic tracking area updating -// procedure accepted by the network -// If due to regional subscription restrictions or access restrictions the UE -// is not allowed to access the TA, but it has a PDN connection for emergency -// bearer services established, the MME may accept the TRACKING AREA UPDATE -// REQUEST message and deactivate all non-emergency EPS bearer contexts by -// initiating an EPS bearer context deactivation procedure when the TAU is -// initiated in EMM-CONNECTED mode. When the TAU is initiated in EMM- IDLE -// mode, the MME locally deactivates all non-emergency EPS bearer contexts -// and informs the UE via the EPS bearer context status IE in the TRACKING -// AREA UPDATE ACCEPT message. The MME shall not deactivate the emergency EPS -// bearer contexts. The network shall consider the UE to be attached for -// emergency bearer services only and shall indicate in the EPS update result -// IE in the TRACKING AREA UPDATE ACCEPT message that ISR is not activated." - -//#define R10_5_5_3_2_4__11 "Normal and periodic tracking area updating -// procedure accepted by the network -// If a TRACKING AREA UPDATE REQUEST message is received from a UE with a -// LIPA PDN connection, and if: -// - a GW Transport Layer Address IE value identifying a L-GW is provided by -// the lower layer together with the TRACKING AREA UPDATE REQUEST message, -// and the P-GW address included in the EPS bearer context of the LIPA PDN -// Connection is different from the provided GW Transport Layer Address IE -// value (see 3GPP TS 36.413 [36]); or -// - no GW Transport Layer Address is provided together with the tracking -// area update request by the lower layer, then the MME locally deactivates -// all EPS bearer contexts associated with the LIPA PDN connection. If active -// EPS bearer contexts remain for the UE and the TRACKING AREA UPDATE REQUEST -// request message is accepted, the MME informs the UE via the EPS bearer -// context status IE in the TRACKING AREA UPDATE ACCEPT message that EPS -// bearer contexts were locally deactivated." - -//#define R10_5_5_3_2_4__12 "Normal and periodic tracking area updating -// procedure accepted by the network -// For a shared network, the TAIs included in the TAI list can contain -// different PLMN identities. The MME indicates the selected core network -// operator PLMN identity to the UE in the GUTI (see 3GPP TS 23.251 [8B])." - -//#define R10_5_5_3_2_4__13 "Normal and periodic tracking area updating -// procedure accepted by the network -// If the "active" flag is included in the TRACKING AREA UPDATE REQUEST -// message, the MME shall re-establish the radio and S1 bearers for all -// active EPS bearer contexts." - -//#define R10_5_5_3_2_4__14 "Normal and periodic tracking area updating -// procedure accepted by the network -// If the "active" flag is not included in the TRACKING AREA UPDATE REQUEST -// message, the MME may also re- establish the radio and S1 bearers for all -// active EPS bearer contexts due to downlink pending data or downlink -// pending signalling." - -//#define R10_5_5_3_2_4__15 "Normal and periodic tracking area updating -// procedure accepted by the network -// Upon receiving a TRACKING AREA UPDATE ACCEPT message, the UE shall stop -// timer T3430, reset the tracking area updating attempt counter, enter state -// EMM-REGISTERED and set the EPS update status to EU1 UPDATED. If the -// message contains a GUTI, the UE shall use this GUTI as new temporary -// identity for EPS services and shall store the new GUTI. If no GUTI was -// included by the MME in the TRACKING AREA UPDATE ACCEPT message, the old -// GUTI shall be used. If the UE receives a new TAI list in the TRACKING AREA -// UPDATE ACCEPT message, the UE shall consider the new TAI list as valid and -// the old TAI list as invalid; otherwise, the UE shall consider the old TAI -// list as valid." - -//#define R10_5_5_3_2_4__16 "Normal and periodic tracking area updating -// procedure accepted by the network -// If the UE had initiated the tracking area updating procedure in EMM-IDLE -// mode to perform an inter-system change from A/Gb mode or Iu mode to S1 -// mode and the nonce UE was included in the TRACKING AREA UPDATE REQUEST -// message, the UE shall delete the nonce UE upon receipt of the TRACKING -// AREA UPDATE ACCEPT message." - -//#define R10_5_5_3_2_4__17 "Normal and periodic tracking area updating -// procedure accepted by the network -// If an EPS bearer context status IE is included in the TRACKING AREA UPDATE -// ACCEPT message, the UE shall deactivate all those EPS bearers contexts -// locally (without peer-to-peer signalling between the UE and the MME) which -// are active in the UE, but are indicated by the MME as being inactive. If a -// default EPS bearer context is marked as inactive in the EPS bearer context -// status IE included in the TRACKING AREA UPDATE ACCEPT message, and this -// default bearer is not associated with the last PDN in the UE, the UE shall -// locally deactivate all EPS bearer contexts associated to the PDN -// connection with the default EPS bearer context without peer-to-peer ESM -// signalling to the MME. If only the PDN connection for emergency bearer -// services remains established, the UE shall consider itself attached for -// emergency bearer services only." - -//#define R10_5_5_3_2_4__18 "Normal and periodic tracking area updating -// procedure accepted by the network -// The MME may also include of list of equivalent PLMNs in the TRACKING AREA -// UPDATE ACCEPT message. Each entry in the list contains a PLMN code -// (MCC+MNC). The UE shall store the list as provided by the network, and if -// there is no PDN connection for emergency bearer services established, the -// UE shall remove from the list any PLMN code that is already in the list of -// forbidden PLMNs. If there is a PDN connection for emergency bearer -// services established, the UE shall remove from the list of equivalent -// PLMNs any PLMN code present in the list of forbidden PLMNs when the PDN -// connection for emergency bearer services is released. In addition, the UE -// shall add to the stored list the PLMN code of the registered PLMN that -// sent the list. The UE shall replace the stored list on each receipt of the -// TRACKING AREA UPDATE ACCEPT message. If the TRACKING AREA UPDATE ACCEPT -// message does not contain a list, then the UE shall delete the stored -// list." - -//#define R10_5_5_3_2_4__19 "Normal and periodic tracking area updating -// procedure accepted by the network -// The network may also indicate in the EPS update result IE in the TRACKING -// AREA UPDATE ACCEPT message that ISR is active. If the UE is attached for -// emergency bearer services, the network shall indicate in the EPS update -// result IE in the TRACKING AREA UPDATE ACCEPT message that ISR is not -// activated. If the TRACKING AREA UPDATE ACCEPT message contains: i) no -// indication that ISR is activated, the UE shall set the TIN to "GUTI"; ii) -// an indication that ISR is activated, then: -// - if the UE is required to perform routing area updating for IMS voice -// termination as specified in -// 3GPP TS 24.008 [13], annex P.5, the UE shall set the TIN to "GUTI"; -// - if the UE had initiated the tracking area updating procedure due to a -// change in UE network capability or -// change in DRX parameters, the UE shall set the TIN to "GUTI"; or -// - the UE shall regard a previously assigned P-TMSI and RAI as valid and -// registered with the network. If the -// TIN currently indicates "P-TMSI" and the periodic routing area update -// timer T3312 is running, the UE shall set the TIN to "RAT-related -// TMSI". If the TIN currently indicates "P-TMSI" and the periodic -// routing area update timer T3312 has already expired, the UE shall set -// the TIN to "GUTI"." - -//#define R10_5_5_3_2_4__20 "Normal and periodic tracking area updating -// procedure accepted by the network -// The network informs the UE about the support of specific features, such as -// IMS voice over PS session, location services (EPC-LCS, CS-LCS) or -// emergency bearer services, in the EPS network feature support information -// element. In a UE with IMS voice over PS capability, the IMS voice over PS -// session indicator and the emergency bearer services indicator shall be -// provided to the upper layers. The upper layers take the IMS voice over PS -// session indicator into account as specified in 3GPP TS 23.221 [8A], -// subclause 7.2a and subclause 7.2b, when selecting the access domain for -// voice sessions or calls. When initiating an emergency call, the upper -// layers also take the emergency bearer services indicator into account for -// the access domain selection. When the UE determines via the IMS voice over -// PS session indicator that the network does not support IMS voice over PS -// sessions in S1 mode, then the UE shall not locally release any persistent -// EPS bearer context. When the UE determines via the emergency bearer -// services indicator that the network does not support emergency bearer -// services in S1 mode, then the UE shall not locally release any emergency -// EPS bearer context if there is a radio bearer associated with that -// context. In a UE with LCS capability, location services indicators -// (EPC-LCS, CS-LCS) shall be provided to the upper layers. When MO-LR -// procedure is triggered by the UE's application, those indicators are taken -// into account as specified in 3GPP TS 24.171 [13C]." - -//#define R10_5_5_3_2_4__21 "Normal and periodic tracking area updating -// procedure accepted by the network -// If the UE has initiated the tracking area updating procedure due to manual -// CSG selection and receives a TRACKING AREA UPDATE ACCEPT message, and the -// UE sent the TRACKING AREA UPDATE REQUEST message in a CSG cell, the UE -// shall check if the CSG ID and associated PLMN identity of the cell where -// the UE has sent the TRACKING AREA UPDATE REQUEST message are contained in -// the Allowed CSG list. If not, the UE shall add that CSG ID and associated -// PLMN identity to the Allowed CSG list and the UE may add the HNB Name (if -// provided by lower layers) to the Allowed CSG list if the HNB Name is -// present in neither the Operator CSG list nor the Allowed CSG list." - -//#define R10_5_5_3_2_4__22 "Normal and periodic tracking area updating -// procedure accepted by the network -// If the TRACKING AREA UPDATE ACCEPT message contained a GUTI, the UE shall -// return a TRACKING AREA UPDATE COMPLETE message to the MME to acknowledge -// the received GUTI." - -//#define R10_5_5_3_2_4__23 "Normal and periodic tracking area updating -// procedure accepted by the network -// Upon receiving a TRACKING AREA UPDATE COMPLETE message, the MME shall stop -// timer T3450, and shall consider the GUTI sent in the TRACKING AREA UPDATE -// ACCEPT message as valid." +// #define R10_5_5_3_2_4__5 "Normal and periodic tracking area updating +// procedure +// accepted by the network +// If an EPS bearer context status IE is included in the TRACKING AREA +// UPDATE REQUEST message, the MME shall deactivate all those EPS bearer +// contexts locally (without peer-to-peer signalling between the MME and the +// UE) which are active on the network side, but are indicated by the UE as +// being inactive. If a default EPS bearer context is marked as inactive in +// the EPS bearer context status IE included in the TRACKING AREA UPDATE +// REQUEST message, and this default bearer is not associated with the last +// PDN of the user in the MME, the MME shall locally deactivate all EPS +// bearer contexts associated to the PDN connection with the default EPS +// bearer context without peer-to-peer ESM signalling to the UE." + +// #define R10_5_5_3_2_4__6 "Normal and periodic tracking area updating +// procedure +// accepted by the network +// If the EPS bearer context status IE is included in the TRACKING AREA +// UPDATE REQUEST, the MME shall include an EPS bearer context status IE in +// the TRACKING AREA UPDATE ACCEPT message, indicating which EPS bearer +// contexts are active in the MME." + +// #define R10_5_5_3_2_4__7 "Normal and periodic tracking area updating +// procedure +// accepted by the network +// If the EPS update type IE included in the TRACKING AREA UPDATE REQUEST +// message indicates \"periodic updating\", and the UE was previously +// successfully attached for EPS and non-EPS services, subject to operator +// policies the MME should allocate a TAI list that does not span more than +// one location area." + +// #define R10_5_5_3_2_4__8 "Normal and periodic tracking area updating +// procedure +// accepted by the network +// If the TRACKING AREA UPDATE ACCEPT message contains T3412 extended value +// IE, then the UE shall use the T3412 extended value IE as periodic +// tracking area update timer (T3412). If the TRACKING AREA UPDATE ACCEPT +// contains T3412 value IE, but not T3412 extended value IE, then the UE +// shall use value in T3412 value IE as periodic tracking area update timer +// (T3412). If neither T3412 value IE nor T3412 extended value IE is +// included, the UE shall use the value currently stored, e.g. from a prior +// ATTACH ACCEPT or TRACKING AREA UPDATE ACCEPT message." + +// #define R10_5_5_3_2_4__9 "Normal and periodic tracking area updating +// procedure +// accepted by the network +// Also during the tracking area updating procedure without "active" flag, +// if the MME has deactivated EPS bearer context(s) locally for any reason, +// the MME shall inform the UE of the deactivated EPS bearer context(s) by +// including the EPS bearer context status IE in the TRACKING AREA UPDATE +// ACCEPT message." + +// #define R10_5_5_3_2_4__10 "Normal and periodic tracking area updating +// procedure accepted by the network +// If due to regional subscription restrictions or access restrictions the +// UE is not allowed to access the TA, but it has a PDN connection for +// emergency bearer services established, the MME may accept the TRACKING +// AREA UPDATE REQUEST message and deactivate all non-emergency EPS bearer +// contexts by initiating an EPS bearer context deactivation procedure when +// the TAU is initiated in EMM-CONNECTED mode. When the TAU is initiated in +// EMM- IDLE mode, the MME locally deactivates all non-emergency EPS bearer +// contexts and informs the UE via the EPS bearer context status IE in the +// TRACKING AREA UPDATE ACCEPT message. The MME shall not deactivate the +// emergency EPS bearer contexts. The network shall consider the UE to be +// attached for emergency bearer services only and shall indicate in the EPS +// update result IE in the TRACKING AREA UPDATE ACCEPT message that ISR is +// not activated." + +// #define R10_5_5_3_2_4__11 "Normal and periodic tracking area updating +// procedure accepted by the network +// If a TRACKING AREA UPDATE REQUEST message is received from a UE with a +// LIPA PDN connection, and if: +// - a GW Transport Layer Address IE value identifying a L-GW is provided by +// the lower layer together with the TRACKING AREA UPDATE REQUEST message, +// and the P-GW address included in the EPS bearer context of the LIPA PDN +// Connection is different from the provided GW Transport Layer Address IE +// value (see 3GPP TS 36.413 [36]); or +// - no GW Transport Layer Address is provided together with the tracking +// area update request by the lower layer, then the MME locally deactivates +// all EPS bearer contexts associated with the LIPA PDN connection. If +// active EPS bearer contexts remain for the UE and the TRACKING AREA UPDATE +// REQUEST request message is accepted, the MME informs the UE via the EPS +// bearer context status IE in the TRACKING AREA UPDATE ACCEPT message that +// EPS bearer contexts were locally deactivated." + +// #define R10_5_5_3_2_4__12 "Normal and periodic tracking area updating +// procedure accepted by the network +// For a shared network, the TAIs included in the TAI list can contain +// different PLMN identities. The MME indicates the selected core network +// operator PLMN identity to the UE in the GUTI (see 3GPP TS 23.251 [8B])." + +// #define R10_5_5_3_2_4__13 "Normal and periodic tracking area updating +// procedure accepted by the network +// If the "active" flag is included in the TRACKING AREA UPDATE REQUEST +// message, the MME shall re-establish the radio and S1 bearers for all +// active EPS bearer contexts." + +// #define R10_5_5_3_2_4__14 "Normal and periodic tracking area updating +// procedure accepted by the network +// If the "active" flag is not included in the TRACKING AREA UPDATE REQUEST +// message, the MME may also re- establish the radio and S1 bearers for all +// active EPS bearer contexts due to downlink pending data or downlink +// pending signalling." + +// #define R10_5_5_3_2_4__15 "Normal and periodic tracking area updating +// procedure accepted by the network +// Upon receiving a TRACKING AREA UPDATE ACCEPT message, the UE shall stop +// timer T3430, reset the tracking area updating attempt counter, enter +// state EMM-REGISTERED and set the EPS update status to EU1 UPDATED. If the +// message contains a GUTI, the UE shall use this GUTI as new temporary +// identity for EPS services and shall store the new GUTI. If no GUTI was +// included by the MME in the TRACKING AREA UPDATE ACCEPT message, the old +// GUTI shall be used. If the UE receives a new TAI list in the TRACKING +// AREA UPDATE ACCEPT message, the UE shall consider the new TAI list as +// valid and the old TAI list as invalid; otherwise, the UE shall consider +// the old TAI list as valid." + +// #define R10_5_5_3_2_4__16 "Normal and periodic tracking area updating +// procedure accepted by the network +// If the UE had initiated the tracking area updating procedure in EMM-IDLE +// mode to perform an inter-system change from A/Gb mode or Iu mode to S1 +// mode and the nonce UE was included in the TRACKING AREA UPDATE REQUEST +// message, the UE shall delete the nonce UE upon receipt of the TRACKING +// AREA UPDATE ACCEPT message." + +// #define R10_5_5_3_2_4__17 "Normal and periodic tracking area updating +// procedure accepted by the network +// If an EPS bearer context status IE is included in the TRACKING AREA +// UPDATE ACCEPT message, the UE shall deactivate all those EPS bearers +// contexts locally (without peer-to-peer signalling between the UE and the +// MME) which are active in the UE, but are indicated by the MME as being +// inactive. If a default EPS bearer context is marked as inactive in the +// EPS bearer context status IE included in the TRACKING AREA UPDATE ACCEPT +// message, and this default bearer is not associated with the last PDN in +// the UE, the UE shall locally deactivate all EPS bearer contexts +// associated to the PDN connection with the default EPS bearer context +// without peer-to-peer ESM signalling to the MME. If only the PDN +// connection for emergency bearer services remains established, the UE +// shall consider itself attached for emergency bearer services only." + +// #define R10_5_5_3_2_4__18 "Normal and periodic tracking area updating +// procedure accepted by the network +// The MME may also include of list of equivalent PLMNs in the TRACKING AREA +// UPDATE ACCEPT message. Each entry in the list contains a PLMN code +// (MCC+MNC). The UE shall store the list as provided by the network, and if +// there is no PDN connection for emergency bearer services established, the +// UE shall remove from the list any PLMN code that is already in the list +// of forbidden PLMNs. If there is a PDN connection for emergency bearer +// services established, the UE shall remove from the list of equivalent +// PLMNs any PLMN code present in the list of forbidden PLMNs when the PDN +// connection for emergency bearer services is released. In addition, the UE +// shall add to the stored list the PLMN code of the registered PLMN that +// sent the list. The UE shall replace the stored list on each receipt of +// the TRACKING AREA UPDATE ACCEPT message. If the TRACKING AREA UPDATE +// ACCEPT message does not contain a list, then the UE shall delete the +// stored list." + +// #define R10_5_5_3_2_4__19 "Normal and periodic tracking area updating +// procedure accepted by the network +// The network may also indicate in the EPS update result IE in the TRACKING +// AREA UPDATE ACCEPT message that ISR is active. If the UE is attached for +// emergency bearer services, the network shall indicate in the EPS update +// result IE in the TRACKING AREA UPDATE ACCEPT message that ISR is not +// activated. If the TRACKING AREA UPDATE ACCEPT message contains: i) no +// indication that ISR is activated, the UE shall set the TIN to "GUTI"; ii) +// an indication that ISR is activated, then: +// - if the UE is required to perform routing area updating for IMS voice +// termination as specified in +// 3GPP TS 24.008 [13], annex P.5, the UE shall set the TIN to "GUTI"; +// - if the UE had initiated the tracking area updating procedure due to a +// change in UE network capability or +// change in DRX parameters, the UE shall set the TIN to "GUTI"; or +// - the UE shall regard a previously assigned P-TMSI and RAI as valid and +// registered with the network. If the +// TIN currently indicates "P-TMSI" and the periodic routing area update +// timer T3312 is running, the UE shall set the TIN to "RAT-related +// TMSI". If the TIN currently indicates "P-TMSI" and the periodic +// routing area update timer T3312 has already expired, the UE shall set +// the TIN to "GUTI"." + +// #define R10_5_5_3_2_4__20 "Normal and periodic tracking area updating +// procedure accepted by the network +// The network informs the UE about the support of specific features, such +// as IMS voice over PS session, location services (EPC-LCS, CS-LCS) or +// emergency bearer services, in the EPS network feature support information +// element. In a UE with IMS voice over PS capability, the IMS voice over PS +// session indicator and the emergency bearer services indicator shall be +// provided to the upper layers. The upper layers take the IMS voice over PS +// session indicator into account as specified in 3GPP TS 23.221 [8A], +// subclause 7.2a and subclause 7.2b, when selecting the access domain for +// voice sessions or calls. When initiating an emergency call, the upper +// layers also take the emergency bearer services indicator into account for +// the access domain selection. When the UE determines via the IMS voice +// over PS session indicator that the network does not support IMS voice +// over PS sessions in S1 mode, then the UE shall not locally release any +// persistent EPS bearer context. When the UE determines via the emergency +// bearer services indicator that the network does not support emergency +// bearer services in S1 mode, then the UE shall not locally release any +// emergency EPS bearer context if there is a radio bearer associated with +// that context. In a UE with LCS capability, location services indicators +// (EPC-LCS, CS-LCS) shall be provided to the upper layers. When MO-LR +// procedure is triggered by the UE's application, those indicators are +// taken into account as specified in 3GPP TS 24.171 [13C]." + +// #define R10_5_5_3_2_4__21 "Normal and periodic tracking area updating +// procedure accepted by the network +// If the UE has initiated the tracking area updating procedure due to +// manual CSG selection and receives a TRACKING AREA UPDATE ACCEPT message, +// and the UE sent the TRACKING AREA UPDATE REQUEST message in a CSG cell, +// the UE shall check if the CSG ID and associated PLMN identity of the cell +// where the UE has sent the TRACKING AREA UPDATE REQUEST message are +// contained in the Allowed CSG list. If not, the UE shall add that CSG ID +// and associated PLMN identity to the Allowed CSG list and the UE may add +// the HNB Name (if provided by lower layers) to the Allowed CSG list if the +// HNB Name is present in neither the Operator CSG list nor the Allowed CSG +// list." + +// #define R10_5_5_3_2_4__22 "Normal and periodic tracking area updating +// procedure accepted by the network +// If the TRACKING AREA UPDATE ACCEPT message contained a GUTI, the UE shall +// return a TRACKING AREA UPDATE COMPLETE message to the MME to acknowledge +// the received GUTI." + +// #define R10_5_5_3_2_4__23 "Normal and periodic tracking area updating +// procedure accepted by the network +// Upon receiving a TRACKING AREA UPDATE COMPLETE message, the MME shall +// stop timer T3450, and shall consider the GUTI sent in the TRACKING AREA +// UPDATE ACCEPT message as valid." //... //------------------------------ -//#define R10_5_5_3_2_5__1 "Normal and periodic tracking area updating procedure -// not accepted by the network -// If the tracking area updating cannot be accepted by the network, the MME -// sends a TRACKING AREA UPDATE REJECT message to the UE including an -// appropriate EMM cause value." - -//#define R10_5_5_3_2_5__2 "Normal and periodic tracking area updating procedure -// not accepted by the network -// If the MME locally deactivates EPS bearer contexts for the UE (see -// subclause 5.5.3.2.4) and no active EPS bearer contexts remain for the UE, -// the MME shall send the TRACKING AREA UPDATE REJECT message including the -// EMM cause value #10 "Implicitly detached"." - -//#define R10_5_5_3_2_5__3 "Normal and periodic tracking area updating procedure -// not accepted by the network -// If the tracking area update request is rejected due to general NAS level -// mobility management congestion control, the network shall set the EMM -// cause value to #22 "congestion" and assign a back-off timer T3346." - -//#define R10_5_5_3_2_5__4 "Normal and periodic tracking area updating procedure -// not accepted by the network -// Upon receiving the TRACKING AREA UPDATE REJECT message, the UE shall stop -// timer T3430, stop any transmission of user data, and take the following -// actions depending on the EMM cause value received. #3 (Illegal UE); or #6 -// (Illegal ME); -// The UE shall set the EPS update status to EU3 ROAMING NOT ALLOWED (and -// shall store it according to subclause 5.1.3.3) and shall delete any -// GUTI, last visited registered TAI, TAI list and eKSI. The UE shall -// consider the USIM as invalid for EPS services until switching off or the -// UICC containing the USIM is removed. The UE shall delete the list of -// equivalent PLMNs and shall enter the state EMM-DEREGISTERED. If A/Gb -// mode or Iu mode is supported by the UE, the UE shall handle the GMM -// parameters GMM state, GPRS update status, P-TMSI, P-TMSI signature, RAI -// and GPRS ciphering key sequence number and the MM parameters update -// status, TMSI, LAI and ciphering key sequence number as specified in 3GPP -// TS 24.008 [13] for the case when the normal routing area updating -// procedure is rejected with the GMM cause with the same value. The USIM -// shall be considered as invalid also for non-EPS services until switching -// off or the UICC containing the USIM is removed. -// NOTE 1: The possibility to configure a UE so that the radio transceiver -// for a specific radio access technology is not -// active, although it is implemented in the UE, is out of scope of the -// present specification. -// #7 (EPS services not allowed); -// The UE shall set the EPS update status to EU3 ROAMING NOT ALLOWED (and -// shall store it according to subclause 5.1.3.3) and shall delete any -// GUTI, last visited registered TAI, TAI list and eKSI. The UE shall -// consider the USIM as invalid for EPS services until switching off or the -// UICC containing the USIM is removed. The UE shall delete the list of -// equivalent PLMNs and shall enter the state EMM-DEREGISTERED. If the EPS -// update type is "periodic updating", a UE in CS/PS mode 1 or CS/PS mode 2 -// of operation is still IMSI attached for non-EPS services. The UE shall -// select GERAN or UTRAN radio access technology and proceed with -// appropriate MM specific procedure according to the MM service state. The -// UE shall not reselect E-UTRAN radio access technology until switching -// off or the UICC containing the USIM is removed. -// ... +// #define R10_5_5_3_2_5__1 "Normal and periodic tracking area updating +// procedure +// not accepted by the network +// If the tracking area updating cannot be accepted by the network, the MME +// sends a TRACKING AREA UPDATE REJECT message to the UE including an +// appropriate EMM cause value." + +// #define R10_5_5_3_2_5__2 "Normal and periodic tracking area updating +// procedure +// not accepted by the network +// If the MME locally deactivates EPS bearer contexts for the UE (see +// subclause 5.5.3.2.4) and no active EPS bearer contexts remain for the UE, +// the MME shall send the TRACKING AREA UPDATE REJECT message including the +// EMM cause value #10 "Implicitly detached"." + +// #define R10_5_5_3_2_5__3 "Normal and periodic tracking area updating +// procedure +// not accepted by the network +// If the tracking area update request is rejected due to general NAS level +// mobility management congestion control, the network shall set the EMM +// cause value to #22 "congestion" and assign a back-off timer T3346." + +// #define R10_5_5_3_2_5__4 "Normal and periodic tracking area updating +// procedure +// not accepted by the network +// Upon receiving the TRACKING AREA UPDATE REJECT message, the UE shall stop +// timer T3430, stop any transmission of user data, and take the following +// actions depending on the EMM cause value received. #3 (Illegal UE); or #6 +// (Illegal ME); +// The UE shall set the EPS update status to EU3 ROAMING NOT ALLOWED (and +// shall store it according to subclause 5.1.3.3) and shall delete any +// GUTI, last visited registered TAI, TAI list and eKSI. The UE shall +// consider the USIM as invalid for EPS services until switching off or +// the UICC containing the USIM is removed. The UE shall delete the list +// of equivalent PLMNs and shall enter the state EMM-DEREGISTERED. If A/Gb +// mode or Iu mode is supported by the UE, the UE shall handle the GMM +// parameters GMM state, GPRS update status, P-TMSI, P-TMSI signature, RAI +// and GPRS ciphering key sequence number and the MM parameters update +// status, TMSI, LAI and ciphering key sequence number as specified in +// 3GPP TS 24.008 [13] for the case when the normal routing area updating +// procedure is rejected with the GMM cause with the same value. The USIM +// shall be considered as invalid also for non-EPS services until +// switching off or the UICC containing the USIM is removed. +// NOTE 1: The possibility to configure a UE so that the radio transceiver +// for a specific radio access technology is not +// active, although it is implemented in the UE, is out of scope of the +// present specification. +// #7 (EPS services not allowed); +// The UE shall set the EPS update status to EU3 ROAMING NOT ALLOWED (and +// shall store it according to subclause 5.1.3.3) and shall delete any +// GUTI, last visited registered TAI, TAI list and eKSI. The UE shall +// consider the USIM as invalid for EPS services until switching off or +// the UICC containing the USIM is removed. The UE shall delete the list +// of equivalent PLMNs and shall enter the state EMM-DEREGISTERED. If the +// EPS update type is "periodic updating", a UE in CS/PS mode 1 or CS/PS +// mode 2 of operation is still IMSI attached for non-EPS services. The UE +// shall select GERAN or UTRAN radio access technology and proceed with +// appropriate MM specific procedure according to the MM service state. +// The UE shall not reselect E-UTRAN radio access technology until +// switching off or the UICC containing the USIM is removed. +// ... //------------------------------ -//#define R10_5_5_3_2_7_a "Abnormal cases on the network side -// If a lower layer failure occurs before the message TRACKING AREA UPDATE -// COMPLETE has been received from the UE and a GUTI has been assigned, the -// network shall abort the procedure and shall consider both, the old and new -// GUTI as valid until the old GUTI can be considered as invalid by the -// network (see subclause 5.4.1.4). During this period the network may use -// the identification procedure followed by a GUTI reallocation procedure if -// the old GUTI is used by the UE in a subsequent message. The network may -// page with IMSI if paging with old and new S-TMSI fails. Paging with IMSI -// causes the UE to re-attach as described in subclause 5.6.2.2.2." - -//#define R10_5_5_3_2_7_b "Abnormal cases on the network side -// Protocol error -// If the TRACKING AREA UPDATE REQUEST message has been received with a -// protocol error, the network shall return a TRACKING AREA UPDATE REJECT -// message with one of the following EMM cause values: #96: invalid mandatory -// information element error; #99: information element non-existent or not -// implemented; #100: conditional IE error; or #111: protocol error, -// unspecified." - -//#define R10_5_5_3_2_7_c "Abnormal cases on the network side -// T3450 time-out -// On the first expiry of the timer, the network shall retransmit the -// TRACKING AREA UPDATE ACCEPT message and shall reset and restart timer -// T3450. The retransmission is performed four times, i.e. on the fifth -// expiry of timer T3450, the tracking area updating procedure is aborted. -// Both, the old and the new GUTI shall be considered as valid until the old -// GUTI can be considered as invalid by the network (see subclause 5.4.1.4). -// During this period the network acts as described for case a above." - -//#define R10_5_5_3_2_7_d "Abnormal cases on the network side -// TRACKING AREA UPDATE REQUEST received after the TRACKING AREA UPDATE -// ACCEPT message has been sent and before the TRACKING AREA UPDATE COMPLETE -// message is received -// - If one or more of the information elements in the TRACKING AREA UPDATE -// REQUEST message differ from the ones received within the previous TRACKING -// AREA UPDATE REQUEST message, the previously initiated tracking area -// updating procedure shall be aborted if the TRACKING AREA UPDATE COMPLETE -// message has not been received and the new tracking area updating procedure -// shall be progressed; or -// - if the information elements do not differ, then the TRACKING AREA UPDATE -// ACCEPT message shall be resent and the timer T3450 shall be restarted if -// an TRACKING AREA UPDATE COMPLETE message is expected. In that case, the -// retransmission counter related to T3450 is not incremented." - -//#define R10_5_5_3_2_7_e "Abnormal cases on the network side -// More than one TRACKING AREA UPDATE REQUEST received and no TRACKING AREA -// UPDATE ACCEPT or TRACKING AREA UPDATE REJECT message has been sent -// - If one or more of the information elements in the TRACKING AREA UPDATE -// REQUEST message differs from the ones received within the previous -// TRACKING AREA UPDATE REQUEST message, the previously initiated tracking -// area updating procedure shall be aborted and the new tracking area -// updating procedure shall be progressed; -// - if the information elements do not differ, then the network shall -// continue with the previous tracking area updating procedure and shall not -// treat any further this TRACKING AREA UPDATE REQUEST message. - -//#define R10_5_5_3_2_7_f "Abnormal cases on the network side -// Lower layers indication of non-delivered NAS PDU due to handover -// If the TRACKING AREA UPDATE ACCEPT message or TRACKING AREA UPDATE REJECT -// message could not be delivered due to handover then the MME shall -// retransmit the TRACKING AREA UPDATE ACCEPT message or TRACKING AREA UPDATE -// REJECT message if the failure of handover procedure is reported by the -// lower layer and the S1 signalling connection exists. +// #define R10_5_5_3_2_7_a "Abnormal cases on the network side +// If a lower layer failure occurs before the message TRACKING AREA UPDATE +// COMPLETE has been received from the UE and a GUTI has been assigned, the +// network shall abort the procedure and shall consider both, the old and +// new GUTI as valid until the old GUTI can be considered as invalid by the +// network (see subclause 5.4.1.4). During this period the network may use +// the identification procedure followed by a GUTI reallocation procedure if +// the old GUTI is used by the UE in a subsequent message. The network may +// page with IMSI if paging with old and new S-TMSI fails. Paging with IMSI +// causes the UE to re-attach as described in subclause 5.6.2.2.2." + +// #define R10_5_5_3_2_7_b "Abnormal cases on the network side +// Protocol error +// If the TRACKING AREA UPDATE REQUEST message has been received with a +// protocol error, the network shall return a TRACKING AREA UPDATE REJECT +// message with one of the following EMM cause values: #96: invalid +// mandatory information element error; #99: information element +// non-existent or not implemented; #100: conditional IE error; or #111: +// protocol error, unspecified." + +// #define R10_5_5_3_2_7_c "Abnormal cases on the network side +// T3450 time-out +// On the first expiry of the timer, the network shall retransmit the +// TRACKING AREA UPDATE ACCEPT message and shall reset and restart timer +// T3450. The retransmission is performed four times, i.e. on the fifth +// expiry of timer T3450, the tracking area updating procedure is aborted. +// Both, the old and the new GUTI shall be considered as valid until the old +// GUTI can be considered as invalid by the network (see subclause 5.4.1.4). +// During this period the network acts as described for case a above." + +// #define R10_5_5_3_2_7_d "Abnormal cases on the network side +// TRACKING AREA UPDATE REQUEST received after the TRACKING AREA UPDATE +// ACCEPT message has been sent and before the TRACKING AREA UPDATE COMPLETE +// message is received +// - If one or more of the information elements in the TRACKING AREA UPDATE +// REQUEST message differ from the ones received within the previous +// TRACKING AREA UPDATE REQUEST message, the previously initiated tracking +// area updating procedure shall be aborted if the TRACKING AREA UPDATE +// COMPLETE message has not been received and the new tracking area updating +// procedure shall be progressed; or +// - if the information elements do not differ, then the TRACKING AREA +// UPDATE ACCEPT message shall be resent and the timer T3450 shall be +// restarted if an TRACKING AREA UPDATE COMPLETE message is expected. In +// that case, the retransmission counter related to T3450 is not +// incremented." + +// #define R10_5_5_3_2_7_e "Abnormal cases on the network side +// More than one TRACKING AREA UPDATE REQUEST received and no TRACKING AREA +// UPDATE ACCEPT or TRACKING AREA UPDATE REJECT message has been sent +// - If one or more of the information elements in the TRACKING AREA UPDATE +// REQUEST message differs from the ones received within the previous +// TRACKING AREA UPDATE REQUEST message, the previously initiated tracking +// area updating procedure shall be aborted and the new tracking area +// updating procedure shall be progressed; +// - if the information elements do not differ, then the network shall +// continue with the previous tracking area updating procedure and shall not +// treat any further this TRACKING AREA UPDATE REQUEST message. + +// #define R10_5_5_3_2_7_f "Abnormal cases on the network side +// Lower layers indication of non-delivered NAS PDU due to handover +// If the TRACKING AREA UPDATE ACCEPT message or TRACKING AREA UPDATE REJECT +// message could not be delivered due to handover then the MME shall +// retransmit the TRACKING AREA UPDATE ACCEPT message or TRACKING AREA +// UPDATE REJECT message if the failure of handover procedure is reported by +// the lower layer and the S1 signalling connection exists. #define R10_9_9_3_7_1__1 \ "Detach type information element - Type of detach \ All other values are interpreted as 'combined EPS/IMSI detach' in this version of the \ diff --git a/lte/gateway/c/core/oai/include/amf_securityDef.h b/lte/gateway/c/core/oai/include/amf_securityDef.h index 0c585a5607a5..0dc3bfe89558 100644 --- a/lte/gateway/c/core/oai/include/amf_securityDef.h +++ b/lte/gateway/c/core/oai/include/amf_securityDef.h @@ -53,7 +53,7 @@ namespace magma5g { #define AUTH_NEXT_HOP_SIZE AUTH_KASME_SIZE /* Next Hop security parameter*/ /* "Separation bit" of AMF field */ -#define AUTH_AMF_SEPARATION_BIT(a) ((a)&0x80) +#define AUTH_AMF_SEPARATION_BIT(a) ((a) & 0x80) /* * -------------------------------------------------------------------------- * 5G CN NAS security context handled by 5G CN Mobility Management sublayer in diff --git a/lte/gateway/c/core/oai/include/n11_messages_types.h b/lte/gateway/c/core/oai/include/n11_messages_types.h index ff8d95baaec5..c9303acee078 100644 --- a/lte/gateway/c/core/oai/include/n11_messages_types.h +++ b/lte/gateway/c/core/oai/include/n11_messages_types.h @@ -337,7 +337,7 @@ typedef struct transport_layer_s { typedef enum { NORMAL_RELEASE, - AUTHENTICATION_FAILURE_NAS, //#defined on AUTHENTICATION_FAILURE + AUTHENTICATION_FAILURE_NAS, // #defined on AUTHENTICATION_FAILURE DEREGISTER, UNSPECIFIED_NAS_CAUSE, } NAS_cause; diff --git a/lte/gateway/c/core/oai/include/nas/securityDef.hpp b/lte/gateway/c/core/oai/include/nas/securityDef.hpp index 36c0b3237344..6b0028bb96f2 100644 --- a/lte/gateway/c/core/oai/include/nas/securityDef.hpp +++ b/lte/gateway/c/core/oai/include/nas/securityDef.hpp @@ -70,7 +70,7 @@ Description Contains global security definitions #define AUTH_KGNB_SIZE AUTH_KASME_SIZE /* gNodeB security key */ /* "Separation bit" of AMF field */ -#define AUTH_AMF_SEPARATION_BIT(a) ((a)&0x80) +#define AUTH_AMF_SEPARATION_BIT(a) ((a) & 0x80) /* * -------------------------------------------------------------------------- * EPS NAS security context handled by EPS Mobility Management sublayer in diff --git a/lte/gateway/c/core/oai/lib/3gpp/3gpp_23.003.h b/lte/gateway/c/core/oai/lib/3gpp/3gpp_23.003.h index adefc8966bee..12ea71be99e4 100644 --- a/lte/gateway/c/core/oai/lib/3gpp/3gpp_23.003.h +++ b/lte/gateway/c/core/oai/lib/3gpp/3gpp_23.003.h @@ -163,8 +163,7 @@ typedef uint32_t typedef uint16_t mme_gid_t; /*!< \brief MME Group ID shall be of 16 bits length. */ -typedef uint8_t - mme_code_t; /*!< \brief MME Code shall be of 8 bits length. */ +typedef uint8_t mme_code_t; /*!< \brief MME Code shall be of 8 bits length. */ /*! \struct gummei_t * \brief Structure containing the Globally Unique MME Identity. @@ -196,8 +195,7 @@ typedef struct s_tmsi_s { //----------------- 5G Globally Unique Temporary UE Identity (GUTI)------------- typedef uint16_t amf_gid_t; /*!< \brief AMF Group ID shall be of 16 bits length. */ -typedef uint8_t - amf_code_t; /*!< \brief AMF Code shall be of 8 bits length. */ +typedef uint8_t amf_code_t; /*!< \brief AMF Code shall be of 8 bits length. */ typedef uint8_t amf_Pointer_t; // 9.3.3.19 AMF Pointer is used to identify one // or more AMF(s) within the AMF Set. /*! \struct guamfi_t diff --git a/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.008.h b/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.008.h index f334fa541eb3..8eff1b1c7609 100644 --- a/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.008.h +++ b/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.008.h @@ -44,7 +44,7 @@ #include "lte/gateway/c/core/oai/lib/3gpp/3gpp_23.003.h" -//#warning "Set it to max size of message" +// #warning "Set it to max size of message" #define IE_UNDEFINED_MAX_LENGTH 1024 //****************************************************************************** @@ -704,6 +704,7 @@ typedef enum gprs_mobility_managenent_ie_e { GMM_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_IEI = 0x5D, /* 0x5D = 93 */ GMM_TMSI_STATUS_IEI = 0x90, /* 0x90 = 144 (shifted by 4)*/ GMM_IMEISV_REQUEST_IEI = 0xC0, /* 0xC0 = 192 (shifted by 4)*/ + GMM_EDRX_PARAMETER_IEI = 0x6E, /* 0x6E = 110 */ } gprs_mobility_managenent_ie_t; //------------------------------------------------------------------------------ @@ -960,6 +961,32 @@ int decode_voice_domain_preference_and_ue_usage_setting( } #endif +//------------------------------------------------------------------------------ +// 10.5.5.32 Extended DRX parameter +//------------------------------------------------------------------------------ +#define EDRX_PARAMETER_IE_TYPE 3 +#define EDRX_PARAMETER_IE_MIN_LENGTH 3 +#define EDRX_PARAMETER_IE_MAX_LENGTH 3 + +typedef struct edrx_parameter_s { + uint8_t length; + uint8_t pagingtimewindow : 4; + uint8_t edrxvalue : 4; +} edrx_parameter_t; + +#ifdef __cplusplus +extern "C" { +#endif +int encode_edrx_parameter_ie(edrx_parameter_t* edrxparameter, + const bool iei_present, uint8_t* buffer, + const uint32_t len); +int decode_edrx_parameter_ie(edrx_parameter_t* edrxparameter, + const bool iei_present, uint8_t* buffer, + const uint32_t len); +#ifdef __cplusplus +} +#endif + //****************************************************************************** // 10.5.6 Session management information elements //****************************************************************************** diff --git a/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.008_gmm_ies.c b/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.008_gmm_ies.c index ff7b7b42a6ff..d8dc83b05520 100644 --- a/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.008_gmm_ies.c +++ b/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.008_gmm_ies.c @@ -475,3 +475,53 @@ int encode_voice_domain_preference_and_ue_usage_setting( *lenPtr = encoded - 1 - ((iei_present) ? 1 : 0); return encoded; } + +//------------------------------------------------------------------------------ +// 10.5.5.32 Extended DRX parameter +//------------------------------------------------------------------------------ +int decode_edrx_parameter_ie(edrx_parameter_t* edrxparameter, + const bool iei_present, uint8_t* buffer, + const uint32_t len) { + int decoded = 0; + + if (iei_present) { + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, EDRX_PARAMETER_IE_MAX_LENGTH, + len); + CHECK_IEI_DECODER(GMM_EDRX_PARAMETER_IEI, *buffer); + decoded++; + } else { + CHECK_PDU_POINTER_AND_LENGTH_DECODER( + buffer, (EDRX_PARAMETER_IE_MAX_LENGTH - 1), len); + } + + edrxparameter->length = *(buffer + decoded); + decoded++; + edrxparameter->pagingtimewindow = (*(buffer + decoded) >> 4) & 0xF; + edrxparameter->edrxvalue = *(buffer + decoded) & 0xF; + decoded++; + return decoded; +} + +//------------------------------------------------------------------------------ +int encode_edrx_parameter_ie(edrx_parameter_t* edrxparameter, + const bool iei_present, uint8_t* buffer, + const uint32_t len) { + uint32_t encoded = 0; + + if (iei_present) { + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, EDRX_PARAMETER_IE_MAX_LENGTH, + len); + *buffer = GMM_EDRX_PARAMETER_IEI; + encoded++; + } else { + CHECK_PDU_POINTER_AND_LENGTH_ENCODER( + buffer, (EDRX_PARAMETER_IE_MAX_LENGTH - 1), len); + } + + *(buffer + encoded) = edrxparameter->length; + encoded++; + *(buffer + encoded) = + (edrxparameter->pagingtimewindow << 4) | edrxparameter->edrxvalue; + encoded++; + return encoded; +} diff --git a/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.008_mm_ies.c b/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.008_mm_ies.c index 4e6fe04c2050..1b8ba08be772 100644 --- a/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.008_mm_ies.c +++ b/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.008_mm_ies.c @@ -543,6 +543,7 @@ int decode_emergency_number_list_ie( emergency_number_list_t* emergencynumberlist, const bool iei_present, uint8_t* buffer, const uint32_t len) { int decoded = 0; + int signed_len = len; uint8_t ielen = 0; emergency_number_list_t* e = emergencynumberlist; @@ -564,6 +565,8 @@ int decode_emergency_number_list_ie( buffer + decoded, EMERGENCY_NUMBER_MAX_DIGITS, len - decoded); e->lengthofemergencynumberinformation = *(buffer + decoded); + CHECK_LENGTH_DECODER(signed_len - decoded, + e->lengthofemergencynumberinformation); decoded++; emergencynumberlist->emergencyservicecategoryvalue = @@ -577,7 +580,9 @@ int decode_emergency_number_list_ie( i < EMERGENCY_NUMBER_MAX_DIGITS; i++) { e->number_digit[i] = 0xFF; } - Fatal("TODO emergency_number_list_t->next"); + + // implement emergency_number_list_t->next + return TLV_PROTOCOL_NOT_SUPPORTED; return decoded; } @@ -590,7 +595,9 @@ int encode_emergency_number_list_ie( uint32_t encoded = 0; emergency_number_list_t* e = emergencynumberlist; - Fatal("TODO Implement encode_emergency_number_list_ie"); + // implement encode_emergency_number_list_ie + return TLV_PROTOCOL_NOT_SUPPORTED; + if (iei_present) { CHECK_PDU_POINTER_AND_LENGTH_ENCODER( buffer, EMERGENCY_NUMBER_LIST_IE_MIN_LENGTH, len); diff --git a/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.008_sm_ies.c b/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.008_sm_ies.c index fd57fe1763df..d781cad895db 100644 --- a/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.008_sm_ies.c +++ b/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.008_sm_ies.c @@ -56,8 +56,9 @@ int decode_access_point_name_ie(access_point_name_t* access_point_name, bool is_ie_present, uint8_t* buffer, const uint32_t len) { + int signed_len = len; int decoded = 0; - uint8_t ielen = 0; + int ielen = 0; *access_point_name = NULL; @@ -73,13 +74,16 @@ int decode_access_point_name_ie(access_point_name_t* access_point_name, ielen = *(buffer + decoded); decoded++; - CHECK_LENGTH_DECODER(len - decoded, ielen); + CHECK_LENGTH_DECODER(signed_len - decoded, ielen); if (1 <= ielen) { int length_apn = *(buffer + decoded); decoded++; + CHECK_LENGTH_DECODER(ielen, length_apn + 1); + // ^ ielen <= (signed_len - decoded), so that is implicitly checked here too *access_point_name = blk2bstr((void*)(buffer + decoded), length_apn); decoded += length_apn; + ielen = ielen - 1 - length_apn; while (1 <= ielen) { bconchar(*access_point_name, '.'); @@ -89,9 +93,10 @@ int decode_access_point_name_ie(access_point_name_t* access_point_name, // apn terminated by '.' ? if (length_apn > 0) { - AssertFatal(ielen >= length_apn, - "Mismatch in lengths remaining ielen %d apn length %d", - ielen, length_apn); + if (ielen < length_apn) { + // Mismatch in lengths remaining between IE length and APN length + return TLV_OCTET_STRING_TOO_LONG_FOR_IEI; + } bcatblk(*access_point_name, (void*)(buffer + decoded), length_apn); decoded += length_apn; ielen = ielen - length_apn; @@ -236,6 +241,10 @@ int decode_protocol_configuration_options( protocolconfigurationoptions->num_protocol_or_container_id = 0; while (3 <= ((int32_t)len - (int32_t)decoded)) { + if (protocolconfigurationoptions->num_protocol_or_container_id >= + PCO_UNSPEC_MAXIMUM_PROTOCOL_ID_OR_CONTAINER_ID) { + return TLV_UNEXPECTED_IEI; // Maximum 30 options + } DECODE_U16( buffer + decoded, protocolconfigurationoptions @@ -492,14 +501,14 @@ int encode_quality_of_service_ie(quality_of_service_t* qualityofservice, //------------------------------------------------------------------------------ int encode_linked_ti_ie(linked_ti_t* linkedti, const bool iei_present, uint8_t* buffer, const uint32_t len) { - Fatal("TODO Implement encode_linked_ti_ie"); - return -1; + // Implement encode_linked_ti_ie + return TLV_PROTOCOL_NOT_SUPPORTED; } int decode_linked_ti_ie(linked_ti_t* linkedti, const bool iei_present, uint8_t* buffer, const uint32_t len) { - Fatal("TODO Implement decode_linked_ti_ie"); - return -1; + // Implement decode_linked_ti_ie + return TLV_PROTOCOL_NOT_SUPPORTED; } //------------------------------------------------------------------------------ @@ -618,6 +627,11 @@ static int decode_traffic_flow_template_packet_filter( packet_filter_t* packetfilter, const uint8_t* const buffer, const uint32_t len) { int decoded = 0, j; + int signed_len = len; + + if (len < 3) { + return TLV_BUFFER_TOO_SHORT; + } if (len - decoded <= 0) { /* @@ -655,6 +669,10 @@ static int decode_traffic_flow_template_packet_filter( */ int pkfstart = decoded; + if (len < pkfstart + pkflen) { + return TLV_BUFFER_TOO_SHORT; + } + while (decoded - pkfstart < pkflen) { /* * Packet filter component type identifier @@ -803,7 +821,7 @@ static int decode_traffic_flow_template_packet_filter( } } - if (len - decoded < 0) { + if (signed_len - decoded < 0) { /* * Decoded more than remaining space in decoding buffer */ diff --git a/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.501.h b/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.501.h index 82c6fab71e95..2c1c947a8225 100644 --- a/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.501.h +++ b/lte/gateway/c/core/oai/lib/3gpp/3gpp_24.501.h @@ -39,13 +39,12 @@ //------------------------------------------------------------------------------ // Table 9.8.1: Message types for EPS mobility management /* Message identifiers for EPS Mobility Management Registration REGISTRATION */ -//#define REGISTRATION_REQUEST 0b01000001 /* 65 = 0x41 */ -//#define REGISTRATION_ACCEPT 0b01000010 /* 66 = 0x42 */ -//#define REGISTRATION_COMPLETE 0b01000011 /* 67 = 0x43 */ -//#define REGISTRATION_REJECT 0b01000100 /* 68 = 0x44 */ -//#define DEREGISTRATION_REQUEST_UE_INIT 0b01000101 /* 69 = -// 0x45 */ #define DEREGISTRATION_ACCEPT_UE_INIT 0b01000110 /* -// 70 = 0x46 */ +// #define REGISTRATION_REQUEST 0b01000001 /* 65 = 0x41 */ +// #define REGISTRATION_ACCEPT 0b01000010 /* 66 = 0x42 */ +// #define REGISTRATION_COMPLETE 0b01000011 /* 67 = 0x43 */ +// #define REGISTRATION_REJECT 0b01000100 /* 68 = 0x44 */ +// #define DEREGISTRATION_REQUEST_UE_INIT 0b01000101 /* 69 = +// 0x45 */ #define DEREGISTRATION_ACCEPT_UE_INIT 0b01000110 /* 70 = 0x46 */ #define DEREGISTRATION_REQUEST_NW_INIT 0b01000111 /* 71 = 0x47 */ #define DEREGISTRATION_ACCEPT_NW_INIT 0b01001000 /* 72 = 0x48 */ #define DEREGISTRATION_ACCEPT_UE_INIT 0b01000110 /* 70 = 0x46 */ diff --git a/lte/gateway/c/core/oai/lib/bstr/bstrlib.h b/lte/gateway/c/core/oai/lib/bstr/bstrlib.h index 11b541bcaad8..e046ac57388b 100644 --- a/lte/gateway/c/core/oai/lib/bstr/bstrlib.h +++ b/lte/gateway/c/core/oai/lib/bstr/bstrlib.h @@ -125,8 +125,7 @@ struct tagbstring { #define bchar(b, p) bchare((b), (p), '\0') /* Static constant string initialization macro */ -#define bsStaticMlen(q, m) \ - { (m), (int)sizeof(q) - 1, (unsigned char*)("" q "") } +#define bsStaticMlen(q, m) {(m), (int)sizeof(q) - 1, (unsigned char*)("" q "")} #if defined(_MSC_VER) #define bsStatic(q) bsStaticMlen(q, -32) #endif diff --git a/lte/gateway/c/core/oai/lib/gtpv2-c/gtpv2c_ie_formatter/shared/gtpv2c_ie_formatter.h b/lte/gateway/c/core/oai/lib/gtpv2-c/gtpv2c_ie_formatter/shared/gtpv2c_ie_formatter.h index 2c3284c6f556..f67502386095 100644 --- a/lte/gateway/c/core/oai/lib/gtpv2-c/gtpv2c_ie_formatter/shared/gtpv2c_ie_formatter.h +++ b/lte/gateway/c/core/oai/lib/gtpv2-c/gtpv2c_ie_formatter/shared/gtpv2c_ie_formatter.h @@ -34,7 +34,7 @@ #include "lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/include/NwGtpv2c.h" #include "lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/shared/NwTypes.h" #include "lte/gateway/c/core/oai/tasks/nas/ies/TrafficFlowAggregateDescription.hpp" -//#include "mme_ie_defs.h" +// #include "mme_ie_defs.h" /* Imsi Information Element * 3GPP TS.29.274 #8.3 diff --git a/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/include/NwGtpv2c.h b/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/include/NwGtpv2c.h index 3a73cdaf303a..bb607face2d0 100644 --- a/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/include/NwGtpv2c.h +++ b/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/include/NwGtpv2c.h @@ -216,9 +216,8 @@ typedef struct nw_gtpv2c_initial_req_info_s { NW_IN struct sockaddr* edns_peer_ip; /**< Required only in case when hTunnel == 0 */ - NW_IN uint8_t - internal_flags; /**< Required only in case when hTunnel == 0 */ - NW_IN uint32_t teidLocal; /**< Required only in case when hTunnel == 0 */ + NW_IN uint8_t internal_flags; /**< Required only in case when hTunnel == 0 */ + NW_IN uint32_t teidLocal; /**< Required only in case when hTunnel == 0 */ NW_IN nw_gtpv2c_ulp_tunnel_handle_t hUlpTunnel; /**< Required only in case when hTunnel == 0 */ NW_IN bool noDelete; /**< Set if the tunnel shall not be deleted automatically @@ -522,7 +521,7 @@ nw_rc_t nwGtpv2cFinalize(NW_IN nw_gtpv2c_stack_handle_t hGtpcStackHandle); nw_rc_t nwGtpv2cConfigSet(NW_IN nw_gtpv2c_stack_handle_t* phGtpcStackHandle, NW_IN nw_gtpv2c_stack_config_t* pConfig); -//#define T3_TIMER 10 +// #define T3_TIMER 10 /** Get Configuration for the nw-gtpv2c stack. diff --git a/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/include/queue.h b/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/include/queue.h index 7d5335669e0d..06dec4606486 100644 --- a/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/include/queue.h +++ b/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/include/queue.h @@ -116,8 +116,7 @@ struct type* slh_first; /* first element */ \ } -#define SLIST_HEAD_INITIALIZER(head) \ - { NULL } +#define SLIST_HEAD_INITIALIZER(head) {NULL} #define SLIST_ENTRY(type) \ struct { \ @@ -180,8 +179,7 @@ struct type** stqh_last; /* addr of last next element */ \ } -#define STAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).stqh_first } +#define STAILQ_HEAD_INITIALIZER(head) {NULL, &(head).stqh_first} #define STAILQ_HEAD_INIT(head) \ do { \ @@ -273,8 +271,7 @@ struct type* lh_first; /* first element */ \ } -#define LIST_HEAD_INITIALIZER(head) \ - { NULL } +#define LIST_HEAD_INITIALIZER(head) {NULL} #define LIST_ENTRY(type) \ struct { \ @@ -340,8 +337,7 @@ struct type** tqh_last; /* addr of last next element */ \ } -#define TAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).tqh_first } +#define TAILQ_HEAD_INITIALIZER(head) {NULL, &(head).tqh_first} #define TAILQ_ENTRY(type) \ struct { \ @@ -431,8 +427,7 @@ struct type* cqh_last; /* last element */ \ } -#define CIRCLEQ_HEAD_INITIALIZER(head) \ - { (void*)&(head), (void*)&(head) } +#define CIRCLEQ_HEAD_INITIALIZER(head) {(void*)&(head), (void*)&(head)} #define CIRCLEQ_ENTRY(type) \ struct { \ diff --git a/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/include/tree.h b/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/include/tree.h index 89a53dcc7ba7..0d2923d4cda6 100644 --- a/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/include/tree.h +++ b/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/include/tree.h @@ -58,8 +58,7 @@ struct type* sph_root; /* root of the tree */ \ } -#define SPLAY_INITIALIZER(root) \ - { NULL } +#define SPLAY_INITIALIZER(root) {NULL} #define SPLAY_INIT(root) \ do { \ @@ -276,8 +275,7 @@ struct type* rbh_root; /* root of the tree */ \ } -#define RB_INITIALIZER(root) \ - { NULL } +#define RB_INITIALIZER(root) {NULL} #define RB_INIT(root) \ do { \ diff --git a/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/shared/NwLog.h b/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/shared/NwLog.h index c80d313edd93..17ce56073857 100644 --- a/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/shared/NwLog.h +++ b/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/shared/NwLog.h @@ -64,10 +64,10 @@ extern "C" { *--------------------------------------------------------------------------*/ #define NW_IPV4_ADDR "%u.%u.%u.%u" -#define NW_IPV4_ADDR_FORMAT(__addr) \ - (uint8_t)((__addr)&0x000000ff), (uint8_t)(((__addr)&0x0000ff00) >> 8), \ - (uint8_t)(((__addr)&0x00ff0000) >> 16), \ - (uint8_t)(((__addr)&0xff000000) >> 24) +#define NW_IPV4_ADDR_FORMAT(__addr) \ + (uint8_t)((__addr) & 0x000000ff), (uint8_t)(((__addr) & 0x0000ff00) >> 8), \ + (uint8_t)(((__addr) & 0x00ff0000) >> 16), \ + (uint8_t)(((__addr) & 0xff000000) >> 24) #define NW_IPV4_ADDR_FORMATP(__paddr) \ (uint8_t)(*((uint8_t*)(__paddr)) & 0x000000ff), \ diff --git a/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/shared/NwUtils.h b/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/shared/NwUtils.h index ff76715a5925..fcd9fbbee43a 100644 --- a/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/shared/NwUtils.h +++ b/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/shared/NwUtils.h @@ -47,11 +47,11 @@ NW_ASSERT(_ptr != NULL) /**< Null pointer check \ */ -#define NW_HTONS(x) ((((x)&0xff00) >> 8) | (((x)&0x00ff) << 8)) +#define NW_HTONS(x) ((((x) & 0xff00) >> 8) | (((x) & 0x00ff) << 8)) -#define NW_HTONL(x) \ - ((((x)&0xff000000) >> 24) | (((x)&0x00ff0000) >> 8) | \ - (((x)&0x0000ff00) << 8) | (((x)&0x000000ff) << 24)) +#define NW_HTONL(x) \ + ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) #define NW_HTONLL(x) \ (((((uint64_t)x) & 0xff00000000000000ULL) >> 56) | \ diff --git a/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/src/NwGtpv2c.c b/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/src/NwGtpv2c.c index 8b112b55202c..40ceee836a08 100644 --- a/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/src/NwGtpv2c.c +++ b/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/src/NwGtpv2c.c @@ -103,7 +103,7 @@ typedef struct { nw_gtpv2c_timeout_info_t** pHeap; } NwGtpv2cTmrMinHeapT; -#define NW_HEAP_PARENT_INDEX(__child) (((__child)-1) / 2) +#define NW_HEAP_PARENT_INDEX(__child) (((__child) - 1) / 2) NwGtpv2cTmrMinHeapT* nwGtpv2cTmrMinHeapNew(int maxSize) { NwGtpv2cTmrMinHeapT* thiz = diff --git a/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/src/NwGtpv2cTrxn.c b/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/src/NwGtpv2cTrxn.c index c023b3b01617..b01170d035c5 100644 --- a/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/src/NwGtpv2cTrxn.c +++ b/lte/gateway/c/core/oai/lib/gtpv2-c/nwgtpv2c-0.11/src/NwGtpv2cTrxn.c @@ -313,12 +313,11 @@ nw_gtpv2c_trxn_t* nwGtpv2cTrxnWithSeqNumNew(NW_IN nw_gtpv2c_stack_t* thiz, @return NW_OK on success. */ -nw_gtpv2c_trxn_t* nwGtpv2cTrxnOutstandingRxNew(NW_IN nw_gtpv2c_stack_t* thiz, - __attribute__((unused)) - NW_IN uint32_t teidLocal, - NW_IN struct sockaddr* peerIp, - NW_IN uint32_t peerPort, - NW_IN uint32_t seqNum) { +nw_gtpv2c_trxn_t* nwGtpv2cTrxnOutstandingRxNew( + NW_IN nw_gtpv2c_stack_t* thiz, + __attribute__((unused)) NW_IN uint32_t teidLocal, + NW_IN struct sockaddr* peerIp, NW_IN uint32_t peerPort, + NW_IN uint32_t seqNum) { nw_rc_t rc; nw_gtpv2c_trxn_t *pTrxn, *pCollision; diff --git a/lte/gateway/c/core/oai/lib/itti/intertask_interface.c b/lte/gateway/c/core/oai/lib/itti/intertask_interface.c index 0040242c991e..68ce2a8d19d0 100644 --- a/lte/gateway/c/core/oai/lib/itti/intertask_interface.c +++ b/lte/gateway/c/core/oai/lib/itti/intertask_interface.c @@ -68,7 +68,7 @@ const int itti_debug = ITTI_DEBUG_ISSUES | ITTI_DEBUG_MP_STATISTICS; #define ITTI_DEBUG(m, x, args...) \ do { \ /* stdout is redirected to syslog when MME is run via systemd */ \ - if ((m)&itti_debug) fprintf(stdout, "[ITTI][D]" x, ##args); \ + if ((m) & itti_debug) fprintf(stdout, "[ITTI][D]" x, ##args); \ } while (0); /* Global message size */ diff --git a/lte/gateway/c/core/oai/lib/itti/intertask_interface_types.h b/lte/gateway/c/core/oai/lib/itti/intertask_interface_types.h index 8ea750cf0b9a..444c8266a926 100644 --- a/lte/gateway/c/core/oai/lib/itti/intertask_interface_types.h +++ b/lte/gateway/c/core/oai/lib/itti/intertask_interface_types.h @@ -51,7 +51,7 @@ UL_BIT_SHIFT(UL_BIT_MASK(lENGTH), (oFFSET)) #define UL_FIELD_INSERT(vALUE, fIELD, oFFSET, lENGTH) \ (((vALUE) & (~UL_FIELD_MASK(oFFSET, lENGTH))) | \ - UL_BIT_SHIFT(((fIELD)&UL_BIT_MASK(lENGTH)), oFFSET)) + UL_BIT_SHIFT(((fIELD) & UL_BIT_MASK(lENGTH)), oFFSET)) #define UL_FIELD_EXTRACT(vALUE, oFFSET, lENGTH) \ (UL_BIT_UNSHIFT((vALUE), (oFFSET)) & UL_BIT_MASK(lENGTH)) diff --git a/lte/gateway/c/core/oai/lib/openflow/controller/ControllerEvents.cpp b/lte/gateway/c/core/oai/lib/openflow/controller/ControllerEvents.cpp index 7f9ffad91ecb..34837f829629 100644 --- a/lte/gateway/c/core/oai/lib/openflow/controller/ControllerEvents.cpp +++ b/lte/gateway/c/core/oai/lib/openflow/controller/ControllerEvents.cpp @@ -23,7 +23,9 @@ using namespace fluid_msg; namespace openflow { -static struct in_addr INADDR_ZERO { .s_addr = 0 }; +static struct in_addr INADDR_ZERO { + .s_addr = 0 +}; ControllerEvent::ControllerEvent(fluid_base::OFConnection* ofconn, const ControllerEventType type) diff --git a/lte/gateway/c/core/oai/lib/secu/snow3g.c b/lte/gateway/c/core/oai/lib/secu/snow3g.c index dab887d95bf3..93ce3f999dca 100644 --- a/lte/gateway/c/core/oai/lib/secu/snow3g.c +++ b/lte/gateway/c/core/oai/lib/secu/snow3g.c @@ -106,7 +106,7 @@ static uint32_t S1(uint32_t w) { uint8_t srw0 = SR[(uint8_t)((w >> 24) & 0xff)]; uint8_t srw1 = SR[(uint8_t)((w >> 16) & 0xff)]; uint8_t srw2 = SR[(uint8_t)((w >> 8) & 0xff)]; - uint8_t srw3 = SR[(uint8_t)((w)&0xff)]; + uint8_t srw3 = SR[(uint8_t)((w) & 0xff)]; r0 = ((MULx(srw0, 0x1b)) ^ (srw1) ^ (srw2) ^ ((MULx(srw3, 0x1b)) ^ srw3)); r1 = (((MULx(srw0, 0x1b)) ^ srw0) ^ (MULx(srw1, 0x1b)) ^ (srw2) ^ (srw3)); @@ -130,7 +130,7 @@ static uint32_t S2(uint32_t w) { uint8_t sqw0 = SQ[(uint8_t)((w >> 24) & 0xff)]; uint8_t sqw1 = SQ[(uint8_t)((w >> 16) & 0xff)]; uint8_t sqw2 = SQ[(uint8_t)((w >> 8) & 0xff)]; - uint8_t sqw3 = SQ[(uint8_t)((w)&0xff)]; + uint8_t sqw3 = SQ[(uint8_t)((w) & 0xff)]; r0 = ((MULx(sqw0, 0x69)) ^ (sqw1) ^ (sqw2) ^ ((MULx(sqw3, 0x69)) ^ sqw3)); r1 = (((MULx(sqw0, 0x69)) ^ sqw0) ^ (MULx(sqw1, 0x69)) ^ (sqw2) ^ (sqw3)); diff --git a/lte/gateway/c/core/oai/tasks/amf/amf_app_timer_management.hpp b/lte/gateway/c/core/oai/tasks/amf/amf_app_timer_management.hpp index d58c77360c4b..d5fcb8ba1d1e 100644 --- a/lte/gateway/c/core/oai/tasks/amf/amf_app_timer_management.hpp +++ b/lte/gateway/c/core/oai/tasks/amf/amf_app_timer_management.hpp @@ -62,7 +62,7 @@ class AmfUeContext { private: std::map amf_app_timers; std::map amf_pdu_timers; - AmfUeContext() : amf_app_timers(), amf_pdu_timers(){}; + AmfUeContext() : amf_app_timers(), amf_pdu_timers() {}; public: static AmfUeContext& Instance() { diff --git a/lte/gateway/c/core/oai/tasks/amf/amf_as.cpp b/lte/gateway/c/core/oai/tasks/amf/amf_as.cpp index 18cb0d2083bc..5274e109915f 100644 --- a/lte/gateway/c/core/oai/tasks/amf/amf_as.cpp +++ b/lte/gateway/c/core/oai/tasks/amf/amf_as.cpp @@ -149,7 +149,8 @@ static status_code_e amf_as_establish_req(amf_as_establish_t* msg, } } - if ((msg->nas_msg->data[1] != 0x0) && (msg->nas_msg->data[9] == 0x5c)) { + if ((blength(msg->nas_msg) > 9) && (msg->nas_msg->data[1] != 0x0) && + (msg->nas_msg->data[9] == 0x5c)) { for (int i = 0, j = 7; j < blength(msg->nas_msg); i++, j++) { msg->nas_msg->data[i] = msg->nas_msg->data[j]; } diff --git a/lte/gateway/c/core/oai/tasks/amf/amf_config.c b/lte/gateway/c/core/oai/tasks/amf/amf_config.c index cf431e45f9e1..fa0eb42eca9d 100644 --- a/lte/gateway/c/core/oai/tasks/amf/amf_config.c +++ b/lte/gateway/c/core/oai/tasks/amf/amf_config.c @@ -355,8 +355,8 @@ int amf_config_parse_file(amf_config_t* config_pP, } config_pP->plmn_support_list.plmn_support_count += 1; } // If MCC/MNC/Slice Information is found - } // For the number of entries in the list for PLMN SUPPORT - } // PLMN_SUPPORT LIST is present + } // For the number of entries in the list for PLMN SUPPORT + } // PLMN_SUPPORT LIST is present // enable VoNR support if ((config_setting_lookup_string( diff --git a/lte/gateway/c/core/oai/tasks/amf/include/amf_client_servicer.hpp b/lte/gateway/c/core/oai/tasks/amf/include/amf_client_servicer.hpp index 1a85ddfe710f..ebb43f4bab01 100644 --- a/lte/gateway/c/core/oai/tasks/amf/include/amf_client_servicer.hpp +++ b/lte/gateway/c/core/oai/tasks/amf/include/amf_client_servicer.hpp @@ -211,7 +211,7 @@ class AMFClientServicer : public AMFClientServicerBase { #endif /* MME_UNIT_TEST */ private: - AMFClientServicer(){}; + AMFClientServicer() {}; }; } // namespace magma5g diff --git a/lte/gateway/c/core/oai/tasks/mme_app/mme_app_bearer.cpp b/lte/gateway/c/core/oai/tasks/mme_app/mme_app_bearer.cpp index ca7681a5a147..027b9c333c63 100644 --- a/lte/gateway/c/core/oai/tasks/mme_app/mme_app_bearer.cpp +++ b/lte/gateway/c/core/oai/tasks/mme_app/mme_app_bearer.cpp @@ -466,7 +466,7 @@ void mme_app_handle_conn_est_cnf( } establishment_cnf_p->no_of_e_rabs = j; - //#pragma message "Check ue_context_p ambr" + // #pragma message "Check ue_context_p ambr" establishment_cnf_p->ue_ambr.br_ul = ue_context_p->subscribed_ue_ambr.br_ul; establishment_cnf_p->ue_ambr.br_dl = ue_context_p->subscribed_ue_ambr.br_dl; establishment_cnf_p->ue_ambr.br_unit = @@ -1485,7 +1485,7 @@ static void mme_app_populate_bearer_contexts_to_be_removed( } break; } // end of ebi comparison - } // end of for + } // end of for OAILOG_FUNC_OUT(LOG_MME_APP); } @@ -1553,7 +1553,7 @@ static void mme_app_populate_bearer_contexts_to_be_modified( (*bc_to_be_modified_idx)++; break; } // end of if - } // end of for loop + } // end of for loop OAILOG_FUNC_OUT(LOG_MME_APP); } @@ -1589,7 +1589,7 @@ static void mme_app_build_modify_bearer_request_message( ue_context_p, initial_ctxt_setup_rsp_p, s11_modify_bearer_request, idx, bc_to_be_removed_idx); } // end of if(!bearer_found) - } // end of bid for loop + } // end of bid for loop // Fill the common parameters ue_context_p->pdn_contexts[*pid] ->s_gw_address_s11_s4.address.ipv4_address.s_addr = diff --git a/lte/gateway/c/core/oai/tasks/mme_app/mme_app_itti_messaging.cpp b/lte/gateway/c/core/oai/tasks/mme_app/mme_app_itti_messaging.cpp index 55e32a35cef8..abc3b0faf97c 100644 --- a/lte/gateway/c/core/oai/tasks/mme_app/mme_app_itti_messaging.cpp +++ b/lte/gateway/c/core/oai/tasks/mme_app/mme_app_itti_messaging.cpp @@ -408,9 +408,9 @@ status_code_e mme_app_send_s11_create_session_req( if (1) { mme_app_select_sgw( &ue_mm_context->emm_context.originating_tai, - (struct sockaddr* const) & session_request_p->edns_peer_ip); + (struct sockaddr* const)&session_request_p->edns_peer_ip); - if (((struct sockaddr* const) & (session_request_p->edns_peer_ip)) + if (((struct sockaddr* const)&(session_request_p->edns_peer_ip)) ->sa_family == AF_INET) { ue_mm_context->pdn_contexts[pdn_cid] ->s_gw_address_s11_s4.address.ipv4_address.s_addr = diff --git a/lte/gateway/c/core/oai/tasks/mme_app/mme_app_timer_management.hpp b/lte/gateway/c/core/oai/tasks/mme_app/mme_app_timer_management.hpp index 29ce951a13e0..41120abbd5f2 100644 --- a/lte/gateway/c/core/oai/tasks/mme_app/mme_app_timer_management.hpp +++ b/lte/gateway/c/core/oai/tasks/mme_app/mme_app_timer_management.hpp @@ -33,7 +33,7 @@ typedef timer_arg_t TimerArgType; class MmeUeContext { private: std::map mme_app_timers; - MmeUeContext() : mme_app_timers(){}; + MmeUeContext() : mme_app_timers() {}; public: static MmeUeContext& Instance() { diff --git a/lte/gateway/c/core/oai/tasks/nas/emm/Attach.cpp b/lte/gateway/c/core/oai/tasks/nas/emm/Attach.cpp index 2c7d6bc7b65a..11499c99b419 100644 --- a/lte/gateway/c/core/oai/tasks/nas/emm/Attach.cpp +++ b/lte/gateway/c/core/oai/tasks/nas/emm/Attach.cpp @@ -279,7 +279,7 @@ status_code_e emm_proc_attach_request( increment_counter("ue_attach", 1, 2, "result", "failure", "cause", "emergency_attach"); if (ies) { - free_emm_attach_request_ies((emm_attach_request_ies_t * * const) & ies); + free_emm_attach_request_ies((emm_attach_request_ies_t * * const)&ies); } OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc); } @@ -303,7 +303,7 @@ status_code_e emm_proc_attach_request( increment_counter("ue_attach", 1, 2, "result", "failure", "cause", "ue_context_not_found"); if (ies) { - free_emm_attach_request_ies((emm_attach_request_ies_t * * const) & ies); + free_emm_attach_request_ies((emm_attach_request_ies_t * * const)&ies); } OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc); } @@ -464,8 +464,8 @@ status_code_e emm_proc_attach_request( mme_app_handle_detach_req(ue_mm_context->mme_ue_s1ap_id); } if (ies) { - free_emm_attach_request_ies((emm_attach_request_ies_t * * const) & - ies); + free_emm_attach_request_ies( + (emm_attach_request_ies_t * * const)&ies); } OAILOG_FUNC_RETURN(LOG_NAS_EMM, RETURNok); } @@ -529,8 +529,8 @@ status_code_e emm_proc_attach_request( increment_counter("duplicate_attach_request", 1, 1, "action", "ignored"); if (ies) { - free_emm_attach_request_ies((emm_attach_request_ies_t * * const) & - ies); + free_emm_attach_request_ies( + (emm_attach_request_ies_t * * const)&ies); } OAILOG_FUNC_RETURN(LOG_NAS_EMM, RETURNok); } @@ -578,7 +578,7 @@ status_code_e emm_proc_attach_request( "EMM-PROC - Freeing Attach Request IEs for ue_id " "= " MME_UE_S1AP_ID_FMT, ue_id); - free_emm_attach_request_ies((emm_attach_request_ies_t * * const) & ies); + free_emm_attach_request_ies((emm_attach_request_ies_t * * const)&ies); } rc = emm_attach_run_procedure(&ue_mm_context->emm_context); OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc); @@ -2467,7 +2467,7 @@ void proc_new_attach_req(mme_ue_context_t* const mme_ue_context_p, (ue_context_p->emm_context._guti.gummei.plmn.mcc_digit3)) { hash_rc = obj_hashtable_uint64_ts_remove( mme_ue_context_p->guti_ue_context_htbl, - (const void* const) & ue_context_p->emm_context._guti, + (const void* const)&ue_context_p->emm_context._guti, sizeof(ue_context_p->emm_context._guti)); if (HASH_TABLE_OK != hash_rc) OAILOG_ERROR_UE(LOG_MME_APP, ue_context_p->emm_context._imsi64, diff --git a/lte/gateway/c/core/oai/tasks/nas/emm/Identification.cpp b/lte/gateway/c/core/oai/tasks/nas/emm/Identification.cpp index f5d72c121706..536f3bbd8899 100644 --- a/lte/gateway/c/core/oai/tasks/nas/emm/Identification.cpp +++ b/lte/gateway/c/core/oai/tasks/nas/emm/Identification.cpp @@ -365,7 +365,7 @@ status_code_e emm_proc_identification_complete(const mme_ue_s1ap_id_t ue_id, rc = emm_sap_send(&emm_sap); } // else ignore the response if procedure not found - } // else ignore the response if ue context not found + } // else ignore the response if ue context not found OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc); } diff --git a/lte/gateway/c/core/oai/tasks/nas/emm/emm_data.hpp b/lte/gateway/c/core/oai/tasks/nas/emm/emm_data.hpp index 9f7888ff5e4d..faa6a93df352 100644 --- a/lte/gateway/c/core/oai/tasks/nas/emm/emm_data.hpp +++ b/lte/gateway/c/core/oai/tasks/nas/emm/emm_data.hpp @@ -219,14 +219,14 @@ typedef struct emm_context_s { #define EMM_CTXT_MEMBER_UE_ADDITIONAL_SECURITY_CAPABILITY ((uint32_t)1 << 16) #define EMM_CTXT_MEMBER_AUTH_VECTOR0 ((uint32_t)1 << 26) - //#define EMM_CTXT_MEMBER_AUTH_VECTOR1 ((uint32_t)1 + // #define EMM_CTXT_MEMBER_AUTH_VECTOR1 ((uint32_t)1 //<< 27) // reserved bit for AUTH VECTOR #define EMM_CTXT_MEMBER_AUTH_VECTOR2 //((uint32_t)1 << 28) // reserved bit for AUTH VECTOR #define - // EMM_CTXT_MEMBER_AUTH_VECTOR3 ((uint32_t)1 << 29) // - // reserved bit for AUTH VECTOR #define EMM_CTXT_MEMBER_AUTH_VECTOR4 + // EMM_CTXT_MEMBER_AUTH_VECTOR3 ((uint32_t)1 << 29) // + // reserved bit for AUTH VECTOR #define EMM_CTXT_MEMBER_AUTH_VECTOR4 //((uint32_t)1 << 30) // reserved bit for AUTH VECTOR #define - // EMM_CTXT_MEMBER_AUTH_VECTOR5 ((uint32_t)1 << 31) // - // reserved bit for AUTH VECTOR + // EMM_CTXT_MEMBER_AUTH_VECTOR5 ((uint32_t)1 << 31) // + // reserved bit for AUTH VECTOR #define EMM_CTXT_MEMBER_SET_BIT(eMmCtXtMemBeRmAsK, bIt) \ do { \ diff --git a/lte/gateway/c/core/oai/tasks/nas/emm/msg/AttachRequest.cpp b/lte/gateway/c/core/oai/tasks/nas/emm/msg/AttachRequest.cpp index bcfb8f181751..f1b8968539a9 100644 --- a/lte/gateway/c/core/oai/tasks/nas/emm/msg/AttachRequest.cpp +++ b/lte/gateway/c/core/oai/tasks/nas/emm/msg/AttachRequest.cpp @@ -338,6 +338,20 @@ int decode_attach_request(attach_request_msg* attach_request, uint8_t* buffer, ATTACH_REQUEST_NETWORK_RESOURCE_IDENTIFIER_CONTAINER_PRESENT; break; + case ATTACH_REQUEST_EDRX_PARAMETER_IEI: + if ((decoded_result = decode_edrx_parameter_ie( + &attach_request->edrxparameter, true, buffer + decoded, + len - decoded)) <= 0) { + OAILOG_FUNC_RETURN(LOG_NAS_EMM, decoded_result); + } + + decoded += decoded_result; + /* + * Set corresponding mask to 1 in presencemask + */ + attach_request->presencemask |= ATTACH_REQUEST_EDRX_PARAMETER_PRESENT; + break; + case ATTACH_REQUEST_DEVICE_PROPERTIES_IEI: case ATTACH_REQUEST_DEVICE_PROPERTIES_LOW_PRIO_IEI: // Skip these IEs. We do not support congestion handling. diff --git a/lte/gateway/c/core/oai/tasks/nas/emm/msg/AttachRequest.hpp b/lte/gateway/c/core/oai/tasks/nas/emm/msg/AttachRequest.hpp index 36af3ce823b0..7ecae67abbfb 100644 --- a/lte/gateway/c/core/oai/tasks/nas/emm/msg/AttachRequest.hpp +++ b/lte/gateway/c/core/oai/tasks/nas/emm/msg/AttachRequest.hpp @@ -77,6 +77,7 @@ #define ATTACH_REQUEST_MS_NETWORK_FEATURE_SUPPORT_PRESENT (1 << 13) #define ATTACH_REQUEST_NETWORK_RESOURCE_IDENTIFIER_CONTAINER_PRESENT (1 << 14) #define ATTACH_REQUEST_UE_ADDITIONAL_SECURITY_CAPABILITY_PRESENT (1 << 15) +#define ATTACH_REQUEST_EDRX_PARAMETER_PRESENT (1 << 16) typedef enum attach_request_iei_tag { ATTACH_REQUEST_OLD_PTMSI_SIGNATURE_IEI = GMM_PTMSI_SIGNATURE_IEI, @@ -101,6 +102,7 @@ typedef enum attach_request_iei_tag { ATTACH_REQUEST_NETWORK_RESOURCE_IDENTIFIER_CONTAINER_IEI = 0x10, ATTACH_REQUEST_DEVICE_PROPERTIES_IEI = 0xD0, ATTACH_REQUEST_DEVICE_PROPERTIES_LOW_PRIO_IEI = 0xD1, + ATTACH_REQUEST_EDRX_PARAMETER_IEI = 0x6e, ATTACH_REQUEST_UE_ADDITIONAL_SECURITY_CAPABILITY_IEI = 0x6F } attach_request_iei; @@ -139,6 +141,7 @@ typedef struct attach_request_msg_tag { voicedomainpreferenceandueusagesetting; ms_network_feature_support_t msnetworkfeaturesupport; network_resource_identifier_container_t networkresourceidentifiercontainer; + edrx_parameter_t edrxparameter; ue_additional_security_capability_t ueadditionalsecuritycapability; } attach_request_msg; diff --git a/lte/gateway/c/core/oai/tasks/nas/emm/sap/emm_as.cpp b/lte/gateway/c/core/oai/tasks/nas/emm/sap/emm_as.cpp index 3767ec4de32d..3f8f088b7f9b 100644 --- a/lte/gateway/c/core/oai/tasks/nas/emm/sap/emm_as.cpp +++ b/lte/gateway/c/core/oai/tasks/nas/emm/sap/emm_as.cpp @@ -807,6 +807,15 @@ static status_code_e emm_as_establish_req(emm_as_establish_t* msg, } } + if (nas_msg.plain.emm.header.protocol_discriminator != + EPS_MOBILITY_MANAGEMENT_MESSAGE) { + // The NAS message had external EMM header and internal internal + // plaintext/encrypted ESM header--discard + OAILOG_ERROR(LOG_NAS_EMM, + "EMMAS-SAP - Malformed Packet - Inconsistent outer EMM header " + "with inner ESM header"); + } + /* * Process initial NAS message */ diff --git a/lte/gateway/c/core/oai/tasks/nas/emm/sap/emm_cn.cpp b/lte/gateway/c/core/oai/tasks/nas/emm/sap/emm_cn.cpp index d440d5c133ce..0762bee7f767 100644 --- a/lte/gateway/c/core/oai/tasks/nas/emm/sap/emm_cn.cpp +++ b/lte/gateway/c/core/oai/tasks/nas/emm/sap/emm_cn.cpp @@ -562,7 +562,7 @@ static status_code_e emm_cn_cs_response_success( OAILOG_DEBUG(LOG_NAS_EMM, "EMM - qos.gbrDL = %u \n", msg_pP->qos.gbrDL); qos.bitRatesPresent = 0; qos.bitRatesExtPresent = 0; - //#pragma message "Some work to do here about qos" + // #pragma message "Some work to do here about qos" qos.qci = msg_pP->qci; qos.bitRates.maxBitRateForUL = msg_pP->qos.mbrUL; qos.bitRates.maxBitRateForDL = msg_pP->qos.mbrDL; diff --git a/lte/gateway/c/core/oai/tasks/nas/emm/sap/emm_recv.cpp b/lte/gateway/c/core/oai/tasks/nas/emm/sap/emm_recv.cpp index 257db8df029e..50e8fb0ec121 100644 --- a/lte/gateway/c/core/oai/tasks/nas/emm/sap/emm_recv.cpp +++ b/lte/gateway/c/core/oai/tasks/nas/emm/sap/emm_recv.cpp @@ -333,8 +333,7 @@ status_code_e emm_recv_attach_request( " , emm_cause =(%d)\n", ue_id, *emm_cause); rc = emm_proc_attach_reject(ue_id, *emm_cause); - free_emm_attach_request_ies((emm_attach_request_ies_t * * const) & - params); + free_emm_attach_request_ies((emm_attach_request_ies_t * * const)¶ms); // Free the ESM container bdestroy_wrapper(&(msg->esmmessagecontainer)); // Free supported codec list diff --git a/lte/gateway/c/core/oai/tasks/nas/esm/sap/esm_send.cpp b/lte/gateway/c/core/oai/tasks/nas/esm/sap/esm_send.cpp index 94e38a27a93b..610088ef22ee 100644 --- a/lte/gateway/c/core/oai/tasks/nas/esm/sap/esm_send.cpp +++ b/lte/gateway/c/core/oai/tasks/nas/esm/sap/esm_send.cpp @@ -327,7 +327,7 @@ status_code_e esm_send_activate_default_eps_bearer_context_request( copy_protocol_configuration_options(&msg->protocolconfigurationoptions, pco); } - //#pragma message "TEST LG FORCE APN-AMBR" + // #pragma message "TEST LG FORCE APN-AMBR" OAILOG_DEBUG(LOG_NAS_ESM, "ESM-SAP - FORCE APN-AMBR DL %lu UL %lu\n", pdn_context_p->subscribed_apn_ambr.br_dl, pdn_context_p->subscribed_apn_ambr.br_ul); diff --git a/lte/gateway/c/core/oai/tasks/nas/ies/EsmMessageContainer.cpp b/lte/gateway/c/core/oai/tasks/nas/ies/EsmMessageContainer.cpp index a307b89803de..cfcef6617050 100644 --- a/lte/gateway/c/core/oai/tasks/nas/ies/EsmMessageContainer.cpp +++ b/lte/gateway/c/core/oai/tasks/nas/ies/EsmMessageContainer.cpp @@ -46,7 +46,7 @@ int decode_esm_message_container(EsmMessageContainer* esmmessagecontainer, } DECODE_LENGTH_U16(buffer + decoded, ielen, decoded); - CHECK_LENGTH_DECODER(len - decoded, ielen); + CHECK_LENGTH_DECODER(static_cast(len) - decoded, ielen); if ((decode_result = decode_bstring(esmmessagecontainer, ielen, buffer + decoded, len - decoded)) < 0) { diff --git a/lte/gateway/c/core/oai/tasks/nas/ies/PdnAddress.cpp b/lte/gateway/c/core/oai/tasks/nas/ies/PdnAddress.cpp index 44181db40afc..eefd0c0105ed 100644 --- a/lte/gateway/c/core/oai/tasks/nas/ies/PdnAddress.cpp +++ b/lte/gateway/c/core/oai/tasks/nas/ies/PdnAddress.cpp @@ -31,18 +31,22 @@ extern "C" { //------------------------------------------------------------------------------ int decode_pdn_address(PdnAddress* pdnaddress, uint8_t iei, uint8_t* buffer, uint32_t len) { + int signed_len = len; int decoded = 0; uint8_t ielen = 0; int decode_result; if (iei > 0) { + CHECK_LENGTH_DECODER(signed_len - decoded, 1); CHECK_IEI_DECODER(iei, *buffer); decoded++; } + CHECK_LENGTH_DECODER(signed_len - decoded, 2); + ielen = *(buffer + decoded); decoded++; - CHECK_LENGTH_DECODER(len - decoded, ielen); + CHECK_LENGTH_DECODER(signed_len - decoded, ielen); pdnaddress->pdntypevalue = *(buffer + decoded) & 0x7; decoded++; diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/AmfMessage.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/AmfMessage.cpp index 35246ef29c35..eccdcd915cda 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/AmfMessage.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/AmfMessage.cpp @@ -26,9 +26,9 @@ extern "C" { namespace magma5g { AmfMsg::AmfMsg() { memset(&msg, 0, sizeof(MMsg_u)); }; -AmfMsg::~AmfMsg(){}; -MMsg_u::MMsg_u(){}; -MMsg_u::~MMsg_u(){}; +AmfMsg::~AmfMsg() {}; +MMsg_u::MMsg_u() {}; +MMsg_u::~MMsg_u() {}; // Decode AMF NAS Header and Message int AmfMsg::M5gNasMessageDecodeMsg(AmfMsg* msg, uint8_t* buffer, uint32_t len) { diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationFailure.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationFailure.cpp index 53e39b8c59fe..728affe34cab 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationFailure.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationFailure.cpp @@ -21,8 +21,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -AuthenticationFailureMsg::AuthenticationFailureMsg(){}; -AuthenticationFailureMsg::~AuthenticationFailureMsg(){}; +AuthenticationFailureMsg::AuthenticationFailureMsg() {}; +AuthenticationFailureMsg::~AuthenticationFailureMsg() {}; // Decoding Authentication Failure Message and its IEs int AuthenticationFailureMsg::DecodeAuthenticationFailureMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationReject.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationReject.cpp index 358de18783bd..3334f0d6d232 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationReject.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationReject.cpp @@ -21,8 +21,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -AuthenticationRejectMsg::AuthenticationRejectMsg(){}; -AuthenticationRejectMsg::~AuthenticationRejectMsg(){}; +AuthenticationRejectMsg::AuthenticationRejectMsg() {}; +AuthenticationRejectMsg::~AuthenticationRejectMsg() {}; // Decoding Authentication Reject Message and its IEs int AuthenticationRejectMsg::DecodeAuthenticationRejectMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationRequest.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationRequest.cpp index f7a3e042e2ec..e4e1bfa2c252 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationRequest.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationRequest.cpp @@ -22,8 +22,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -AuthenticationRequestMsg::AuthenticationRequestMsg(){}; -AuthenticationRequestMsg::~AuthenticationRequestMsg(){}; +AuthenticationRequestMsg::AuthenticationRequestMsg() {}; +AuthenticationRequestMsg::~AuthenticationRequestMsg() {}; // Decode AuthenticationRequest Messsage int AuthenticationRequestMsg::DecodeAuthenticationRequestMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationResponse.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationResponse.cpp index 18cf2d83a4e4..8b35880a1076 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationResponse.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationResponse.cpp @@ -22,8 +22,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -AuthenticationResponseMsg::AuthenticationResponseMsg(){}; -AuthenticationResponseMsg::~AuthenticationResponseMsg(){}; +AuthenticationResponseMsg::AuthenticationResponseMsg() {}; +AuthenticationResponseMsg::~AuthenticationResponseMsg() {}; // Decode AuthenticationResponse Messsage int AuthenticationResponseMsg::DecodeAuthenticationResponseMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationResult.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationResult.cpp index 25705596f5af..933e8b5e3e9e 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationResult.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GAuthenticationResult.cpp @@ -22,8 +22,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -AuthenticationResultMsg::AuthenticationResultMsg(){}; -AuthenticationResultMsg::~AuthenticationResultMsg(){}; +AuthenticationResultMsg::AuthenticationResultMsg() {}; +AuthenticationResultMsg::~AuthenticationResultMsg() {}; // Decode Authentication Result Message and its IEs int AuthenticationResultMsg::DecodeAuthenticationResultMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GDLNASTransport.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GDLNASTransport.cpp index d85baea113bd..335deee87821 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GDLNASTransport.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GDLNASTransport.cpp @@ -23,8 +23,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -DLNASTransportMsg::DLNASTransportMsg(){}; -DLNASTransportMsg::~DLNASTransportMsg(){}; +DLNASTransportMsg::DLNASTransportMsg() {}; +DLNASTransportMsg::~DLNASTransportMsg() {}; // Decode DLNASTransport Message and its IEs int DLNASTransportMsg::DecodeDLNASTransportMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GDeRegistrationAcceptUEInit.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GDeRegistrationAcceptUEInit.cpp index 57522ba9c330..9347cf359e91 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GDeRegistrationAcceptUEInit.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GDeRegistrationAcceptUEInit.cpp @@ -22,8 +22,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -DeRegistrationAcceptUEInitMsg::DeRegistrationAcceptUEInitMsg(){}; -DeRegistrationAcceptUEInitMsg::~DeRegistrationAcceptUEInitMsg(){}; +DeRegistrationAcceptUEInitMsg::DeRegistrationAcceptUEInitMsg() {}; +DeRegistrationAcceptUEInitMsg::~DeRegistrationAcceptUEInitMsg() {}; // Decoding De Registration Accept Message and its IEs int DeRegistrationAcceptUEInitMsg::DecodeDeRegistrationAcceptUEInitMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GDeRegistrationRequestUEInit.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GDeRegistrationRequestUEInit.cpp index c03f6ea14fad..d9a2017ba6c0 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GDeRegistrationRequestUEInit.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GDeRegistrationRequestUEInit.cpp @@ -22,8 +22,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -DeRegistrationRequestUEInitMsg::DeRegistrationRequestUEInitMsg(){}; -DeRegistrationRequestUEInitMsg::~DeRegistrationRequestUEInitMsg(){}; +DeRegistrationRequestUEInitMsg::DeRegistrationRequestUEInitMsg() {}; +DeRegistrationRequestUEInitMsg::~DeRegistrationRequestUEInitMsg() {}; // Decode De Registration Request(UE) Message and its IEs int DeRegistrationRequestUEInitMsg::DecodeDeRegistrationRequestUEInitMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GIdentityRequest.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GIdentityRequest.cpp index 3a19aa56f520..006b54337942 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GIdentityRequest.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GIdentityRequest.cpp @@ -21,8 +21,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -IdentityRequestMsg::IdentityRequestMsg(){}; -IdentityRequestMsg::~IdentityRequestMsg(){}; +IdentityRequestMsg::IdentityRequestMsg() {}; +IdentityRequestMsg::~IdentityRequestMsg() {}; // Decode IdentityRequest Message and its IEs int IdentityRequestMsg::DecodeIdentityRequestMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GIdentityResponse.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GIdentityResponse.cpp index 55a8a5936566..a682d07ce31c 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GIdentityResponse.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GIdentityResponse.cpp @@ -21,8 +21,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -IdentityResponseMsg::IdentityResponseMsg(){}; -IdentityResponseMsg::~IdentityResponseMsg(){}; +IdentityResponseMsg::IdentityResponseMsg() {}; +IdentityResponseMsg::~IdentityResponseMsg() {}; // Decode IdentityResponse Message and its IEs int IdentityResponseMsg::DecodeIdentityResponseMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionEstablishmentAccept.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionEstablishmentAccept.cpp index 512273021264..05b075f97d48 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionEstablishmentAccept.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionEstablishmentAccept.cpp @@ -22,8 +22,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5gNasMessage.h" namespace magma5g { -PDUSessionEstablishmentAcceptMsg::PDUSessionEstablishmentAcceptMsg(){}; -PDUSessionEstablishmentAcceptMsg::~PDUSessionEstablishmentAcceptMsg(){}; +PDUSessionEstablishmentAcceptMsg::PDUSessionEstablishmentAcceptMsg() {}; +PDUSessionEstablishmentAcceptMsg::~PDUSessionEstablishmentAcceptMsg() {}; // Decode PDUSessionEstablishmentAccept Message and its IEs int PDUSessionEstablishmentAcceptMsg::DecodePDUSessionEstablishmentAcceptMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionEstablishmentReject.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionEstablishmentReject.cpp index c2a846f7a5f2..93424f408dc8 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionEstablishmentReject.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionEstablishmentReject.cpp @@ -21,8 +21,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -PDUSessionEstablishmentRejectMsg::PDUSessionEstablishmentRejectMsg(){}; -PDUSessionEstablishmentRejectMsg::~PDUSessionEstablishmentRejectMsg(){}; +PDUSessionEstablishmentRejectMsg::PDUSessionEstablishmentRejectMsg() {}; +PDUSessionEstablishmentRejectMsg::~PDUSessionEstablishmentRejectMsg() {}; // Decode PDUSessionEstablishmentReject Message and its IEs int PDUSessionEstablishmentRejectMsg::DecodePDUSessionEstablishmentRejectMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionEstablishmentRequest.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionEstablishmentRequest.cpp index f31cfa1a05ed..0ebb81afc7f5 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionEstablishmentRequest.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionEstablishmentRequest.cpp @@ -22,8 +22,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -PDUSessionEstablishmentRequestMsg::PDUSessionEstablishmentRequestMsg(){}; -PDUSessionEstablishmentRequestMsg::~PDUSessionEstablishmentRequestMsg(){}; +PDUSessionEstablishmentRequestMsg::PDUSessionEstablishmentRequestMsg() {}; +PDUSessionEstablishmentRequestMsg::~PDUSessionEstablishmentRequestMsg() {}; // Decode PDUSessionEstablishmentRequest Message and its IEs int PDUSessionEstablishmentRequestMsg::DecodePDUSessionEstablishmentRequestMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionModificationReject.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionModificationReject.cpp index 31a05f5ec9d5..e94806cb1bec 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionModificationReject.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionModificationReject.cpp @@ -22,8 +22,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5gNasMessage.h" namespace magma5g { -PDUSessionModificationRejectMsg::PDUSessionModificationRejectMsg(){}; -PDUSessionModificationRejectMsg::~PDUSessionModificationRejectMsg(){}; +PDUSessionModificationRejectMsg::PDUSessionModificationRejectMsg() {}; +PDUSessionModificationRejectMsg::~PDUSessionModificationRejectMsg() {}; // Decode PDUSessionModificationReject Message and its IEs int PDUSessionModificationRejectMsg::DecodePDUSessionModificationRejectMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionModificationRequest.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionModificationRequest.cpp index b4311a50cc08..5aa0194c9107 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionModificationRequest.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionModificationRequest.cpp @@ -24,8 +24,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5gNasMessage.h" namespace magma5g { -PDUSessionModificationRequestMsg::PDUSessionModificationRequestMsg(){}; -PDUSessionModificationRequestMsg::~PDUSessionModificationRequestMsg(){}; +PDUSessionModificationRequestMsg::PDUSessionModificationRequestMsg() {}; +PDUSessionModificationRequestMsg::~PDUSessionModificationRequestMsg() {}; // Decode PDUSessionModificationRequest Message and its IEs int PDUSessionModificationRequestMsg::DecodePDUSessionModificationRequestMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionReleaseCommand.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionReleaseCommand.cpp index 24055218935a..3eeef83dfa4c 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionReleaseCommand.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionReleaseCommand.cpp @@ -21,8 +21,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -PDUSessionReleaseCommandMsg::PDUSessionReleaseCommandMsg(){}; -PDUSessionReleaseCommandMsg::~PDUSessionReleaseCommandMsg(){}; +PDUSessionReleaseCommandMsg::PDUSessionReleaseCommandMsg() {}; +PDUSessionReleaseCommandMsg::~PDUSessionReleaseCommandMsg() {}; // Decode PDUSessionReleaseCommand Message and its IEs int PDUSessionReleaseCommandMsg::DecodePDUSessionReleaseCommandMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionReleaseReject.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionReleaseReject.cpp index 81c0fecd0b1e..f0f52d6ceab4 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionReleaseReject.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionReleaseReject.cpp @@ -21,8 +21,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -PDUSessionReleaseRejectMsg::PDUSessionReleaseRejectMsg(){}; -PDUSessionReleaseRejectMsg::~PDUSessionReleaseRejectMsg(){}; +PDUSessionReleaseRejectMsg::PDUSessionReleaseRejectMsg() {}; +PDUSessionReleaseRejectMsg::~PDUSessionReleaseRejectMsg() {}; // Decode PDUSessionReleaseReject Message and its IEs int PDUSessionReleaseRejectMsg::DecodePDUSessionReleaseRejectMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionReleaseRequest.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionReleaseRequest.cpp index 4cad00f47107..903a03487873 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionReleaseRequest.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GPDUSessionReleaseRequest.cpp @@ -21,8 +21,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -PDUSessionReleaseRequestMsg::PDUSessionReleaseRequestMsg(){}; -PDUSessionReleaseRequestMsg::~PDUSessionReleaseRequestMsg(){}; +PDUSessionReleaseRequestMsg::PDUSessionReleaseRequestMsg() {}; +PDUSessionReleaseRequestMsg::~PDUSessionReleaseRequestMsg() {}; // Decode PDUSessionReleaseRequest Message and its IEs int PDUSessionReleaseRequestMsg::DecodePDUSessionReleaseRequestMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GRegistrationAccept.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GRegistrationAccept.cpp index 2fd67a1d0941..ea8297a75640 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GRegistrationAccept.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GRegistrationAccept.cpp @@ -22,8 +22,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5gNasMessage.h" namespace magma5g { -RegistrationAcceptMsg::RegistrationAcceptMsg(){}; -RegistrationAcceptMsg::~RegistrationAcceptMsg(){}; +RegistrationAcceptMsg::RegistrationAcceptMsg() {}; +RegistrationAcceptMsg::~RegistrationAcceptMsg() {}; // Decoding Registration Accept Message and its IEs int RegistrationAcceptMsg::DecodeRegistrationAcceptMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GRegistrationComplete.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GRegistrationComplete.cpp index 21368d523fd6..33618ee9e50f 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GRegistrationComplete.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GRegistrationComplete.cpp @@ -21,8 +21,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -RegistrationCompleteMsg::RegistrationCompleteMsg(){}; -RegistrationCompleteMsg::~RegistrationCompleteMsg(){}; +RegistrationCompleteMsg::RegistrationCompleteMsg() {}; +RegistrationCompleteMsg::~RegistrationCompleteMsg() {}; // Decoding Registration Complete Message and its IEs int RegistrationCompleteMsg::DecodeRegistrationCompleteMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GRegistrationReject.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GRegistrationReject.cpp index 640e8c6202b7..c8873c89ff56 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GRegistrationReject.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GRegistrationReject.cpp @@ -21,8 +21,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -RegistrationRejectMsg::RegistrationRejectMsg(){}; -RegistrationRejectMsg::~RegistrationRejectMsg(){}; +RegistrationRejectMsg::RegistrationRejectMsg() {}; +RegistrationRejectMsg::~RegistrationRejectMsg() {}; // Decoding Registration Reject Message and its IEs int RegistrationRejectMsg::DecodeRegistrationRejectMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GRegistrationRequest.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GRegistrationRequest.cpp index d38444d44a1d..acd2183e858f 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GRegistrationRequest.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GRegistrationRequest.cpp @@ -22,8 +22,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GRegistrationRequest.hpp" namespace magma5g { -RegistrationRequestMsg::RegistrationRequestMsg(){}; -RegistrationRequestMsg::~RegistrationRequestMsg(){}; +RegistrationRequestMsg::RegistrationRequestMsg() {}; +RegistrationRequestMsg::~RegistrationRequestMsg() {}; // Decode RegistrationRequest Message and its IEs int RegistrationRequestMsg::DecodeRegistrationRequestMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GSecurityModeCommand.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GSecurityModeCommand.cpp index 2cce68e63b16..423c41269340 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GSecurityModeCommand.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GSecurityModeCommand.cpp @@ -21,8 +21,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -SecurityModeCommandMsg::SecurityModeCommandMsg(){}; -SecurityModeCommandMsg::~SecurityModeCommandMsg(){}; +SecurityModeCommandMsg::SecurityModeCommandMsg() {}; +SecurityModeCommandMsg::~SecurityModeCommandMsg() {}; // Decode SecurityModeCommand Message and its IEs int SecurityModeCommandMsg::DecodeSecurityModeCommandMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GSecurityModeComplete.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GSecurityModeComplete.cpp index 9eb7f2a8550c..3f6d724527cc 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GSecurityModeComplete.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GSecurityModeComplete.cpp @@ -21,8 +21,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -SecurityModeCompleteMsg::SecurityModeCompleteMsg(){}; -SecurityModeCompleteMsg::~SecurityModeCompleteMsg(){}; +SecurityModeCompleteMsg::SecurityModeCompleteMsg() {}; +SecurityModeCompleteMsg::~SecurityModeCompleteMsg() {}; // Decode SecurityModeComplete Message and its IEs int SecurityModeCompleteMsg::DecodeSecurityModeCompleteMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GSecurityModeReject.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GSecurityModeReject.cpp index b4f103d5bed0..eb4c90bb84fc 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GSecurityModeReject.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GSecurityModeReject.cpp @@ -21,8 +21,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -SecurityModeRejectMsg::SecurityModeRejectMsg(){}; -SecurityModeRejectMsg::~SecurityModeRejectMsg(){}; +SecurityModeRejectMsg::SecurityModeRejectMsg() {}; +SecurityModeRejectMsg::~SecurityModeRejectMsg() {}; // Decoding Security Mode Reject Message and its IEs int SecurityModeRejectMsg::DecodeSecurityModeRejectMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GServiceAccept.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GServiceAccept.cpp index 044e2865f71c..a3e06d75dd46 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GServiceAccept.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GServiceAccept.cpp @@ -21,8 +21,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -ServiceAcceptMsg::ServiceAcceptMsg(){}; -ServiceAcceptMsg::~ServiceAcceptMsg(){}; +ServiceAcceptMsg::ServiceAcceptMsg() {}; +ServiceAcceptMsg::~ServiceAcceptMsg() {}; // Decoding Service Accept Message and its IEs int ServiceAcceptMsg::DecodeServiceAcceptMsg(ServiceAcceptMsg* svc_acpt, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GServiceReject.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GServiceReject.cpp index a3c38e8dd11e..b0769874cb12 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GServiceReject.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GServiceReject.cpp @@ -22,8 +22,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -ServiceRejectMsg::ServiceRejectMsg(){}; -ServiceRejectMsg::~ServiceRejectMsg(){}; +ServiceRejectMsg::ServiceRejectMsg() {}; +ServiceRejectMsg::~ServiceRejectMsg() {}; // Decoding Service Reject Message and its IEs int ServiceRejectMsg::DecodeServiceRejectMsg(ServiceRejectMsg* svc_rej, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GServiceRequest.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GServiceRequest.cpp index d4aa92ec062e..236d82e13523 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GServiceRequest.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GServiceRequest.cpp @@ -23,8 +23,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5gNasMessage.h" namespace magma5g { -ServiceRequestMsg::ServiceRequestMsg(){}; -ServiceRequestMsg::~ServiceRequestMsg(){}; +ServiceRequestMsg::ServiceRequestMsg() {}; +ServiceRequestMsg::~ServiceRequestMsg() {}; // Decode ServiceRequest Messsage int ServiceRequestMsg::DecodeServiceRequestMsg(ServiceRequestMsg* svc_req, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GULNASTransport.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GULNASTransport.cpp index 33bb5031c5d1..1d713aa58405 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/M5GULNASTransport.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/M5GULNASTransport.cpp @@ -22,8 +22,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -ULNASTransportMsg::ULNASTransportMsg(){}; -ULNASTransportMsg::~ULNASTransportMsg(){}; +ULNASTransportMsg::ULNASTransportMsg() {}; +ULNASTransportMsg::~ULNASTransportMsg() {}; // Decode ULNASTransport Message and its IEs int ULNASTransportMsg::DecodeULNASTransportMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/SmfMessage.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/SmfMessage.cpp index d9c79e4ed919..7bc84e150636 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/SmfMessage.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/SmfMessage.cpp @@ -24,10 +24,10 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/amf/amf_app_defs.hpp" namespace magma5g { -SMsg_u::SMsg_u(){}; -SMsg_u::~SMsg_u(){}; -SmfMsg::SmfMsg(){}; -SmfMsg::~SmfMsg(){}; +SMsg_u::SMsg_u() {}; +SMsg_u::~SMsg_u() {}; +SmfMsg::SmfMsg() {}; +SmfMsg::~SmfMsg() {}; // Decode SMF Message Header int SmfMsg::SmfMsgDecodeHeaderMsg(SmfMsgHeader* hdr, uint8_t* buffer, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GABBA.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GABBA.cpp index a52996772ef2..38917f12df47 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GABBA.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GABBA.cpp @@ -23,8 +23,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -ABBAMsg::ABBAMsg(){}; -ABBAMsg::~ABBAMsg(){}; +ABBAMsg::ABBAMsg() {}; +ABBAMsg::~ABBAMsg() {}; // Decode ABBA Message IE int ABBAMsg::DecodeABBAMsg(ABBAMsg* abba, uint8_t iei, uint8_t* buffer, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GAuthenticationFailureIE.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GAuthenticationFailureIE.cpp index e16ca4cba22d..75186d1f9d16 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GAuthenticationFailureIE.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GAuthenticationFailureIE.cpp @@ -22,8 +22,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -M5GAuthenticationFailureIE::M5GAuthenticationFailureIE(){}; -M5GAuthenticationFailureIE::~M5GAuthenticationFailureIE(){}; +M5GAuthenticationFailureIE::M5GAuthenticationFailureIE() {}; +M5GAuthenticationFailureIE::~M5GAuthenticationFailureIE() {}; // Decode 5GMMCause IE int M5GAuthenticationFailureIE::DecodeM5GAuthenticationFailureIE( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GAuthenticationParameterAUTN.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GAuthenticationParameterAUTN.cpp index fe906ab67a1a..31129e15af58 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GAuthenticationParameterAUTN.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GAuthenticationParameterAUTN.cpp @@ -23,8 +23,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -AuthenticationParameterAUTNMsg::AuthenticationParameterAUTNMsg(){}; -AuthenticationParameterAUTNMsg::~AuthenticationParameterAUTNMsg(){}; +AuthenticationParameterAUTNMsg::AuthenticationParameterAUTNMsg() {}; +AuthenticationParameterAUTNMsg::~AuthenticationParameterAUTNMsg() {}; // Decode AuthenticationParameterAUTN IE int AuthenticationParameterAUTNMsg::DecodeAuthenticationParameterAUTNMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GAuthenticationParameterRAND.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GAuthenticationParameterRAND.cpp index 2819f0492881..03ed2dd764c3 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GAuthenticationParameterRAND.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GAuthenticationParameterRAND.cpp @@ -23,8 +23,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -AuthenticationParameterRANDMsg::AuthenticationParameterRANDMsg(){}; -AuthenticationParameterRANDMsg::~AuthenticationParameterRANDMsg(){}; +AuthenticationParameterRANDMsg::AuthenticationParameterRANDMsg() {}; +AuthenticationParameterRANDMsg::~AuthenticationParameterRANDMsg() {}; // Decode AuthenticationParameterRAND IE int AuthenticationParameterRANDMsg::DecodeAuthenticationParameterRANDMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GAuthenticationResponseParameter.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GAuthenticationResponseParameter.cpp index 9709c30de4b3..25e0d3bdee11 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GAuthenticationResponseParameter.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GAuthenticationResponseParameter.cpp @@ -24,8 +24,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -AuthenticationResponseParameterMsg::AuthenticationResponseParameterMsg(){}; -AuthenticationResponseParameterMsg::~AuthenticationResponseParameterMsg(){}; +AuthenticationResponseParameterMsg::AuthenticationResponseParameterMsg() {}; +AuthenticationResponseParameterMsg::~AuthenticationResponseParameterMsg() {}; // Decode AuthenticationResponseParameter IE int AuthenticationResponseParameterMsg:: diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GDNN.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GDNN.cpp index 4625b35e7271..5fd9a511d206 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GDNN.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GDNN.cpp @@ -25,8 +25,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -DNNMsg::DNNMsg(){}; -DNNMsg::~DNNMsg(){}; +DNNMsg::DNNMsg() {}; +DNNMsg::~DNNMsg() {}; // Decode DNN Message int DNNMsg::DecodeDNNMsg(DNNMsg* dnn_message, uint8_t iei, uint8_t* buffer, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GEAPMessage.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GEAPMessage.cpp index 91c6c6cedc20..33a582ba7d33 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GEAPMessage.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GEAPMessage.cpp @@ -23,8 +23,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -EAPMessageMsg::EAPMessageMsg(){}; -EAPMessageMsg::~EAPMessageMsg(){}; +EAPMessageMsg::EAPMessageMsg() {}; +EAPMessageMsg::~EAPMessageMsg() {}; // Decode EAP Message int EAPMessageMsg::DecodeEAPMessageMsg(EAPMessageMsg* eap_message, uint8_t iei, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GExtendedProtocolDiscriminator.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GExtendedProtocolDiscriminator.cpp index 10dec33c23dc..cf155bcb1651 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GExtendedProtocolDiscriminator.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GExtendedProtocolDiscriminator.cpp @@ -15,8 +15,8 @@ #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -ExtendedProtocolDiscriminatorMsg::ExtendedProtocolDiscriminatorMsg(){}; -ExtendedProtocolDiscriminatorMsg::~ExtendedProtocolDiscriminatorMsg(){}; +ExtendedProtocolDiscriminatorMsg::ExtendedProtocolDiscriminatorMsg() {}; +ExtendedProtocolDiscriminatorMsg::~ExtendedProtocolDiscriminatorMsg() {}; // Decode ExtendedProtocolDiscriminator IE int ExtendedProtocolDiscriminatorMsg::DecodeExtendedProtocolDiscriminatorMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GGprsTimer2.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GGprsTimer2.cpp index e0199657b007..da3798a6869a 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GGprsTimer2.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GGprsTimer2.cpp @@ -23,8 +23,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -GPRSTimer2Msg::GPRSTimer2Msg(){}; -GPRSTimer2Msg::~GPRSTimer2Msg(){}; +GPRSTimer2Msg::GPRSTimer2Msg() {}; +GPRSTimer2Msg::~GPRSTimer2Msg() {}; int GPRSTimer2Msg::DecodeGPRSTimer2Msg(GPRSTimer2Msg* gprstimer, uint8_t iei, uint8_t* buffer, uint32_t len) { diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GGprsTimer3.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GGprsTimer3.cpp index 3be301f322fb..58ca79dd2a6d 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GGprsTimer3.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GGprsTimer3.cpp @@ -23,8 +23,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -GPRSTimer3Msg::GPRSTimer3Msg(){}; -GPRSTimer3Msg::~GPRSTimer3Msg(){}; +GPRSTimer3Msg::GPRSTimer3Msg() {}; +GPRSTimer3Msg::~GPRSTimer3Msg() {}; int GPRSTimer3Msg::DecodeGPRSTimer3Msg(GPRSTimer3Msg* gprstimer, uint8_t iei, uint8_t* buffer, uint32_t len) { diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GIMEISVRequest.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GIMEISVRequest.cpp index 2ddf7cf17be8..da4caabf5dc0 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GIMEISVRequest.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GIMEISVRequest.cpp @@ -23,8 +23,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -ImeisvRequestMsg::ImeisvRequestMsg(){}; -ImeisvRequestMsg::~ImeisvRequestMsg(){}; +ImeisvRequestMsg::ImeisvRequestMsg() {}; +ImeisvRequestMsg::~ImeisvRequestMsg() {}; int ImeisvRequestMsg::DecodeImeisvRequestMsg(ImeisvRequestMsg* imeisv_request, uint8_t iei, uint8_t* buffer, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GIntegrityProtMaxDataRate.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GIntegrityProtMaxDataRate.cpp index 0426ee8e0a93..7c09d7b85352 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GIntegrityProtMaxDataRate.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GIntegrityProtMaxDataRate.cpp @@ -15,8 +15,8 @@ #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -IntegrityProtMaxDataRateMsg::IntegrityProtMaxDataRateMsg(){}; -IntegrityProtMaxDataRateMsg::~IntegrityProtMaxDataRateMsg(){}; +IntegrityProtMaxDataRateMsg::IntegrityProtMaxDataRateMsg() {}; +IntegrityProtMaxDataRateMsg::~IntegrityProtMaxDataRateMsg() {}; // Decode IntegrityProtMaxDataRate IE int IntegrityProtMaxDataRateMsg::DecodeIntegrityProtMaxDataRateMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GMMCause.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GMMCause.cpp index 672e56bc4739..1a32c1dc90b1 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GMMCause.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GMMCause.cpp @@ -22,8 +22,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -M5GMMCauseMsg::M5GMMCauseMsg(){}; -M5GMMCauseMsg::~M5GMMCauseMsg(){}; +M5GMMCauseMsg::M5GMMCauseMsg() {}; +M5GMMCauseMsg::~M5GMMCauseMsg() {}; // Decode 5GMMCause IE int M5GMMCauseMsg::DecodeM5GMMCauseMsg(M5GMMCauseMsg* m5gmm_cause, uint8_t iei, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GMessageType.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GMessageType.cpp index 76fb9069c7e8..9cd37288309d 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GMessageType.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GMessageType.cpp @@ -16,8 +16,8 @@ #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -MessageTypeMsg::MessageTypeMsg(){}; -MessageTypeMsg::~MessageTypeMsg(){}; +MessageTypeMsg::MessageTypeMsg() {}; +MessageTypeMsg::~MessageTypeMsg() {}; // Decode MessageType IE int MessageTypeMsg::DecodeMessageTypeMsg(MessageTypeMsg* message_type, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GNASSecurityAlgorithms.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GNASSecurityAlgorithms.cpp index 8d25b363b92b..15db65b72fd9 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GNASSecurityAlgorithms.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GNASSecurityAlgorithms.cpp @@ -22,8 +22,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -NASSecurityAlgorithmsMsg::NASSecurityAlgorithmsMsg(){}; -NASSecurityAlgorithmsMsg::~NASSecurityAlgorithmsMsg(){}; +NASSecurityAlgorithmsMsg::NASSecurityAlgorithmsMsg() {}; +NASSecurityAlgorithmsMsg::~NASSecurityAlgorithmsMsg() {}; // Decode NASSecurityAlgorithms IE int NASSecurityAlgorithmsMsg::DecodeNASSecurityAlgorithmsMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GNSSAI.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GNSSAI.cpp index 1f526e6a7726..e1cdf94ed753 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GNSSAI.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GNSSAI.cpp @@ -21,9 +21,9 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/ies/M5GNSSAI.hpp" #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -NSSAIMsg::NSSAIMsg(){}; +NSSAIMsg::NSSAIMsg() {}; -NSSAIMsg::~NSSAIMsg(){}; +NSSAIMsg::~NSSAIMsg() {}; int NSSAIMsg::EncodeNSSAIMsg(NSSAIMsg* NSSAI, uint8_t iei, uint8_t* buffer, uint32_t len) { diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GNasKeySetIdentifier.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GNasKeySetIdentifier.cpp index ccf949055e89..716eef43a2fe 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GNasKeySetIdentifier.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GNasKeySetIdentifier.cpp @@ -23,8 +23,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -NASKeySetIdentifierMsg::NASKeySetIdentifierMsg(){}; -NASKeySetIdentifierMsg::~NASKeySetIdentifierMsg(){}; +NASKeySetIdentifierMsg::NASKeySetIdentifierMsg() {}; +NASKeySetIdentifierMsg::~NASKeySetIdentifierMsg() {}; // Decode NASKeySetIdentifier IE int NASKeySetIdentifierMsg::DecodeNASKeySetIdentifierMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUAddress.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUAddress.cpp index dab7e01028f6..14242d9a4e87 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUAddress.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUAddress.cpp @@ -25,8 +25,8 @@ extern "C" { #endif namespace magma5g { -PDUAddressMsg::PDUAddressMsg(){}; -PDUAddressMsg::~PDUAddressMsg(){}; +PDUAddressMsg::PDUAddressMsg() {}; +PDUAddressMsg::~PDUAddressMsg() {}; // Decode PDUAddress IE int PDUAddressMsg::DecodePDUAddressMsg(PDUAddressMsg* pdu_address, uint8_t iei, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUSessionIdentity.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUSessionIdentity.cpp index a7b4d03c04fc..a0945997dd30 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUSessionIdentity.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUSessionIdentity.cpp @@ -23,8 +23,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5gNasMessage.h" namespace magma5g { -PDUSessionIdentityMsg::PDUSessionIdentityMsg(){}; -PDUSessionIdentityMsg::~PDUSessionIdentityMsg(){}; +PDUSessionIdentityMsg::PDUSessionIdentityMsg() {}; +PDUSessionIdentityMsg::~PDUSessionIdentityMsg() {}; // Decode PDUSessionIdentity IE int PDUSessionIdentityMsg::DecodePDUSessionIdentityMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUSessionReActivationResult.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUSessionReActivationResult.cpp index a10b2a498515..ac83148304ce 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUSessionReActivationResult.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUSessionReActivationResult.cpp @@ -17,8 +17,8 @@ limitations under the License. #include "lte/gateway/c/core/oai/tasks/nas5g/include/ies/M5GPDUSessionReActivationResult.hpp" namespace magma5g { -M5GPDUSessionReActivationResult::M5GPDUSessionReActivationResult(){}; -M5GPDUSessionReActivationResult::~M5GPDUSessionReActivationResult(){}; +M5GPDUSessionReActivationResult::M5GPDUSessionReActivationResult() {}; +M5GPDUSessionReActivationResult::~M5GPDUSessionReActivationResult() {}; int M5GPDUSessionReActivationResult::EncodePDUSessionReActivationResult( M5GPDUSessionReActivationResult* pduSessionReActivationStatus, uint8_t iei, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUSessionStatus.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUSessionStatus.cpp index 623c81f79c78..5b8a44100601 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUSessionStatus.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUSessionStatus.cpp @@ -17,8 +17,8 @@ limitations under the License. #include "lte/gateway/c/core/oai/tasks/nas5g/include/ies/M5GPDUSessionStatus.hpp" namespace magma5g { -M5GPDUSessionStatus::M5GPDUSessionStatus(){}; -M5GPDUSessionStatus::~M5GPDUSessionStatus(){}; +M5GPDUSessionStatus::M5GPDUSessionStatus() {}; +M5GPDUSessionStatus::~M5GPDUSessionStatus() {}; int M5GPDUSessionStatus::EncodePDUSessionStatus( M5GPDUSessionStatus* pduSessionStatus, uint8_t iei, uint8_t* buffer, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUSessionType.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUSessionType.cpp index d20b2dd67c24..d03920f81e72 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUSessionType.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPDUSessionType.cpp @@ -24,8 +24,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -PDUSessionTypeMsg::PDUSessionTypeMsg(){}; -PDUSessionTypeMsg::~PDUSessionTypeMsg(){}; +PDUSessionTypeMsg::PDUSessionTypeMsg() {}; +PDUSessionTypeMsg::~PDUSessionTypeMsg() {}; // Decode PDUSessionType IE int PDUSessionTypeMsg::DecodePDUSessionTypeMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPTI.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPTI.cpp index 51e40c88d079..b49614952f46 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPTI.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPTI.cpp @@ -15,8 +15,8 @@ #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -PTIMsg::PTIMsg(){}; -PTIMsg::~PTIMsg(){}; +PTIMsg::PTIMsg() {}; +PTIMsg::~PTIMsg() {}; // Decode PTI IE int PTIMsg::DecodePTIMsg(PTIMsg* pti, uint8_t iei, uint8_t* buffer, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPayloadContainer.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPayloadContainer.cpp index 7dd95039e283..99fc62c7be1d 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPayloadContainer.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPayloadContainer.cpp @@ -24,8 +24,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -PayloadContainerMsg::PayloadContainerMsg(){}; -PayloadContainerMsg::~PayloadContainerMsg(){}; +PayloadContainerMsg::PayloadContainerMsg() {}; +PayloadContainerMsg::~PayloadContainerMsg() {}; int PayloadContainerMsg::DecodePayloadContainerMsg( PayloadContainerMsg* payload_container, uint8_t iei, uint8_t* buffer, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPayloadContainerType.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPayloadContainerType.cpp index df3b83c2a8bd..be77ffd09671 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPayloadContainerType.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GPayloadContainerType.cpp @@ -17,8 +17,8 @@ #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -PayloadContainerTypeMsg::PayloadContainerTypeMsg(){}; -PayloadContainerTypeMsg::~PayloadContainerTypeMsg(){}; +PayloadContainerTypeMsg::PayloadContainerTypeMsg() {}; +PayloadContainerTypeMsg::~PayloadContainerTypeMsg() {}; // Decode PayloadContainerType IE int PayloadContainerTypeMsg::DecodePayloadContainerTypeMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSDeRegistrationType.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSDeRegistrationType.cpp index 0614a3a7c1f5..36836e4bf902 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSDeRegistrationType.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSDeRegistrationType.cpp @@ -16,8 +16,8 @@ limitations under the License. #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -M5GSDeRegistrationTypeMsg::M5GSDeRegistrationTypeMsg(){}; -M5GSDeRegistrationTypeMsg::~M5GSDeRegistrationTypeMsg(){}; +M5GSDeRegistrationTypeMsg::M5GSDeRegistrationTypeMsg() {}; +M5GSDeRegistrationTypeMsg::~M5GSDeRegistrationTypeMsg() {}; int M5GSDeRegistrationTypeMsg::DecodeM5GSDeRegistrationTypeMsg( M5GSDeRegistrationTypeMsg* de_reg_type, uint8_t iei, uint8_t* buffer, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSIdentityType.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSIdentityType.cpp index e4427df289bd..3456d19cc6a6 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSIdentityType.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSIdentityType.cpp @@ -15,8 +15,8 @@ #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -M5GSIdentityTypeMsg::M5GSIdentityTypeMsg(){}; -M5GSIdentityTypeMsg::~M5GSIdentityTypeMsg(){}; +M5GSIdentityTypeMsg::M5GSIdentityTypeMsg() {}; +M5GSIdentityTypeMsg::~M5GSIdentityTypeMsg() {}; // Decode M5GSIdentityType IE int M5GSIdentityTypeMsg::DecodeM5GSIdentityTypeMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSMobileIdentity.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSMobileIdentity.cpp index 707f2d28585a..16c36ba71b63 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSMobileIdentity.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSMobileIdentity.cpp @@ -25,20 +25,20 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -M5GSMobileIdentityMsg::M5GSMobileIdentityMsg(){}; -M5GSMobileIdentityMsg::~M5GSMobileIdentityMsg(){}; -GutiM5GSMobileIdentity::GutiM5GSMobileIdentity(){}; -GutiM5GSMobileIdentity::~GutiM5GSMobileIdentity(){}; -ImeiM5GSMobileIdentity::ImeiM5GSMobileIdentity(){}; -ImeiM5GSMobileIdentity::~ImeiM5GSMobileIdentity(){}; -ImsiM5GSMobileIdentity::ImsiM5GSMobileIdentity(){}; -ImsiM5GSMobileIdentity::~ImsiM5GSMobileIdentity(){}; -SuciM5GSMobileIdentity::SuciM5GSMobileIdentity(){}; -SuciM5GSMobileIdentity::~SuciM5GSMobileIdentity(){}; -TmsiM5GSMobileIdentity::TmsiM5GSMobileIdentity(){}; -TmsiM5GSMobileIdentity::~TmsiM5GSMobileIdentity(){}; -M5GSMobileIdentityIe::M5GSMobileIdentityIe(){}; -M5GSMobileIdentityIe::~M5GSMobileIdentityIe(){}; +M5GSMobileIdentityMsg::M5GSMobileIdentityMsg() {}; +M5GSMobileIdentityMsg::~M5GSMobileIdentityMsg() {}; +GutiM5GSMobileIdentity::GutiM5GSMobileIdentity() {}; +GutiM5GSMobileIdentity::~GutiM5GSMobileIdentity() {}; +ImeiM5GSMobileIdentity::ImeiM5GSMobileIdentity() {}; +ImeiM5GSMobileIdentity::~ImeiM5GSMobileIdentity() {}; +ImsiM5GSMobileIdentity::ImsiM5GSMobileIdentity() {}; +ImsiM5GSMobileIdentity::~ImsiM5GSMobileIdentity() {}; +SuciM5GSMobileIdentity::SuciM5GSMobileIdentity() {}; +SuciM5GSMobileIdentity::~SuciM5GSMobileIdentity() {}; +TmsiM5GSMobileIdentity::TmsiM5GSMobileIdentity() {}; +TmsiM5GSMobileIdentity::~TmsiM5GSMobileIdentity() {}; +M5GSMobileIdentityIe::M5GSMobileIdentityIe() {}; +M5GSMobileIdentityIe::~M5GSMobileIdentityIe() {}; // Decode GutiMobileIdentity IE Message int M5GSMobileIdentityMsg::DecodeGutiMobileIdentityMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSRegistrationResult.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSRegistrationResult.cpp index f540771cbe4c..093a7507ccb4 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSRegistrationResult.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSRegistrationResult.cpp @@ -24,8 +24,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -M5GSRegistrationResultMsg::M5GSRegistrationResultMsg(){}; -M5GSRegistrationResultMsg::~M5GSRegistrationResultMsg(){}; +M5GSRegistrationResultMsg::M5GSRegistrationResultMsg() {}; +M5GSRegistrationResultMsg::~M5GSRegistrationResultMsg() {}; // Decode 5GS Registration Result message and its IEs int M5GSRegistrationResultMsg::DecodeM5GSRegistrationResultMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSRegistrationType.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSRegistrationType.cpp index 487e989e34cf..6dde017d282b 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSRegistrationType.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSRegistrationType.cpp @@ -24,8 +24,8 @@ extern "C" { #include namespace magma5g { -M5GSRegistrationTypeMsg::M5GSRegistrationTypeMsg(){}; -M5GSRegistrationTypeMsg::~M5GSRegistrationTypeMsg(){}; +M5GSRegistrationTypeMsg::M5GSRegistrationTypeMsg() {}; +M5GSRegistrationTypeMsg::~M5GSRegistrationTypeMsg() {}; // Decode M5GSRegistrationType Message int M5GSRegistrationTypeMsg::DecodeM5GSRegistrationTypeMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSSCMode.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSSCMode.cpp index e5b157e8b4fd..3675262e65cb 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSSCMode.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSSCMode.cpp @@ -24,8 +24,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -SSCModeMsg::SSCModeMsg(){}; -SSCModeMsg::~SSCModeMsg(){}; +SSCModeMsg::SSCModeMsg() {}; +SSCModeMsg::~SSCModeMsg() {}; // Decode SSCMode IE int SSCModeMsg::DecodeSSCModeMsg(SSCModeMsg* ssc_mode, uint8_t iei, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSecurityHeaderType.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSecurityHeaderType.cpp index fd5db99dbe48..c3bc6d1bb9f2 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSecurityHeaderType.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSecurityHeaderType.cpp @@ -16,8 +16,8 @@ #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -SecurityHeaderTypeMsg::SecurityHeaderTypeMsg(){}; -SecurityHeaderTypeMsg::~SecurityHeaderTypeMsg(){}; +SecurityHeaderTypeMsg::SecurityHeaderTypeMsg() {}; +SecurityHeaderTypeMsg::~SecurityHeaderTypeMsg() {}; // Decode SecurityHeaderType IE int SecurityHeaderTypeMsg::DecodeSecurityHeaderTypeMsg( @@ -25,7 +25,7 @@ int SecurityHeaderTypeMsg::DecodeSecurityHeaderTypeMsg( uint32_t len) { int decoded = 0; - sec_header_type->sec_hdr = *(buffer)&0xf; + sec_header_type->sec_hdr = *(buffer) & 0xf; decoded++; return (decoded); }; diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GServiceType.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GServiceType.cpp index c8866e3822e8..497f2c2b26bf 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GServiceType.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GServiceType.cpp @@ -17,8 +17,8 @@ #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -ServiceTypeMsg::ServiceTypeMsg(){}; -ServiceTypeMsg::~ServiceTypeMsg(){}; +ServiceTypeMsg::ServiceTypeMsg() {}; +ServiceTypeMsg::~ServiceTypeMsg() {}; // Decode ServiceType IE int ServiceTypeMsg::DecodeServiceTypeMsg(ServiceTypeMsg* svc_type, uint8_t iei, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSpareHalfOctet.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSpareHalfOctet.cpp index 4d3c11569f63..d20868750463 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSpareHalfOctet.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GSpareHalfOctet.cpp @@ -16,8 +16,8 @@ #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -SpareHalfOctetMsg::SpareHalfOctetMsg(){}; -SpareHalfOctetMsg::~SpareHalfOctetMsg(){}; +SpareHalfOctetMsg::SpareHalfOctetMsg() {}; +SpareHalfOctetMsg::~SpareHalfOctetMsg() {}; // Decode SpareHalfOctet IE int SpareHalfOctetMsg::DecodeSpareHalfOctetMsg( diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GTAIList.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GTAIList.cpp index dce33a42c37e..21a508346b11 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GTAIList.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GTAIList.cpp @@ -21,9 +21,9 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/ies/M5GTAIList.hpp" #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -TAIListMsg::TAIListMsg(){}; +TAIListMsg::TAIListMsg() {}; -TAIListMsg::~TAIListMsg(){}; +TAIListMsg::~TAIListMsg() {}; int TAIListMsg::EncodeTAIListMsg(TAIListMsg* TAIList, uint8_t iei, uint8_t* buffer, uint32_t len) { diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GUESecurityCapability.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GUESecurityCapability.cpp index 5e8cca014641..3991311e05e9 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GUESecurityCapability.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GUESecurityCapability.cpp @@ -25,8 +25,8 @@ extern "C" { #include "lte/gateway/c/core/oai/tasks/nas5g/include/M5GCommonDefs.h" namespace magma5g { -UESecurityCapabilityMsg::UESecurityCapabilityMsg(){}; -UESecurityCapabilityMsg::~UESecurityCapabilityMsg(){}; +UESecurityCapabilityMsg::UESecurityCapabilityMsg() {}; +UESecurityCapabilityMsg::~UESecurityCapabilityMsg() {}; int UESecurityCapabilityMsg::DecodeUESecurityCapabilityMsg( UESecurityCapabilityMsg* ue_sec_capability, uint8_t iei, uint8_t* buffer, diff --git a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GUplinkDataStatus.cpp b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GUplinkDataStatus.cpp index f30dcaf6ae21..f973826f32e5 100644 --- a/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GUplinkDataStatus.cpp +++ b/lte/gateway/c/core/oai/tasks/nas5g/src/ies/M5GUplinkDataStatus.cpp @@ -17,8 +17,8 @@ limitations under the License. #include "lte/gateway/c/core/oai/tasks/nas5g/include/ies/M5GUplinkDataStatus.hpp" namespace magma5g { -M5GUplinkDataStatus::M5GUplinkDataStatus(){}; -M5GUplinkDataStatus::~M5GUplinkDataStatus(){}; +M5GUplinkDataStatus::M5GUplinkDataStatus() {}; +M5GUplinkDataStatus::~M5GUplinkDataStatus() {}; int M5GUplinkDataStatus::EncodeUplinkDataStatus( M5GUplinkDataStatus* uplinkDataStatus, uint8_t iei, uint8_t* buffer, diff --git a/lte/gateway/c/core/oai/tasks/ngap/CMakeLists.txt b/lte/gateway/c/core/oai/tasks/ngap/CMakeLists.txt index 39cc0f6a7c52..3b92a8173524 100644 --- a/lte/gateway/c/core/oai/tasks/ngap/CMakeLists.txt +++ b/lte/gateway/c/core/oai/tasks/ngap/CMakeLists.txt @@ -25,7 +25,7 @@ if( ${ASN1_SOURCE_DIR} IS_NEWER_THAN ${ngap_generate_code_done_flag}) #Create NGAP_PDU structure without pointer references execute_process( - COMMAND bash "-c" "asn1c -pdu=all -fcompound-names -fno-include-deps -gen-PER -D ${GENERATED_FULL_DIR} ${ASN1_SOURCE_DIR} ${ASN1_ERR_FILTER}" + COMMAND bash "-c" "asn1c -pdu=all -fcompound-names -fno-include-deps -D ${GENERATED_FULL_DIR} ${ASN1_SOURCE_DIR} ${ASN1_ERR_FILTER}" RESULT_VARIABLE ret ) if (NOT ${ret} STREQUAL 0) diff --git a/lte/gateway/c/core/oai/tasks/ngap/messages/asn1/r16/r16.asn1 b/lte/gateway/c/core/oai/tasks/ngap/messages/asn1/r16/r16.asn1 index 1a3e605879cd..72dbd767aa65 100644 --- a/lte/gateway/c/core/oai/tasks/ngap/messages/asn1/r16/r16.asn1 +++ b/lte/gateway/c/core/oai/tasks/ngap/messages/asn1/r16/r16.asn1 @@ -3002,8 +3002,7 @@ AMFName ::= PrintableString (SIZE(1..150, ...)) AMFPagingTarget ::= CHOICE { globalRANNodeID GlobalRANNodeID, tAI TAI, - -- choice-Extensions ProtocolIE-SingleContainer { {AMFPagingTarget-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {AMFPagingTarget-ExtIEs} } } AMFPagingTarget-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -3180,8 +3179,7 @@ BroadcastCancelledAreaList ::= CHOICE { cellIDCancelledNR CellIDCancelledNR, tAICancelledNR TAICancelledNR, emergencyAreaIDCancelledNR EmergencyAreaIDCancelledNR, - -- choice-Extensions ProtocolIE-SingleContainer { {BroadcastCancelledAreaList-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {BroadcastCancelledAreaList-ExtIEs} } } BroadcastCancelledAreaList-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -3195,8 +3193,7 @@ BroadcastCompletedAreaList ::= CHOICE { cellIDBroadcastNR CellIDBroadcastNR, tAIBroadcastNR TAIBroadcastNR, emergencyAreaIDBroadcastNR EmergencyAreaIDBroadcastNR, - -- choice-Extensions ProtocolIE-SingleContainer { {BroadcastCompletedAreaList-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {BroadcastCompletedAreaList-ExtIEs} } } BroadcastCompletedAreaList-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -3281,8 +3278,7 @@ Cause ::= CHOICE { nas CauseNas, protocol CauseProtocol, misc CauseMisc, - -- choice-Extensions ProtocolIE-SingleContainer { {Cause-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {Cause-ExtIEs} } } Cause-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -3429,8 +3425,7 @@ CellIDCancelledNR-Item-ExtIEs NGAP-PROTOCOL-EXTENSION ::= { CellIDListForRestart ::= CHOICE { eUTRA-CGIListforRestart EUTRA-CGIList, nR-CGIListforRestart NR-CGIList, - -- choice-Extensions ProtocolIE-SingleContainer { {CellIDListForRestart-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {CellIDListForRestart-ExtIEs} } } CellIDListForRestart-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -3702,8 +3697,7 @@ DRBsSubjectToStatusTransferItem-ExtIEs NGAP-PROTOCOL-EXTENSION ::= { DRBStatusDL ::= CHOICE { dRBStatusDL12 DRBStatusDL12, dRBStatusDL18 DRBStatusDL18, - -- choice-Extensions ProtocolIE-SingleContainer { {DRBStatusDL-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {DRBStatusDL-ExtIEs} } } DRBStatusDL-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -3733,8 +3727,7 @@ DRBStatusDL18-ExtIEs NGAP-PROTOCOL-EXTENSION ::= { DRBStatusUL ::= CHOICE { dRBStatusUL12 DRBStatusUL12, dRBStatusUL18 DRBStatusUL18, - -- choice-Extensions ProtocolIE-SingleContainer { {DRBStatusUL-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {DRBStatusUL-ExtIEs} } } DRBStatusUL-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -4089,8 +4082,7 @@ GlobalRANNodeID ::= CHOICE { globalGNB-ID GlobalGNB-ID, globalNgENB-ID GlobalNgENB-ID, globalN3IWF-ID GlobalN3IWF-ID, - -- choice-Extensions ProtocolIE-SingleContainer { {GlobalRANNodeID-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {GlobalRANNodeID-ExtIEs} } } GlobalRANNodeID-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -4099,8 +4091,7 @@ GlobalRANNodeID-ExtIEs NGAP-PROTOCOL-IES ::= { GNB-ID ::= CHOICE { gNB-ID BIT STRING (SIZE(22..32)), - -- choice-Extensions ProtocolIE-SingleContainer { {GNB-ID-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {GNB-ID-ExtIEs} } } GNB-ID-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -4263,8 +4254,7 @@ LastVisitedCellInformation ::= CHOICE { eUTRANCell LastVisitedEUTRANCellInformation, uTRANCell LastVisitedUTRANCellInformation, gERANCell LastVisitedGERANCellInformation, - -- choice-Extensions ProtocolIE-SingleContainer { {LastVisitedCellInformation-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {LastVisitedCellInformation-ExtIEs} } } LastVisitedCellInformation-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -4364,8 +4354,7 @@ MobilityRestrictionList-ExtIEs NGAP-PROTOCOL-EXTENSION ::= { N3IWF-ID ::= CHOICE { n3IWF-ID BIT STRING (SIZE(16)), - -- choice-Extensions ProtocolIE-SingleContainer { {N3IWF-ID-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {N3IWF-ID-ExtIEs} } } N3IWF-ID-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -4395,8 +4384,7 @@ NgENB-ID ::= CHOICE { macroNgENB-ID BIT STRING (SIZE(20)), shortMacroNgENB-ID BIT STRING (SIZE(18)), longMacroNgENB-ID BIT STRING (SIZE(21)), - -- choice-Extensions ProtocolIE-SingleContainer { {NgENB-ID-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {NgENB-ID-ExtIEs} } } NgENB-ID-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -4406,8 +4394,7 @@ NgENB-ID-ExtIEs NGAP-PROTOCOL-IES ::= { NGRAN-CGI ::= CHOICE { nR-CGI NR-CGI, eUTRA-CGI EUTRA-CGI, - -- choice-Extensions ProtocolIE-SingleContainer { {NGRAN-CGI-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {NGRAN-CGI-ExtIEs} } } NGRAN-CGI-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -4493,8 +4480,7 @@ OverloadAction ::= ENUMERATED { OverloadResponse ::= CHOICE { overloadAction OverloadAction, - -- choice-Extensions ProtocolIE-SingleContainer { {OverloadResponse-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {OverloadResponse-ExtIEs} } } OverloadResponse-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -5274,8 +5260,7 @@ PriorityLevelQos ::= INTEGER (1..127, ...) PWSFailedCellIDList ::= CHOICE { eUTRA-CGI-PWSFailedList EUTRA-CGIList, nR-CGI-PWSFailedList NR-CGIList, - -- choice-Extensions ProtocolIE-SingleContainer { {PWSFailedCellIDList-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {PWSFailedCellIDList-ExtIEs} } } PWSFailedCellIDList-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -5287,8 +5272,7 @@ PWSFailedCellIDList-ExtIEs NGAP-PROTOCOL-IES ::= { QosCharacteristics ::= CHOICE { nonDynamic5QI NonDynamic5QIDescriptor, dynamic5QI Dynamic5QIDescriptor, - -- choice-Extensions ProtocolIE-SingleContainer { {QosCharacteristics-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {QosCharacteristics-ExtIEs} } } QosCharacteristics-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -5597,8 +5581,7 @@ ResetAll ::= ENUMERATED { ResetType ::= CHOICE { nG-Interface ResetAll, partOfNG-Interface UE-associatedLogicalNG-connectionList, - -- choice-Extensions ProtocolIE-SingleContainer { {ResetType-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {ResetType-ExtIEs} } } ResetType-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -5806,8 +5789,7 @@ SONConfigurationTransfer-ExtIEs NGAP-PROTOCOL-EXTENSION ::= { SONInformation ::= CHOICE { sONInformationRequest SONInformationRequest, sONInformationReply SONInformationReply, - -- choice-Extensions ProtocolIE-SingleContainer { {SONInformation-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {SONInformation-ExtIEs} } } SONInformation-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -6011,8 +5993,7 @@ TargeteNB-ID-ExtIEs NGAP-PROTOCOL-EXTENSION ::= { TargetID ::= CHOICE { targetRANNodeID TargetRANNodeID, targeteNB-ID TargeteNB-ID, - -- choice-Extensions ProtocolIE-SingleContainer { {TargetID-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {TargetID-ExtIEs} } } TargetID-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -6143,8 +6124,7 @@ UEHistoryInformation ::= SEQUENCE (SIZE(1..maxnoofCellsinUEHistoryInfo)) OF Last UEIdentityIndexValue ::= CHOICE { indexLength10 BIT STRING (SIZE(10)), - -- choice-Extensions ProtocolIE-SingleContainer { {UEIdentityIndexValue-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {UEIdentityIndexValue-ExtIEs} } } UEIdentityIndexValue-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -6154,8 +6134,7 @@ UEIdentityIndexValue-ExtIEs NGAP-PROTOCOL-IES ::= { UE-NGAP-IDs ::= CHOICE { uE-NGAP-ID-pair UE-NGAP-ID-pair, aMF-UE-NGAP-ID AMF-UE-NGAP-ID, - -- choice-Extensions ProtocolIE-SingleContainer { {UE-NGAP-IDs-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {UE-NGAP-IDs-ExtIEs} } } UE-NGAP-IDs-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -6175,8 +6154,7 @@ UE-NGAP-ID-pair-ExtIEs NGAP-PROTOCOL-EXTENSION ::= { UEPagingIdentity ::= CHOICE { fiveG-S-TMSI FiveG-S-TMSI, - -- choice-Extensions ProtocolIE-SingleContainer { {UEPagingIdentity-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {UEPagingIdentity-ExtIEs} } } UEPagingIdentity-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -6268,8 +6246,7 @@ ULForwarding ::= ENUMERATED { UPTransportLayerInformation ::= CHOICE { gTPTunnel GTPTunnel, - -- choice-Extensions ProtocolIE-SingleContainer { {UPTransportLayerInformation-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {UPTransportLayerInformation-ExtIEs} } } UPTransportLayerInformation-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -6304,10 +6281,9 @@ UPTransportLayerInformationPairItem-ExtIEs NGAP-PROTOCOL-EXTENSION ::= { UserLocationInformation ::= CHOICE { userLocationInformationEUTRA UserLocationInformationEUTRA, - userLocationInformationN3IWF UserLocationInformationN3IWF, userLocationInformationNR UserLocationInformationNR, - -- choice-Extensions ProtocolIE-SingleContainer { {UserLocationInformation-ExtIEs} } - ... + userLocationInformationN3IWF UserLocationInformationN3IWF, + choice-Extensions ProtocolIE-SingleContainer { {UserLocationInformation-ExtIEs} } } UserLocationInformation-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -6388,8 +6364,7 @@ WarningAreaList ::= CHOICE { nR-CGIListForWarning NR-CGIListForWarning, tAIListForWarning TAIListForWarning, emergencyAreaIDList EmergencyAreaIDList, - -- choice-Extensions ProtocolIE-SingleContainer { {WarningAreaList-ExtIEs} } - ... + choice-Extensions ProtocolIE-SingleContainer { {WarningAreaList-ExtIEs} } } WarningAreaList-ExtIEs NGAP-PROTOCOL-IES ::= { @@ -6931,8 +6906,15 @@ ProtocolIE-Container {NGAP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE (SIZE (0..maxProtocolIEs)) OF ProtocolIE-Field {{IEsSetParam}} -ProtocolIE-SingleContainer {NGAP-PROTOCOL-IES : IEsSetParam} ::= - ProtocolIE-Field {{IEsSetParam}} +-- ProtocolIE-SingleContainer {NGAP-PROTOCOL-IES : IEsSetParam} ::= +-- ProtocolIE-Field {{IEsSetParam}} + +ProtocolIE-SingleContainer {NGAP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE { + id NGAP-PROTOCOL-IES.&id ({IEsSetParam}), + criticality NGAP-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}), + value NGAP-PROTOCOL-IES.&Value ({IEsSetParam}{@id}) +} + ProtocolIE-Field {NGAP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE { id NGAP-PROTOCOL-IES.&id ({IEsSetParam}), diff --git a/lte/gateway/c/core/oai/tasks/ngap/ngap_amf_handlers.c b/lte/gateway/c/core/oai/tasks/ngap/ngap_amf_handlers.c index 28d7732c95ff..4363c77eca34 100644 --- a/lte/gateway/c/core/oai/tasks/ngap/ngap_amf_handlers.c +++ b/lte/gateway/c/core/oai/tasks/ngap/ngap_amf_handlers.c @@ -393,6 +393,9 @@ status_code_e ngap_amf_handle_ng_setup_request(ngap_state_t* state, NGAP_FIND_PROTOCOLIE_BY_ID(Ngap_NGSetupRequestIEs_t, ie, container, Ngap_ProtocolIE_ID_id_GlobalRANNodeID, true); + if (!ie) { + OAILOG_FUNC_RETURN(LOG_NGAP, RETURNerror); + } if (ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID.gNB_ID.present == Ngap_GNB_ID_PR_gNB_ID) { gnb_id = BIT_STRING_to_uint32(&ie->value.choice.GlobalRANNodeID.choice @@ -412,6 +415,9 @@ status_code_e ngap_amf_handle_ng_setup_request(ngap_state_t* state, NGAP_FIND_PROTOCOLIE_BY_ID(Ngap_NGSetupRequestIEs_t, ie_supported_tas, container, Ngap_ProtocolIE_ID_id_SupportedTAList, true); + if (!ie_supported_tas) { + OAILOG_FUNC_RETURN(LOG_NGAP, RETURNerror); + } ta_ret = ngap_amf_compare_ta_lists( &ie_supported_tas->value.choice.SupportedTAList); @@ -498,6 +504,9 @@ status_code_e ngap_amf_handle_ng_setup_request(ngap_state_t* state, NGAP_FIND_PROTOCOLIE_BY_ID(Ngap_NGSetupRequestIEs_t, ie_default_paging_drx, container, Ngap_ProtocolIE_ID_id_DefaultPagingDRX, true); + if (!ie_default_paging_drx) { + OAILOG_FUNC_RETURN(LOG_NGAP, RETURNerror); + } gnb_association->default_paging_drx = ie_default_paging_drx->value.choice.PagingDRX; @@ -1690,6 +1699,9 @@ status_code_e ngap_amf_handle_pduSession_release_response( NGAP_FIND_PROTOCOLIE_BY_ID(Ngap_PDUSessionResourceReleaseResponseIEs_t, ie, container, Ngap_ProtocolIE_ID_id_AMF_UE_NGAP_ID, true); + if (!ie) { + OAILOG_FUNC_RETURN(LOG_NGAP, RETURNerror); + } asn_INTEGER2ulong(&ie->value.choice.AMF_UE_NGAP_ID, (uint64_t*)&amf_ue_ngap_id); @@ -1705,6 +1717,9 @@ status_code_e ngap_amf_handle_pduSession_release_response( NGAP_FIND_PROTOCOLIE_BY_ID(Ngap_PDUSessionResourceReleaseResponseIEs_t, ie, container, Ngap_ProtocolIE_ID_id_RAN_UE_NGAP_ID, true); + if (!ie) { + OAILOG_FUNC_RETURN(LOG_NGAP, RETURNerror); + } // gNB UE NGAP ID is limited to 24 bits gnb_ue_ngap_id = (gnb_ue_ngap_id_t)(ie->value.choice.RAN_UE_NGAP_ID); @@ -2289,6 +2304,9 @@ status_code_e ngap_amf_handle_gnb_reset(ngap_state_t* state, NGAP_FIND_PROTOCOLIE_BY_ID(Ngap_NGResetIEs_t, ie, container, Ngap_ProtocolIE_ID_id_ResetType, true); + if (!ie) { + OAILOG_FUNC_RETURN(LOG_NGAP, RETURNerror); + } Ngap_ResetType_t* resetType = &ie->value.choice.ResetType; diff --git a/lte/gateway/c/core/oai/tasks/ngap/ngap_amf_nas_procedures.c b/lte/gateway/c/core/oai/tasks/ngap/ngap_amf_nas_procedures.c index 6dde6ed4e5fe..50e57320ff72 100644 --- a/lte/gateway/c/core/oai/tasks/ngap/ngap_amf_nas_procedures.c +++ b/lte/gateway/c/core/oai/tasks/ngap/ngap_amf_nas_procedures.c @@ -337,11 +337,9 @@ status_code_e ngap_amf_handle_uplink_nas_transport( } //------------------------------------------------------------------------------ -status_code_e ngap_amf_handle_nas_non_delivery(ngap_state_t* state, - __attribute__((unused)) - sctp_assoc_id_t assoc_id, - sctp_stream_id_t stream, - Ngap_NGAP_PDU_t* pdu) { +status_code_e ngap_amf_handle_nas_non_delivery( + ngap_state_t* state, __attribute__((unused)) sctp_assoc_id_t assoc_id, + sctp_stream_id_t stream, Ngap_NGAP_PDU_t* pdu) { Ngap_NASNonDeliveryIndication_t* container; Ngap_NASNonDeliveryIndication_IEs_t *ie = NULL, *ie_nas_pdu; m5g_ue_description_t* ue_ref = NULL; @@ -366,19 +364,32 @@ status_code_e ngap_amf_handle_nas_non_delivery(ngap_state_t* state, } NGAP_FIND_PROTOCOLIE_BY_ID(Ngap_NASNonDeliveryIndication_IEs_t, ie, container, Ngap_ProtocolIE_ID_id_AMF_UE_NGAP_ID, true); + if (!ie) { + OAILOG_FUNC_RETURN(LOG_NGAP, RETURNerror); + } asn_INTEGER2ulong(&ie->value.choice.AMF_UE_NGAP_ID, (unsigned long*)&amf_ue_ngap_id); NGAP_FIND_PROTOCOLIE_BY_ID(Ngap_NASNonDeliveryIndication_IEs_t, ie, container, Ngap_ProtocolIE_ID_id_RAN_UE_NGAP_ID, true); + if (!ie) { + OAILOG_FUNC_RETURN(LOG_NGAP, RETURNerror); + } gnb_ue_ngap_id = ie->value.choice.RAN_UE_NGAP_ID; NGAP_FIND_PROTOCOLIE_BY_ID(Ngap_NASNonDeliveryIndication_IEs_t, ie_nas_pdu, container, Ngap_ProtocolIE_ID_id_NAS_PDU, true); + if (!ie_nas_pdu) { + OAILOG_FUNC_RETURN(LOG_NGAP, RETURNerror); + } NGAP_FIND_PROTOCOLIE_BY_ID(Ngap_NASNonDeliveryIndication_IEs_t, ie, container, Ngap_ProtocolIE_ID_id_Cause, true); + if (!ie) { + OAILOG_FUNC_RETURN(LOG_NGAP, RETURNerror); + } + OAILOG_NOTICE(LOG_NGAP, "Received NGAP NAS_NON_DELIVERY_INDICATION message " "AMF_UE_NGAP_ID " AMF_UE_NGAP_ID_FMT @@ -407,8 +418,8 @@ status_code_e ngap_amf_handle_nas_non_delivery(ngap_state_t* state, // TODO: forward NAS PDU to NAS ngap_amf_itti_nas_non_delivery_ind( - amf_ue_ngap_id, ie->value.choice.NAS_PDU.buf, - ie->value.choice.NAS_PDU.size, &ie->value.choice.Cause, imsi64); + amf_ue_ngap_id, ie_nas_pdu->value.choice.NAS_PDU.buf, + ie_nas_pdu->value.choice.NAS_PDU.size, &ie->value.choice.Cause, imsi64); OAILOG_FUNC_RETURN(LOG_NGAP, RETURNok); } diff --git a/lte/gateway/c/core/oai/tasks/ngap/ngap_amf_ta.c b/lte/gateway/c/core/oai/tasks/ngap/ngap_amf_ta.c index 5635057b5b25..f77dbdd45c86 100644 --- a/lte/gateway/c/core/oai/tasks/ngap/ngap_amf_ta.c +++ b/lte/gateway/c/core/oai/tasks/ngap/ngap_amf_ta.c @@ -120,9 +120,9 @@ static int ngap_amf_compare_plmn( ret = TA_LIST_AT_LEAST_ONE_MATCH; break; } // Slice Found in plmn_support list - } // Plmn found in support list - } // Loop through plmn support list - } // Plmn Match Found + } // Plmn found in support list + } // Loop through plmn support list + } // Plmn Match Found amf_config_unlock(&amf_config); OAILOG_FUNC_RETURN(LOG_NGAP, ret); diff --git a/lte/gateway/c/core/oai/tasks/ngap/ngap_common.h b/lte/gateway/c/core/oai/tasks/ngap/ngap_common.h index acae02ccf1b7..813369629601 100644 --- a/lte/gateway/c/core/oai/tasks/ngap/ngap_common.h +++ b/lte/gateway/c/core/oai/tasks/ngap/ngap_common.h @@ -697,7 +697,7 @@ inline void ASN_DEBUG(const char* fmt, ...); #include "lte/gateway/c/core/oai/lib/3gpp/3gpp_33.401.h" #include "lte/gateway/c/core/oai/lib/3gpp/3gpp_38.401.h" #include "lte/gateway/c/core/oai/lib/bstr/bstrlib.h" -//#include "ngap_state.h" +// #include "ngap_state.h" #include "lte/gateway/c/core/oai/tasks/ngap/ngap_types.h" // Forward declaration @@ -728,7 +728,6 @@ struct ngap_message_s; "NGAP_FIND_PROTOCOLIE_BY_ID: %s %d: Optional ie is NULL\n", \ __FILE__, __LINE__); \ } \ - if (mandatory) DevAssert(ie != NULL); \ } while (0) /** \brief Function callback prototype. diff --git a/lte/gateway/c/core/oai/tasks/s11/s11_ie_formatter.cpp b/lte/gateway/c/core/oai/tasks/s11/s11_ie_formatter.cpp index 9867eeb7e1eb..5311fac2cb87 100644 --- a/lte/gateway/c/core/oai/tasks/s11/s11_ie_formatter.cpp +++ b/lte/gateway/c/core/oai/tasks/s11/s11_ie_formatter.cpp @@ -765,9 +765,9 @@ gtpv2c_bearer_context_to_be_updated_within_update_bearer_request_ie_set( gtpv2c_pco_ie_set(msg, &bearer_context->pco); } gtpv2c_bearer_qos_ie_set( - msg, (const bearer_qos_t* const) & bearer_context->bearer_level_qos); - gtpv2c_tft_ie_set( - msg, (const traffic_flow_template_t* const) & bearer_context->tft); + msg, (const bearer_qos_t* const)&bearer_context->bearer_level_qos); + gtpv2c_tft_ie_set(msg, + (const traffic_flow_template_t* const)&bearer_context->tft); // End section for grouped IE: bearer context to create rc = nwGtpv2cMsgGroupedIeEnd(*msg); diff --git a/lte/gateway/c/core/oai/tasks/s11/s11_mme_bearer_manager.cpp b/lte/gateway/c/core/oai/tasks/s11/s11_mme_bearer_manager.cpp index e2eab23f017c..1c734cb2242e 100644 --- a/lte/gateway/c/core/oai/tasks/s11/s11_mme_bearer_manager.cpp +++ b/lte/gateway/c/core/oai/tasks/s11/s11_mme_bearer_manager.cpp @@ -350,8 +350,9 @@ status_code_e s11_mme_delete_bearer_command( DevAssert(cmd_p); memset(&ulp_req, 0, sizeof(nw_gtpv2c_ulp_api_t)); ulp_req.apiType = NW_GTPV2C_ULP_API_INITIAL_REQ; - ulp_req.apiType = (nw_gtpv2c_ulp_api_type_t)( - ulp_req.apiType | NW_GTPV2C_ULP_API_FLAG_IS_COMMAND_MESSAGE); + ulp_req.apiType = + (nw_gtpv2c_ulp_api_type_t)(ulp_req.apiType | + NW_GTPV2C_ULP_API_FLAG_IS_COMMAND_MESSAGE); // Prepare a new Delete Session Request msg rc = nwGtpv2cMsgNew(*stack_p, true, NW_GTP_DELETE_BEARER_CMD, cmd_p->teid, 0, diff --git a/lte/gateway/c/core/oai/tasks/s1ap/CMakeLists.txt b/lte/gateway/c/core/oai/tasks/s1ap/CMakeLists.txt index fbecf0953dd9..e3c837a85df8 100644 --- a/lte/gateway/c/core/oai/tasks/s1ap/CMakeLists.txt +++ b/lte/gateway/c/core/oai/tasks/s1ap/CMakeLists.txt @@ -31,7 +31,7 @@ set(ASN1_ERR_FILTER "2> >(grep -v \"Parameterized type\" | grep -v \"Compiled \" if (${ASN1_SOURCE_DIR} IS_NEWER_THAN ${s1ap_generate_code_done_flag}) file(REMOVE ${GENERATED_FULL_DIR}/${ASN1C_PREFIX}*.c ${GENERATED_FULL_DIR}/${ASN1C_PREFIX}*.h) execute_process( - COMMAND bash "-c" "asn1c -pdu=all -fcompound-names -gen-PER -no-gen-example -fno-include-deps -D ${GENERATED_FULL_DIR} ${ASN1_SOURCE_DIR} ${ASN1_ERR_FILTER}" + COMMAND bash "-c" "asn1c -pdu=all -fcompound-names -no-gen-example -fno-include-deps -D ${GENERATED_FULL_DIR} ${ASN1_SOURCE_DIR} ${ASN1_ERR_FILTER}" RESULT_VARIABLE ret ) if (NOT ${ret} STREQUAL 0) diff --git a/lte/gateway/c/core/oai/tasks/s1ap/generate_asn1 b/lte/gateway/c/core/oai/tasks/s1ap/generate_asn1 index be8fb94d6a67..75c37d9720c3 100755 --- a/lte/gateway/c/core/oai/tasks/s1ap/generate_asn1 +++ b/lte/gateway/c/core/oai/tasks/s1ap/generate_asn1 @@ -23,7 +23,7 @@ cd $1 shift ASNC1=$(which asn1c) -${ASNC1:-asn1c} -gen-PER -fcompound-names $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample +${ASNC1:-asn1c} -fcompound-names $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample awk ' BEGIN { diff --git a/lte/gateway/c/core/oai/tasks/s1ap/s1ap_mme_handlers.cpp b/lte/gateway/c/core/oai/tasks/s1ap/s1ap_mme_handlers.cpp index 9c41ba50063e..246c0d31c50c 100644 --- a/lte/gateway/c/core/oai/tasks/s1ap/s1ap_mme_handlers.cpp +++ b/lte/gateway/c/core/oai/tasks/s1ap/s1ap_mme_handlers.cpp @@ -127,10 +127,9 @@ status_code_e s1ap_generate_s1_setup_response( bool is_all_erabId_same(S1ap_PathSwitchRequest_t* container); static int handle_ue_context_rel_timer_expiry(zloop_t* loop, int id, void* arg); -static bool s1ap_send_enb_deregistered_ind(__attribute__((unused)) - uint32_t keyP, - uint64_t const dataP, void* argP, - void** resultP); +static bool s1ap_send_enb_deregistered_ind( + __attribute__((unused)) uint32_t keyP, uint64_t const dataP, void* argP, + void** resultP); /* Handlers matrix. Only mme related procedures present here. */ s1ap_message_handler_t message_handlers[][3] = { @@ -3595,10 +3594,9 @@ status_code_e s1ap_mme_handle_path_switch_request( //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ -static bool s1ap_send_enb_deregistered_ind(__attribute__((unused)) - uint32_t keyP, - uint64_t const dataP, void* argP, - void** resultP) { +static bool s1ap_send_enb_deregistered_ind( + __attribute__((unused)) uint32_t keyP, uint64_t const dataP, void* argP, + void** resultP) { arg_s1ap_send_enb_dereg_ind_t* arg = (arg_s1ap_send_enb_dereg_ind_t*)argP; oai::UeDescription* ue_ref_p = nullptr; @@ -4669,11 +4667,19 @@ status_code_e s1ap_mme_handle_erab_modification_indication( S1AP_FIND_PROTOCOLIE_BY_ID(S1ap_E_RABModificationIndicationIEs_t, ie, container, S1ap_ProtocolIE_ID_id_MME_UE_S1AP_ID, true); + if (!ie) { + OAILOG_ERROR(LOG_S1AP, "MME_UE_S1AP_ID Type S1AP ProtocolIE ID Missing\n"); + OAILOG_FUNC_RETURN(LOG_S1AP, RETURNerror); + } mme_ue_s1ap_id = ie->value.choice.MME_UE_S1AP_ID; S1AP_FIND_PROTOCOLIE_BY_ID(S1ap_E_RABModificationIndicationIEs_t, ie, container, S1ap_ProtocolIE_ID_id_eNB_UE_S1AP_ID, true); + if (!ie) { + OAILOG_ERROR(LOG_S1AP, "eNB_UE_S1AP_ID Type S1AP ProtocolIE ID Missing\n"); + OAILOG_FUNC_RETURN(LOG_S1AP, RETURNerror); + } // eNB UE S1AP ID is limited to 24 bits enb_ue_s1ap_id = (enb_ue_s1ap_id_t)(ie->value.choice.ENB_UE_S1AP_ID & ENB_UE_S1AP_ID_MASK); @@ -5292,6 +5298,10 @@ status_code_e s1ap_mme_handle_erab_rel_response(oai::S1apState* state, S1AP_FIND_PROTOCOLIE_BY_ID(S1ap_E_RABReleaseResponseIEs_t, ie, container, S1ap_ProtocolIE_ID_id_MME_UE_S1AP_ID, true); + if (!ie) { + OAILOG_ERROR(LOG_S1AP, "Missing MME_UE_S1AP_ID IE\n"); + OAILOG_FUNC_RETURN(LOG_S1AP, RETURNerror); + } mme_ue_s1ap_id = ie->value.choice.MME_UE_S1AP_ID; if ((ie) && (ue_ref_p = s1ap_state_get_ue_mmeid((uint32_t)mme_ue_s1ap_id)) == @@ -5305,6 +5315,10 @@ status_code_e s1ap_mme_handle_erab_rel_response(oai::S1apState* state, S1AP_FIND_PROTOCOLIE_BY_ID(S1ap_E_RABReleaseResponseIEs_t, ie, container, S1ap_ProtocolIE_ID_id_eNB_UE_S1AP_ID, true); + if (!ie) { + OAILOG_ERROR(LOG_S1AP, "Missing eNB_UE_S1AP_ID IE\n"); + OAILOG_FUNC_RETURN(LOG_S1AP, RETURNerror); + } // eNB UE S1AP ID is limited to 24 bits enb_ue_s1ap_id = (enb_ue_s1ap_id_t)(ie->value.choice.ENB_UE_S1AP_ID & ENB_UE_S1AP_ID_MASK); diff --git a/lte/gateway/c/core/oai/tasks/s1ap/s1ap_mme_nas_procedures.cpp b/lte/gateway/c/core/oai/tasks/s1ap/s1ap_mme_nas_procedures.cpp index 5b0afd80843e..d69ad54ee637 100644 --- a/lte/gateway/c/core/oai/tasks/s1ap/s1ap_mme_nas_procedures.cpp +++ b/lte/gateway/c/core/oai/tasks/s1ap/s1ap_mme_nas_procedures.cpp @@ -425,11 +425,9 @@ status_code_e s1ap_mme_handle_uplink_nas_transport( } //------------------------------------------------------------------------------ -status_code_e s1ap_mme_handle_nas_non_delivery(oai::S1apState* state, - __attribute__((unused)) - sctp_assoc_id_t assoc_id, - sctp_stream_id_t stream, - S1ap_S1AP_PDU_t* pdu) { +status_code_e s1ap_mme_handle_nas_non_delivery( + oai::S1apState* state, __attribute__((unused)) sctp_assoc_id_t assoc_id, + sctp_stream_id_t stream, S1ap_S1AP_PDU_t* pdu) { S1ap_NASNonDeliveryIndication_t* container; S1ap_NASNonDeliveryIndication_IEs_t *ie = NULL, *ie_nas_pdu = NULL; oai::UeDescription* ue_ref = nullptr; diff --git a/lte/gateway/c/core/oai/tasks/s6a/s6a_grpc_iface.hpp b/lte/gateway/c/core/oai/tasks/s6a/s6a_grpc_iface.hpp index 08a0dd1d418a..2448f53c28da 100644 --- a/lte/gateway/c/core/oai/tasks/s6a/s6a_grpc_iface.hpp +++ b/lte/gateway/c/core/oai/tasks/s6a/s6a_grpc_iface.hpp @@ -27,5 +27,5 @@ class S6aGrpcIface : public S6aViface { bool send_cancel_location_ans(s6a_cancel_location_ans_t* cla_pP); bool purge_ue(const char* imsi); - ~S6aGrpcIface(){}; + ~S6aGrpcIface() {}; }; diff --git a/lte/gateway/c/core/oai/tasks/s6a/s6a_viface.hpp b/lte/gateway/c/core/oai/tasks/s6a/s6a_viface.hpp index 584caa6c4787..755d5957a2d2 100644 --- a/lte/gateway/c/core/oai/tasks/s6a/s6a_viface.hpp +++ b/lte/gateway/c/core/oai/tasks/s6a/s6a_viface.hpp @@ -27,5 +27,5 @@ class S6aViface { virtual bool authentication_info_req(s6a_auth_info_req_t* air_p) = 0; virtual bool send_cancel_location_ans(s6a_cancel_location_ans_t* cla_pP) = 0; virtual bool purge_ue(const char* imsi) = 0; - virtual ~S6aViface(){}; + virtual ~S6aViface() {}; }; diff --git a/lte/gateway/c/core/oai/tasks/sgw/sgw_handlers.cpp b/lte/gateway/c/core/oai/tasks/sgw/sgw_handlers.cpp index 1e7d95754fd3..b22264cb7e41 100644 --- a/lte/gateway/c/core/oai/tasks/sgw/sgw_handlers.cpp +++ b/lte/gateway/c/core/oai/tasks/sgw/sgw_handlers.cpp @@ -680,7 +680,7 @@ static void sgw_populate_mbr_bearer_contexts_modified( .cause.cause_value = REQUEST_ACCEPTED; modify_response_p->bearer_contexts_modified.num_bearer_context++; // if default bearer - //#pragma message "TODO define constant for default eps_bearer id" + // #pragma message "TODO define constant for default eps_bearer id" #if !MME_UNIT_TEST // skip tunnel creation for unit tests // setup GTPv1-U tunnel diff --git a/lte/gateway/c/core/oai/tasks/sgw/spgw_state.cpp b/lte/gateway/c/core/oai/tasks/sgw/spgw_state.cpp index 7abb54b359e1..170750f71a6b 100644 --- a/lte/gateway/c/core/oai/tasks/sgw/spgw_state.cpp +++ b/lte/gateway/c/core/oai/tasks/sgw/spgw_state.cpp @@ -117,7 +117,7 @@ void spgw_free_s11_bearer_context_information(void** ptr) { context_p->clear_sgw_eps_bearer_context(); context_p->clear_pgw_eps_bearer_context(); } // end of s11_bearer_context_p - } // end of ptr + } // end of ptr free_cpp_wrapper(ptr); } diff --git a/lte/gateway/c/core/oai/tasks/sgw_s8/sgw_s8_handlers.cpp b/lte/gateway/c/core/oai/tasks/sgw_s8/sgw_s8_handlers.cpp index 7767316709b4..d93f12f368fc 100644 --- a/lte/gateway/c/core/oai/tasks/sgw_s8/sgw_s8_handlers.cpp +++ b/lte/gateway/c/core/oai/tasks/sgw_s8/sgw_s8_handlers.cpp @@ -614,9 +614,9 @@ static void insert_sgw_cp_and_up_teid_to_directoryd(sgw_state_t* sgw_state, ->s_gw_teid_S5_S8_up; } } // end of bearer list - } // check for sgw_session_ctxt_p - } // switch based on teid type - } // end of s11_teid_list + } // check for sgw_session_ctxt_p + } // switch based on teid type + } // end of s11_teid_list char separator = ','; for (uint8_t idx = 0; idx < teid_list_idx; idx++) { diff --git a/lte/gateway/c/core/oai/test/ngap/test_ngap_flows.cpp b/lte/gateway/c/core/oai/test/ngap/test_ngap_flows.cpp index 452a01f0a989..22eaec2e2dee 100644 --- a/lte/gateway/c/core/oai/test/ngap/test_ngap_flows.cpp +++ b/lte/gateway/c/core/oai/test/ngap/test_ngap_flows.cpp @@ -135,7 +135,7 @@ TEST_F(NgapFlowTest, initial_ue_message_sunny_day) { 0x00, 0x01, 0x00, 0x26, 0x00, 0x1a, 0x19, 0x7e, 0x00, 0x41, 0x79, 0x00, 0x0d, 0x01, 0x22, 0x62, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2e, 0x04, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, - 0x79, 0x00, 0x13, 0x48, 0x22, 0x42, 0x65, 0x00, 0x00, 0x00, 0x01, + 0x79, 0x00, 0x13, 0x50, 0x22, 0x42, 0x65, 0x00, 0x00, 0x00, 0x01, 0x00, 0x22, 0x42, 0x65, 0x00, 0x00, 0x01, 0xe4, 0xf7, 0x04, 0x44, 0x00, 0x5a, 0x40, 0x01, 0x18, 0x00, 0x70, 0x40, 0x01, 0x00}; @@ -152,6 +152,8 @@ TEST_F(NgapFlowTest, initial_ue_message_sunny_day) { // Check if the pdu can be decoded ASSERT_EQ(ngap_amf_decode_pdu(&decoded_pdu, ngap_initial_ue_msg), RETURNok); + xer_fprint(stdout, &asn_DEF_Ngap_NGAP_PDU, &decoded_pdu); + // check if initial UE message is handled successfully EXPECT_EQ(ngap_amf_handle_message(state, peerInfo.assoc_id, peerInfo.instreams, &decoded_pdu), @@ -1350,7 +1352,7 @@ TEST_F(NgapFlowTest, test_ue_notifications_from_amf) { 0x00, 0x01, 0x00, 0x26, 0x00, 0x1a, 0x19, 0x7e, 0x00, 0x41, 0x79, 0x00, 0x0d, 0x01, 0x22, 0x62, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2e, 0x04, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, - 0x79, 0x00, 0x13, 0x48, 0x22, 0x42, 0x65, 0x00, 0x00, 0x00, 0x01, + 0x79, 0x00, 0x13, 0x50, 0x22, 0x42, 0x65, 0x00, 0x00, 0x00, 0x01, 0x00, 0x22, 0x42, 0x65, 0x00, 0x00, 0x01, 0xe4, 0xf7, 0x04, 0x44, 0x00, 0x5a, 0x40, 0x01, 0x18, 0x00, 0x70, 0x40, 0x01, 0x00}; @@ -1430,7 +1432,7 @@ TEST_F(NgapFlowTest, NgapHandleSctpDisconnection) { 0x00, 0x01, 0x00, 0x26, 0x00, 0x1a, 0x19, 0x7e, 0x00, 0x41, 0x79, 0x00, 0x0d, 0x01, 0x22, 0x62, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2e, 0x04, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, - 0x79, 0x00, 0x13, 0x48, 0x22, 0x42, 0x65, 0x00, 0x00, 0x00, 0x01, + 0x79, 0x00, 0x13, 0x50, 0x22, 0x42, 0x65, 0x00, 0x00, 0x00, 0x01, 0x00, 0x22, 0x42, 0x65, 0x00, 0x00, 0x01, 0xe4, 0xf7, 0x04, 0x44, 0x00, 0x5a, 0x40, 0x01, 0x18, 0x00, 0x70, 0x40, 0x01, 0x00}; @@ -1733,7 +1735,7 @@ TEST_F(NgapFlowTest, TestNgapReset) { 0x00, 0x01, 0x00, 0x26, 0x00, 0x1a, 0x19, 0x7e, 0x00, 0x41, 0x79, 0x00, 0x0d, 0x01, 0x22, 0x62, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2e, 0x04, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, - 0x79, 0x00, 0x13, 0x48, 0x22, 0x42, 0x65, 0x00, 0x00, 0x00, 0x01, + 0x79, 0x00, 0x13, 0x50, 0x22, 0x42, 0x65, 0x00, 0x00, 0x00, 0x01, 0x00, 0x22, 0x42, 0x65, 0x00, 0x00, 0x01, 0xe4, 0xf7, 0x04, 0x44, 0x00, 0x5a, 0x40, 0x01, 0x18, 0x00, 0x70, 0x40, 0x01, 0x00}; @@ -1801,7 +1803,7 @@ TEST_F(NgapFlowTest, test_gNB_reset_ack) { 0x00, 0x01, 0x00, 0x26, 0x00, 0x1a, 0x19, 0x7e, 0x00, 0x41, 0x79, 0x00, 0x0d, 0x01, 0x22, 0x62, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2e, 0x04, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, - 0x79, 0x00, 0x13, 0x48, 0x22, 0x42, 0x65, 0x00, 0x00, 0x00, 0x01, + 0x79, 0x00, 0x13, 0x50, 0x22, 0x42, 0x65, 0x00, 0x00, 0x00, 0x01, 0x00, 0x22, 0x42, 0x65, 0x00, 0x00, 0x01, 0xe4, 0xf7, 0x04, 0x44, 0x00, 0x5a, 0x40, 0x01, 0x18, 0x00, 0x70, 0x40, 0x01, 0x00}; diff --git a/lte/gateway/c/core/oai/test/ngap/test_ngap_state_converter.cpp b/lte/gateway/c/core/oai/test/ngap/test_ngap_state_converter.cpp index 8f0cf661825e..b7a4257ce366 100644 --- a/lte/gateway/c/core/oai/test/ngap/test_ngap_state_converter.cpp +++ b/lte/gateway/c/core/oai/test/ngap/test_ngap_state_converter.cpp @@ -286,7 +286,7 @@ unsigned char initial_ue_message_hexbuf[] = { 0x00, 0x01, 0x00, 0x26, 0x00, 0x1a, 0x19, 0x7e, 0x00, 0x41, 0x79, 0x00, 0x0d, 0x01, 0x22, 0x62, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2e, 0x04, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, - 0x79, 0x00, 0x13, 0x48, 0x22, 0x42, 0x65, 0x00, 0x00, 0x00, 0x01, + 0x79, 0x00, 0x13, 0x50, 0x22, 0x42, 0x65, 0x00, 0x00, 0x00, 0x01, 0x00, 0x22, 0x42, 0x65, 0x00, 0x00, 0x01, 0xe4, 0xf7, 0x04, 0x44, 0x00, 0x5a, 0x40, 0x01, 0x18, 0x00, 0x70, 0x40, 0x01, 0x00}; diff --git a/lte/gateway/c/core/oai/test/pipelined_client/utility_protobuf.h b/lte/gateway/c/core/oai/test/pipelined_client/utility_protobuf.h index b5f9cda72195..1ea9300e8aea 100644 --- a/lte/gateway/c/core/oai/test/pipelined_client/utility_protobuf.h +++ b/lte/gateway/c/core/oai/test/pipelined_client/utility_protobuf.h @@ -152,9 +152,7 @@ class FlowDLOps { dst_v4_("192.168.60.141"), src_v4_("192.168.128.11") {} - struct ip_flow_dl get_flow_dl() { - return flow_dl_; - } + struct ip_flow_dl get_flow_dl() { return flow_dl_; } void set_flow_dl() { flow_dl_.set_params = set_params_; diff --git a/lte/gateway/c/core/oai/test/spgw_task/test_pgw_pco.cpp b/lte/gateway/c/core/oai/test/spgw_task/test_pgw_pco.cpp index 8e1a47aee905..003e764b1a31 100644 --- a/lte/gateway/c/core/oai/test/spgw_task/test_pgw_pco.cpp +++ b/lte/gateway/c/core/oai/test/spgw_task/test_pgw_pco.cpp @@ -35,16 +35,13 @@ namespace lte { #define PCO_PI_IPCP_LEN 16 #define DEFAULT_DNS_PRIMARY_HEX 0x8080808 // 8.8.8.8 -#define DEFAULT_DNS_PRIMARY_ARRAY \ - { 0x08, 0x08, 0x08, 0x08 } +#define DEFAULT_DNS_PRIMARY_ARRAY {0x08, 0x08, 0x08, 0x08} #define DEFAULT_DNS_SECONDARY_HEX 0x4040808 // 8.8.4.4 -#define DEFAULT_DNS_SECONDARY_ARRAY \ - { 0x08, 0x08, 0x04, 0x04 } +#define DEFAULT_DNS_SECONDARY_ARRAY {0x08, 0x08, 0x04, 0x04} #define DEFAULT_DNS_IPV6 "2001:4860:4860:0:0:0:0:8888" #define DEFAULT_PCSCF_IPV4 0x96171bac // "172.27.23.150" -#define DEFAULT_PCSCF_IPV4_ARRAY \ - { 0xac, 0x1b, 0x17, 0x96 } +#define DEFAULT_PCSCF_IPV4_ARRAY {0xac, 0x1b, 0x17, 0x96} #define DEFAULT_PCSCF_IPV6 "2a12:577:9941:f99c:0002:0001:c731:f114" #define DEFAULT_MTU 1400 diff --git a/lte/gateway/configs/magmad.yml b/lte/gateway/configs/magmad.yml index aeaca076bce7..34fc4307d9c7 100644 --- a/lte/gateway/configs/magmad.yml +++ b/lte/gateway/configs/magmad.yml @@ -25,16 +25,21 @@ magma_services: - enodebd - sessiond - mme + - oai_mme - pipelined - - envoy_controller + - envoy_controller # not found in a docker install - redis - - dnsd + - dnsd # not found in a docker install - policydb - state - eventd - smsd - ctraced - health + - redirectd + - sctpd + - monitord + - connectiond # - kernsnoopd # - liagentd diff --git a/lte/gateway/deploy/agw_install_k8s.sh b/lte/gateway/deploy/agw_install_k8s.sh new file mode 100755 index 000000000000..57c817df49ae --- /dev/null +++ b/lte/gateway/deploy/agw_install_k8s.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Copyright 2021 The Magma Authors. + +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +MAGMA_USER=magma + +echo "Generate key for SSH access" +ssh-keygen -f -t rsa + +apt-get install curl zip python3-pip net-tools sudo ca-certificates gnupg lsb-release sshpass -y + +alias python=python3 +# TODO GH13915 pinned for now because of breaking change in ansible-core 2.13.4 +pip3 install ansible==5.0.1 + +echo "Installing kubernetes and configuring the nodes" +# su - $MAGMA_USER -c "ansible-playbook -v -e \"MAGMA_ROOT='/opt/magma' OUTPUT_DIR='/tmp'\" -i $DEPLOY_PATH/agw_k8s_hosts.ini $DEPLOY_PATH/magma_k8s.yml" +su $MAGMA_USER -c "ansible-playbook -v -e \"MAGMA_ROOT='/opt/magma' OUTPUT_DIR='/tmp'\" -i agw_k8s_hosts.ini magma_k8s.yml" diff --git a/lte/gateway/deploy/agw_k8s_hosts.ini b/lte/gateway/deploy/agw_k8s_hosts.ini new file mode 100644 index 000000000000..011c3632186b --- /dev/null +++ b/lte/gateway/deploy/agw_k8s_hosts.ini @@ -0,0 +1,6 @@ +[master] +127.0.0.1 ansible_connection=local ansible_user=magma ansible_password=magma ansible_sudo_pass=magma + +[workers] +172.16.30.132 ansible_user=magma ansible_sudo_pass=magma +172.16.30.133 ansible_user=magma ansible_sudo_pass=magma diff --git a/lte/gateway/deploy/agwc-helm-charts/README.md b/lte/gateway/deploy/agwc-helm-charts/README.md index d6c6a5633ba8..510435e09065 100644 --- a/lte/gateway/deploy/agwc-helm-charts/README.md +++ b/lte/gateway/deploy/agwc-helm-charts/README.md @@ -8,16 +8,16 @@ Currently working on arm64 kvm-qemu VM host. The following table list the configurable parameters of the agw chart and their default values. -| Parameter | Description | Default | -| --- | --- | --- | -| `secret.certs` | Secret name containing agwc certs. | `agwc-secrets-certs` | -| `image.repository` | Repository for agwc images. | `` | -| `image.pullPolicy` | Pull policy for agwc images. | `` | -| `image.tag` | Tag for agwc image. | `latest` | -| `image.arch` | Tag for node architecture (e.g., arm). | `` | -| `config.domainName` | Orchestrator domain name. | `` | -| `persistant.name` | Secret name containing agwc certs. | `agwc-claim` | -| `config.gwChallenge` | Challenge key. | `` | +| Parameter | Description | Default | +| -------------------- | -------------------------------------- | -------------------- | +| `secret.certs` | Secret name containing agwc certs. | `agwc-secrets-certs` | +| `image.repository` | Repository for agwc images. | `` | +| `image.pullPolicy` | Pull policy for agwc images. | `` | +| `image.tag` | Tag for agwc image. | `latest` | +| `image.arch` | Tag for node architecture (e.g., arm). | `` | +| `config.domainName` | Orchestrator domain name. | `` | +| `persistant.name` | Secret name containing agwc certs. | `agwc-claim` | +| `config.gwChallenge` | Challenge key. | `` | ## Prerequisites @@ -60,13 +60,14 @@ For `image.arch`, use `arm` or leave blank for x86 # Create rootca certificate secret needed to communicate with orc8r ```sh -~ kubectl create secret generic agwc-secret-certs --from-file=rootCA.pem=rootCA.pem --namespace magma +~ kubectl create secret generic agwc-secret-certs --from-file=rootCA.pem --namespace magma ``` # Deploy an AGW after updating values.yaml ```sh ~ cd lte/gateway/deploy/agwc-helm-charts +~ kubectl apply -f templates/agwc-pv.yaml ~ helm --debug install agwc --namespace magma . --values=values.yaml ``` diff --git a/lte/gateway/deploy/agwc-helm-charts/templates/agwc-pv.yaml b/lte/gateway/deploy/agwc-helm-charts/templates/agwc-pv.yaml new file mode 100644 index 000000000000..775e0259fec3 --- /dev/null +++ b/lte/gateway/deploy/agwc-helm-charts/templates/agwc-pv.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: agwc-pv + labels: + type: local + app.kubernetes.io/component: agwc-claim + app.kubernetes.io/managed-by: Helm + annotations: + meta.helm.sh/release-name: agwc + meta.helm.sh/release-namespace: magma +spec: + storageClassName: standard + capacity: + storage: 10Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/var/opt/magma" diff --git a/lte/gateway/deploy/agwc-helm-charts/templates/agwc-claim-pvc.yaml b/lte/gateway/deploy/agwc-helm-charts/templates/agwc-pvc.yaml similarity index 90% rename from lte/gateway/deploy/agwc-helm-charts/templates/agwc-claim-pvc.yaml rename to lte/gateway/deploy/agwc-helm-charts/templates/agwc-pvc.yaml index c558e3fa5088..6fe76b81b2bc 100644 --- a/lte/gateway/deploy/agwc-helm-charts/templates/agwc-claim-pvc.yaml +++ b/lte/gateway/deploy/agwc-helm-charts/templates/agwc-pvc.yaml @@ -16,14 +16,15 @@ kind: PersistentVolumeClaim metadata: labels: app.kubernetes.io/component: agwc-claim - name: agwc-claim + name: {{ .Values.persistent.name }} namespace: {{ .Values.namespace }} annotations: "helm.sh/hook": "pre-install" "helm.sh/hook-weight": "-5" spec: + storageClassName: standard accessModes: - ReadWriteOnce resources: requests: - storage: 1Gi + storage: 10Gi diff --git a/lte/gateway/deploy/agwc-helm-charts/templates/magmad.deployment.yaml b/lte/gateway/deploy/agwc-helm-charts/templates/magmad.deployment.yaml index 3114e40493e6..7e8f384148fd 100644 --- a/lte/gateway/deploy/agwc-helm-charts/templates/magmad.deployment.yaml +++ b/lte/gateway/deploy/agwc-helm-charts/templates/magmad.deployment.yaml @@ -37,7 +37,7 @@ spec: - name: snowflake-file hostPath: path: /etc/snowflake - type: File + type: FileOrCreate - name: profile-file hostPath: path: /etc/profile @@ -49,10 +49,9 @@ spec: {{- define "magmad.container" -}} name: magmad args: - - /usr/bin/env - - python3 - - -m - - magma.magmad.main + - sh + - -c + - /usr/bin/env python3 /usr/local/bin/generate_oai_config.py && /usr/bin/env python3 -m magma.magmad.main image: "{{ .Values.image.repository }}/agw_gateway_python{{ .Values.image.arch}}:{{ .Values.image.tag | default .Chart.AppVersion }}" volumeMounts: - mountPath: /etc/magma diff --git a/lte/gateway/deploy/agwc-helm-charts/templates/oai-mme.deployment.yaml b/lte/gateway/deploy/agwc-helm-charts/templates/oai-mme.deployment.yaml index 9c144c71e79a..10d51ec1e6d3 100644 --- a/lte/gateway/deploy/agwc-helm-charts/templates/oai-mme.deployment.yaml +++ b/lte/gateway/deploy/agwc-helm-charts/templates/oai-mme.deployment.yaml @@ -31,6 +31,10 @@ spec: hostPath: path: /etc/magma type: Directory + - name: mme-logs + hostPath: + path: /var/log + type: Directory - name: agwc-claim persistentVolumeClaim: claimName: agwc-claim @@ -62,10 +66,13 @@ securityContext: volumeMounts: - mountPath: /etc/magma name: magma-config + - mountPath: /var/log + name: mme-logs - mountPath: /var/opt/magma name: agwc-claim - mountPath: /tmp name: tmp-volume - mountPath: /var/run name: ovs-volume + {{- end -}} diff --git a/lte/gateway/deploy/agwc-helm-charts/templates/openvswitch-switch.deployment.yaml b/lte/gateway/deploy/agwc-helm-charts/templates/openvswitch-switch.deployment.yaml new file mode 100644 index 000000000000..741297f13186 --- /dev/null +++ b/lte/gateway/deploy/agwc-helm-charts/templates/openvswitch-switch.deployment.yaml @@ -0,0 +1,89 @@ +{{/* +# Copyright 2020 The Magma Authors. + +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +*/}} +--- +{{- include "agwc.deployment" (list . "openvswitch-switch.deployment") -}} +{{- define "openvswitch-switch.deployment" -}} +metadata: + labels: + app.kubernetes.io/component: openvswitch-switch + name: openvswitch-switch +spec: + selector: + matchLabels: + app.kubernetes.io/component: openvswitch-switch + template: + metadata: + labels: + app.kubernetes.io/component: openvswitch-switch + spec: + volumes: + - name: magma-config + hostPath: + path: /etc/magma + type: Directory + - name: agwc-claim + persistentVolumeClaim: + claimName: agwc-claim + - name: tmp-volume + hostPath: + path: /tmp + type: Directory + - name: ovs-volume + hostPath: + path: /var/run + type: Directory + - name: etc-network-volume + hostPath: + path: /etc/network + type: Directory + - name: etc-openvswitch + hostPath: + path: /etc/openvswitch + type: Directory + - name: lib-modules + hostPath: + path: /lib/modules + + containers: + - +{{ include "agwc.container" (list . "openvswitch-switch.container")}} +{{- end -}} +{{- define "openvswitch-switch.container" -}} +name: openvswitch-switch +command: ["/entrypoint.sh", "start-ovs-only"] +image: "{{ .Values.image.repository }}/agw_gateway_ovs{{ .Values.image.arch}}:{{ .Values.image.tag | default .Chart.AppVersion }}" +imagePullPolicy: {{ .Values.image.pullPolicy }} +securityContext: + privileged: true + capabilities: + add: + - NET_ADMIN + - NET_RAW + - SYS_MODULE + +volumeMounts: + - mountPath: /etc/magma + name: magma-config + - mountPath: /var/opt/magma + name: agwc-claim + - mountPath: /tmp + name: tmp-volume + - mountPath: /var/run + name: ovs-volume + - mountPath: /etc/network + name: etc-network-volume + - mountPath: /etc/openvswitch + name: etc-openvswitch + - mountPath: /lib/modules + name: lib-modules +{{- end -}} diff --git a/lte/gateway/deploy/agwc-helm-charts/templates/ovs-daemonset.yaml b/lte/gateway/deploy/agwc-helm-charts/templates/ovs-daemonset.yaml new file mode 100644 index 000000000000..4629a336d3ea --- /dev/null +++ b/lte/gateway/deploy/agwc-helm-charts/templates/ovs-daemonset.yaml @@ -0,0 +1,58 @@ +{{/* +# Copyright 2020 The Magma Authors. + +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +*/}} +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: ovs-daemonset + namespace: {{ .Values.namespace }} + labels: + app.kubernetes.io/component: ovs-daemonset +spec: + selector: + matchLabels: + app.kubernetes.io/component: ovs-daemonset + template: + metadata: + labels: + app.kubernetes.io/component: ovs-daemonset +{{ include "default-selector-labels" . | indent 6 }} +{{ include "image-version-label" . | indent 6 }} + spec: + containers: + - name: ovs-daemonset + image: "{{ .Values.image.repository }}/agw_gateway_ovs{{ .Values.image.arch}}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + # imagePullPolicy: Always + command: ["/entrypoint.sh", "load-modules-only"] + resources: {} + securityContext: + privileged: true + capabilities: + add: + - NET_ADMIN + - NET_RAW + - SYS_MODULE + volumeMounts: + - mountPath: /lib/modules + name: lib-modules + - mountPath: /usr/src + name: usr-src + hostNetwork: true + volumes: + - name: lib-modules + hostPath: + path: /lib/modules + - name: usr-src + hostPath: + path: /usr/src diff --git a/lte/gateway/deploy/agwc-helm-charts/templates/storageclass.yaml b/lte/gateway/deploy/agwc-helm-charts/templates/storageclass.yaml new file mode 100644 index 000000000000..eb5bbd955fd3 --- /dev/null +++ b/lte/gateway/deploy/agwc-helm-charts/templates/storageclass.yaml @@ -0,0 +1,17 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: standard + labels: + app.kubernetes.io/managed-by: Helm + annotations: + meta.helm.sh/release-name: agwc + meta.helm.sh/release-namespace: magma +provisioner: local +parameters: + type: gp2 +reclaimPolicy: Retain +allowVolumeExpansion: true +mountOptions: + - debug +volumeBindingMode: Immediate \ No newline at end of file diff --git a/lte/gateway/deploy/agwc-helm-charts/values.yaml b/lte/gateway/deploy/agwc-helm-charts/values.yaml index d37359d43752..7921e24ca51d 100644 --- a/lte/gateway/deploy/agwc-helm-charts/values.yaml +++ b/lte/gateway/deploy/agwc-helm-charts/values.yaml @@ -16,15 +16,15 @@ secret: certs: agwc-secret-certs image: - repository: public.ecr.aws/z2g3r6f7 + repository: docker.io/ektrumdev pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "latest" + tag: "feat_agw_in_k8s_51e29ca" # Arch is blank for x86 and _arm for ARM64 - arch: + arch: "_arm" config: - domainName: iot.magmacore.click + domainName: magmacore.local gwChallenge: persistent: diff --git a/lte/gateway/deploy/deploy_agw_kubernetes.md b/lte/gateway/deploy/deploy_agw_kubernetes.md new file mode 100644 index 000000000000..b359de508312 --- /dev/null +++ b/lte/gateway/deploy/deploy_agw_kubernetes.md @@ -0,0 +1,80 @@ +--- +id: deploy_agw_kubernetes +title: Deploy AGW in Kubernetes +hide_title: true +--- +# Deploy AGW in Kubernetes +## Prerequisites +Make sure you setup the master and the worker nodes. They must run Ubuntu Server 20.04 LTS, and the master node must have ssh key access to the worker nodes with the user `magma`. +Optionally you can setup an ansible controller where you will run the deploy script or run it directly from the master node. + + +The worker nodes must satisfy the following requirements: + + +- aarch64 or 64bit-X86 machine. +- Two ethernet ports. + + +The interfaces are renamed to `eth0` and `eth1` during the deploy process. Interface `eth0` will carry any traffic that is not S1. That is,data plane traffic (SGi), control plane traffic (Orc8r HTTP2) and management (ssh). The interface `eth1` carries S1 traffic. + + +> NOTE: +> - Interface names might have different names on your hardware, so just +> replace `enp1s0` and `enp2s0` with your current interface names +> when following this guide. +> - The `agw_install_docker.sh` script will rename the `enp1s0` +> interface to `eth0`. +> - If you do not want all internet traffic to go through `enp1s0` +> to separate control plane (Orc8r Http2 traffic) from user plane, you +> may want to add another interface and configure proper routing. + +## Deployment + +### 1. Prepare the cluster + +- Configure the user `magma` with SUDO privileges to the master and worker nodes. + +- Configure ssh key access from the worker to the nodes for the `magma` user. + +- Add your master and worker nodes to the ansible inventory file at `$MAGMA_ROOT/lte/gateway/deploy/agw_k8s_hosts.yml`. Make sure that the `ansible_user` is set to `magma` and the `ansible_sudo_pass` password is right. Set local ansible connection for the master node if you are deploying from it. + +- Copy the `rootCA.pem` file from the orc8r to the following location in the master node: + +```bash + +mkdir -p /var/opt/magma/certs + +vim /var/opt/magma/certs/rootCA.pem + +``` + +### 2. Deploy AGW Kubernetes cluster + +- cd to the `$MAGMA_ROOT/lte/gateway/deploy` directory. + +- Run the deployment script: + +```bash + +sudo ./agw_install_k8s.sh + +``` + +- You shall see the joined nodes with the command `kubectl get nodes`. + +#### Deploying in single node + +If you are running a single node cluster, make sure that the master node is available to the scheduler by untainting it. + +```bash + +kubectl taint nodes node-role.kubernetes.io/control-plane:NoSchedule- + +``` + +### 3. Install AGW + +Follow the AGW Helm Deployment guide in `$MAGMA_ROOT/lte/gateway/deploy/agwc-helm-charts` directory. + +If you are deploying AGW in multiple workers, ensure the Node Selection is configured properly in the Helm charts deployment files. diff --git a/lte/gateway/deploy/magma_k8s.yml b/lte/gateway/deploy/magma_k8s.yml new file mode 100644 index 000000000000..11a276a1170e --- /dev/null +++ b/lte/gateway/deploy/magma_k8s.yml @@ -0,0 +1,29 @@ +--- +# Copyright 2020 The Magma Authors. + +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- name: Deploy kubernetes to the hosts + hosts: all + become: yes + roles: + - role: agw_kube_deploy + +- name: Setup master node + hosts: master + become: yes + roles: + - role: agw_kube_master + +- name: Setup worker node + hosts: workers + become: yes + roles: + - role: agw_kube_worker diff --git a/lte/gateway/deploy/roles/agw_kube_deploy/tasks/main.yml b/lte/gateway/deploy/roles/agw_kube_deploy/tasks/main.yml new file mode 100644 index 000000000000..7adb6f249d56 --- /dev/null +++ b/lte/gateway/deploy/roles/agw_kube_deploy/tasks/main.yml @@ -0,0 +1,175 @@ +--- +# Copyright 2020 The Magma Authors. + +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +- name: Include vars + include_vars: + file: all.yaml + +- name: Update apt cache + apt: + update_cache: yes + +- name: Set authorized key for remote user + ansible.posix.authorized_key: + user: "{{ kube_admin_username }}" + state: present + key: "{{ lookup('file', lookup('env','HOME') + '/.ssh/id_rsa.pub') }}" + +- name: Disable password authentication for root + lineinfile: + path: /etc/ssh/sshd_config + state: present + regexp: '^#?PermitRootLogin' + line: 'PermitRootLogin prohibit-password' + +- name: Setup passwordless sudo + lineinfile: + path: /etc/sudoers + state: present + regexp: '^%sudo' + line: '%sudo ALL=(ALL) NOPASSWD: ALL' + validate: '/usr/sbin/visudo -cf %s' + +- name: Disable SWAP + shell: | + swapoff -a + +- name: Disable SWAP in fstab + replace: + path: /etc/fstab + regexp: '^(\s*)([^#\n]+\s+)(\w+\s+)swap(\s+.*)$' + replace: '#\1\2\3swap\4' + backup: yes + +- name: Create an empty file for the containerd module + copy: + content: "" + dest: /etc/modules-load.d/containerd.conf + force: no + +- name: Configure modules for containerd + blockinfile: + path: /etc/modules-load.d/containerd.conf + block: | + overlay + br_netfilter + +- name: Create an empty file for K8S sysctl parameters + copy: + content: "" + dest: /etc/sysctl.d/99-kubernetes-cri.conf + force: no + +- name: Configure sysctl parameters for K8S + lineinfile: + path: /etc/sysctl.d/99-kubernetes-cri.conf + line: "{{ item }}" + with_items: + - "net.bridge.bridge-nf-call-iptables = 1" + - "net.ipv4.ip_forward = 1" + - "net.bridge.bridge-nf-call-ip6tables = 1" + +- name: Apply sysctl parameters + command: sysctl --system + +- name: Install APT Transport HTTPS + apt: + name: apt-transport-https + state: present + + +- name: Add keyrings directory if it doesn't exist + file: + path: /etc/apt/keyrings + state: directory + +- name: Add Docker apt-key + get_url: + url: https://download.docker.com/linux/ubuntu/gpg + dest: /etc/apt/keyrings/docker-apt-keyring.asc + mode: "0644" + force: true + +- name: Add Docker's APT repo + apt_repository: + repo: "deb [arch={{ 'amd64' if ansible_architecture == 'x86_64' else 'arm64' }} signed-by=/etc/apt/keyrings/docker-apt-keyring.asc] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable" + state: present + update_cache: yes + +- name: Add Kubernetes apt-key + get_url: + url: https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key + dest: /etc/apt/keyrings/kubernetes-apt-keyring.asc + mode: "0644" + force: true + +- name: Add Kubernetes APT repository + apt_repository: + repo: "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.asc] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /" + state: present + update_cache: yes + +- name: Install containerd + apt: + name: containerd.io + state: present + +- name: Create containerd directory + file: + path: /etc/containerd + state: directory + +- name: Add containerd configuration + shell: /usr/bin/containerd config default > /etc/containerd/config.toml + +- name: Configuring Systemd cgroup driver for containerd + lineinfile: + path: /etc/containerd/config.toml + regexp: " SystemdCgroup = false" + line: " SystemdCgroup = true" + +- name: Enable the containerd service and start service + systemd: + name: containerd + state: restarted + enabled: yes + daemon-reload: yes + +- name: Install Kubelet + apt: + name: kubelet=1.29.* + state: present + update_cache: true + +- name: Install Kubeadm + apt: + name: kubeadm=1.29.* + state: present + +- name: Enable the Kubelet service + service: + name: kubelet + enabled: yes + +- name: Load br_netfilter kernel module + modprobe: + name: br_netfilter + state: present + +- name: Set bridge-nf-call-iptables + sysctl: + name: net.bridge.bridge-nf-call-iptables + value: 1 + +- name: Set ip_forward + sysctl: + name: net.ipv4.ip_forward + value: 1 diff --git a/lte/gateway/deploy/roles/agw_kube_deploy/vars/all.yaml b/lte/gateway/deploy/roles/agw_kube_deploy/vars/all.yaml new file mode 100644 index 000000000000..cf3cdc5dc553 --- /dev/null +++ b/lte/gateway/deploy/roles/agw_kube_deploy/vars/all.yaml @@ -0,0 +1,18 @@ +--- +# Copyright 2020 The Magma Authors. + +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +docker_registry: "linuxfoundation.jfrog.io/magma-docker/" +docker_user: "" +docker_pass: "" +image_version: "latest" +optional_arch_postfix: "" +kube_admin_username: magma diff --git a/lte/gateway/deploy/roles/agw_kube_master/tasks/main.yml b/lte/gateway/deploy/roles/agw_kube_master/tasks/main.yml new file mode 100644 index 000000000000..8c6dd62533fe --- /dev/null +++ b/lte/gateway/deploy/roles/agw_kube_master/tasks/main.yml @@ -0,0 +1,111 @@ +--- +# Copyright 2020 The Magma Authors. + +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# tasks for agw master node +- name: Include vars + include_vars: + file: all.yaml + +- name: Install Kubectl + apt: + name: kubectl=1.29.* + state: present + force: yes + +- name: Create an Empty file for Kubeadm configuring + copy: + content: "" + dest: /etc/kubernetes/kubeadm-config.yaml + force: no + +- name: Configure container runtime + blockinfile: + path: /etc/kubernetes/kubeadm-config.yaml + block: | + kind: ClusterConfiguration + apiVersion: kubeadm.k8s.io/v1beta3 + networking: + podSubnet: "10.244.0.0/16" + --- + kind: KubeletConfiguration + apiVersion: kubelet.config.k8s.io/v1beta1 + runtimeRequestTimeout: "15m" + cgroupDriver: "systemd" + systemReserved: + cpu: 100m + memory: 350M + kubeReserved: + cpu: 100m + memory: 50M + enforceNodeAllocatable: + - pods + +- name: Initialize the cluster + shell: kubeadm init --config /etc/kubernetes/kubeadm-config.yaml >> cluster_initialized.log + args: + chdir: /home/{{ kube_admin_username }} + creates: cluster_initialized.log + +- name: Create .kube directory + become_user: "{{ kube_admin_username }}" + file: + path: $HOME/.kube + state: directory + mode: 0755 + +- name: Copy admin.conf to User's kube config + become: yes + copy: + src: /etc/kubernetes/admin.conf + dest: /home/{{ kube_admin_username }}/.kube/config + remote_src: yes + mode: 0600 + owner: "{{ kube_admin_username }}" + +- name: Install Pod Network + become: yes + become_user: "{{ kube_admin_username }}" + shell: kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml >> pod_network_setup.log + args: + chdir: $HOME + creates: pod_network_setup.log + +- name: Retrieve Join Command + become: yes + become_user: "{{ kube_admin_username }}" + shell: kubeadm token create --print-join-command + changed_when: False + register: join_command_raw + +- name: Set Join Command + set_fact: + join_command: "{{ join_command_raw.stdout_lines[0] }}" + +# - name: Untaint the control-plane node in order to schedule pods +# tags: single_node +# become: yes +# become_user: "{{ kube_admin_username }}" +# shell: kubectl taint nodes magma-base-vm node-role.kubernetes.io/control-plane- +# ignore_errors: true + +- name: Download Helm command line tool + ansible.builtin.uri: + url: https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 + return_content: true + register: helm_installer + +- name: Install Helm + ansible.builtin.command: + cmd: bash + stdin: "{{ helm_installer.content }}" + creates: /usr/local/bin/helm + environment: + DESIRED_VERSION: "{{ helm_version | default('') }}" diff --git a/lte/gateway/deploy/roles/agw_kube_master/vars/all.yaml b/lte/gateway/deploy/roles/agw_kube_master/vars/all.yaml new file mode 100644 index 000000000000..cf3cdc5dc553 --- /dev/null +++ b/lte/gateway/deploy/roles/agw_kube_master/vars/all.yaml @@ -0,0 +1,18 @@ +--- +# Copyright 2020 The Magma Authors. + +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +docker_registry: "linuxfoundation.jfrog.io/magma-docker/" +docker_user: "" +docker_pass: "" +image_version: "latest" +optional_arch_postfix: "" +kube_admin_username: magma diff --git a/lte/gateway/deploy/roles/agw_kube_worker/files/update_dns_resolvers.sh b/lte/gateway/deploy/roles/agw_kube_worker/files/update_dns_resolvers.sh new file mode 100644 index 000000000000..e852a055a1d1 --- /dev/null +++ b/lte/gateway/deploy/roles/agw_kube_worker/files/update_dns_resolvers.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Copyright 2024 The Magma Authors. + +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + ln -sf /var/run/systemd/resolve/resolv.conf /etc/resolv.conf + sed -i 's/#DNS=/DNS=8.8.8.8 208.67.222.222/' /etc/systemd/resolved.conf + service systemd-resolved restart + + echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections + + cat > /etc/apt/apt.conf.d/20auto-upgrades << EOF + APT::Periodic::Update-Package-Lists "0"; + APT::Periodic::Download-Upgradeable-Packages "0"; + APT::Periodic::AutocleanInterval "0"; + APT::Periodic::Unattended-Upgrade "0"; +EOF \ No newline at end of file diff --git a/lte/gateway/deploy/roles/agw_kube_worker/tasks/main.yml b/lte/gateway/deploy/roles/agw_kube_worker/tasks/main.yml new file mode 100644 index 000000000000..57ce79e65002 --- /dev/null +++ b/lte/gateway/deploy/roles/agw_kube_worker/tasks/main.yml @@ -0,0 +1,203 @@ +--- +# Copyright 2020 The Magma Authors. + +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# tasks for agw worker nodes +- name: Include vars + include_vars: + file: all.yaml + +- name: Checking if Ubuntu 20.04 is installed + ansible.builtin.meta: end_host + when: + - ansible_distribution != 'Ubuntu' + - ansible_distribution_version != '20.04' + +- name: Apt purge unattended upgrades + shell: apt purge --auto-remove unattended-upgrades -y + +- name: Hold aws linux headers packages + shell: apt-mark hold {{ ansible_kernel }} linux-aws linux-headers-aws linux-image-aws + +- name: Enable service networking and ensure it is not masked + systemd: + name: networking + enabled: true + masked: no + +- name: Update DNS resolvers + script: update_dns_resolvers.sh + +- name: Create interfaces.d if it does not exist + file: + path: /etc/network/interfaces.d + state: directory + +- name: Point interfaces to interfaces.d directory + copy: + dest: /etc/network/interfaces + content: | + source-directory /etc/network/interfaces.d + +- name: Clone magma github repository + git: + repo: https://github.com/magma/magma.git + dest: /opt/magma + clone: yes + update: yes + version: v1.9 + +- name: Add key for magma registry + ansible.builtin.copy: + src: "roles/magma_deploy/files/{{ magma_pkgrepo_key }}" + dest: /etc/apt/trusted.gpg.d/magma.asc + +- name: Configure the registry in sources.list.d + ansible.builtin.apt_repository: + repo: "deb {{ magma_pkgrepo_proto }}://{{ magma_pkgrepo_host }}{{ magma_pkgrepo_path }} {{ magma_pkgrepo_dist }} {{ magma_pkgrepo_component }}" + filename: magma + state: present + update_cache: true + +- name: Install networking utils. + apt: + name: "{{ packages }}" + state: latest + vars: + packages: + - ifupdown + - bridge-utils + - net-tools + +- name: Set network intefaces fact + vars: + iface_prefix: "en" + set_fact: + cur_ifaces: "{{ ansible_interfaces | select('match', iface_prefix ~ '.*') | sort | list }}" + +- name: Check netplan configuration files + find: + paths: /etc/netplan + file_type: file + read_whole_file: true + contains: "{{ item }}" + register: file_match + loop: "{{ cur_ifaces }}" + +- name: Set grup options + shell: sed -i 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"/g' /etc/default/grub + when: cur_ifaces | length > 0 + +- name: Rename network interfaces + ansible.builtin.replace: + path: "{{ item.files.0.path }}" + regexp: '(\s+){{ item.invocation.module_args.contains }}:(\s+.*)?' + replace: '\1eth{{ iface_idx }}:\2' + backup: no + loop: "{{ file_match.results }}" + loop_control: + index_var: iface_idx + when: cur_ifaces | length > 0 + +- name: Update grup configuration + shell: update-grub2 + when: cur_ifaces | length > 0 + +- name: Netplan apply + shell: netplan apply + when: cur_ifaces | length > 0 + +- name: Install prebuilt openvswitch packages + apt: + name: "{{ packages }}" + vars: + packages: + - libopenvswitch + - openvswitch-datapath-dkms + - openvswitch-datapath-source + - openvswitch-common + - openvswitch-switch + +- name: Stop and disable service openvswitch-switch. + service: + name: openvswitch-switch + state: stopped + enabled: false + +- name: Install kernel headers for ovs + apt: + name: "{{ packages }}" + vars: + packages: + - linux-headers-{{ ansible_kernel }} + +- name: Copy necessary files for ovs + copy: + src={{ item.src }} + dest={{ item.dest }} + mode=0755 + with_items: + - { src: 'roles/magma/files/magma_ifaces_gtp', dest: '/etc/network/interfaces.d/gtp' } + - { src: 'roles/magma/files/magma_modules_load', dest: '/etc/modules-load.d/magma.conf' } + +- name: Preload ip6_udp_tunnel module + community.general.modprobe: + name: ip6_udp_tunnel + state: present + +- name: Preload GTP module + community.general.modprobe: + name: gtp + state: present + +- name: create directories for magma configs and files + file: + path: "{{ item }}" + state: directory + mode: '0755' + loop: + - "/var/opt/magma" + - "/var/opt/magma/configs" + - "/var/opt/magma/configs/tmp" + - "/var/opt/magma/certs" + - "/etc/magma" + - "/etc/magma/templates/" + - "/var/opt/magma/docker" + +- name: Create openvswitch directory + file: + path: /etc/openvswitch + state: directory + +- name: touch snowflake + shell: touch /etc/snowflake + +- name: copy the config files for magma + shell: cp -r /opt/magma/lte/gateway/configs/* /etc/magma/ + +- name: copy the config files for orchestrator + shell: cp -r /opt/magma/orc8r/gateway/configs/templates/* /etc/magma/templates/ + +- name: update nat interface + shell: cp -f /etc/magma/pipelined.yml_prod /etc/magma/pipelined.yml + +- name: copy the python scripts + shell: cp -r /opt/magma/lte/gateway/python/scripts/* /usr/local/bin/ + +- name: Wait for server to restart + reboot: + reboot_timeout: 300 + when: cur_ifaces | length > 0 + +- name: Join worker to cluster + shell: "{{ hostvars['127.0.0.1']['join_command'] }} >> node_joined.log" + args: + chdir: /home/{{ kube_admin_username }} + creates: node_joined.log diff --git a/lte/gateway/deploy/roles/agw_kube_worker/vars/all.yaml b/lte/gateway/deploy/roles/agw_kube_worker/vars/all.yaml new file mode 100644 index 000000000000..7b9ed83f2915 --- /dev/null +++ b/lte/gateway/deploy/roles/agw_kube_worker/vars/all.yaml @@ -0,0 +1,28 @@ +--- +# Copyright 2020 The Magma Authors. + +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +kube_admin_username: magma + +magma_pkgrepo_proto: https +magma_pkgrepo_host: linuxfoundation.jfrog.io/artifactory/magma-packages-test +magma_pkgrepo_path: "" +magma_pkgrepo_dist: focal-ci +magma_pkgrepo_component: main +magma_pkgrepo_name: "magma" +magma_pkgrepo_key: "linux_foundation_registry_key.asc" +magma_use_pkgrepo: yes + +docker_registry: "linuxfoundation.jfrog.io/magma-docker/" +docker_user: "" +docker_pass: "" +image_version: "latest" +optional_arch_postfix: "" diff --git a/lte/gateway/docker/docker-compose.yaml b/lte/gateway/docker/docker-compose.yaml index 826b2d66dcbc..08e34b6f4d44 100644 --- a/lte/gateway/docker/docker-compose.yaml +++ b/lte/gateway/docker/docker-compose.yaml @@ -1,3 +1,4 @@ +--- version: "3.7" # Standard logging for each service @@ -52,11 +53,38 @@ x-agw-c-service: &cservice image: ${DOCKER_REGISTRY}agw_gateway_c${OPTIONAL_ARCH_POSTFIX}:${IMAGE_VERSION} services: + gateway_ovs: + build: + context: ${BUILD_CONTEXT} + dockerfile: lte/gateway/docker/services/openvswitch/Dockerfile + image: ${DOCKER_REGISTRY}agw_gateway_ovs${OPTIONAL_ARCH_POSTFIX}:${IMAGE_VERSION} + profiles: [ ovs ] + privileged: true + container_name: openvswitch-switch + command: "load-modules-and-start-ovs" + healthcheck: + test: [ "CMD", "healthcheck.sh" ] + interval: 30s + timeout: 30s + retries: 5 + start_period: 10s + restart: unless-stopped + volumes: + - /etc/localtime:/etc/localtime:ro + - /etc/network:/etc/network # shared ifupdown files with the host + - /var/run/openvswitch/:/var/run/openvswitch/ # run time files shared between ovs and magmad + - /lib/modules:/lib/modules # used to load/unload modules in hosts kernel + - /etc/openvswitch:/etc/openvswitch + cap_add: + - NET_ADMIN + - SYS_MODULE + network_mode: host + magmad: <<: *pyservice container_name: magmad healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50052"] + test: [ "CMD", "nc", "-zv", "localhost", "50052" ] interval: "4s" timeout: "4s" retries: 3 @@ -66,6 +94,9 @@ services: DOCKER_REGISTRY: ${DOCKER_REGISTRY} DOCKER_USERNAME: ${DOCKER_USERNAME} DOCKER_PASSWORD: ${DOCKER_PASSWORD} + security_opt: + - apparmor=unconfined + - systempaths=unconfined command: > /bin/bash -c " /usr/bin/env python3 /usr/local/bin/generate_oai_config.py && @@ -75,7 +106,7 @@ services: <<: *pyservice container_name: redis healthcheck: - test: ["CMD", "redis-cli", "-p", "6380", "ping"] + test: [ "CMD", "redis-cli", "-p", "6380", "ping" ] interval: "4s" timeout: "4s" retries: 3 @@ -90,7 +121,7 @@ services: depends_on: - redis healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50067"] + test: [ "CMD", "nc", "-zv", "localhost", "50067" ] interval: "4s" timeout: "4s" retries: 3 @@ -102,7 +133,7 @@ services: <<: *pyservice container_name: subscriberdb healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50051"] + test: [ "CMD", "nc", "-zv", "localhost", "50051" ] interval: "4s" timeout: "4s" retries: 3 @@ -114,12 +145,12 @@ services: <<: *pyservice container_name: enodebd healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "60055"] + test: [ "CMD", "nc", "-zv", "localhost", "60055" ] interval: "4s" timeout: "4s" retries: 3 cap_add: - - NET_ADMIN # The container is invoking iptables and needs NET_ADMIN for that + - NET_ADMIN # The container is invoking iptables and needs NET_ADMIN for that environment: MAGMA_DEV_MODE: ${MAGMA_DEV_MODE} command: /usr/bin/env python3 -m magma.enodebd.main @@ -128,7 +159,7 @@ services: <<: *pyservice container_name: state healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50074"] + test: [ "CMD", "nc", "-zv", "localhost", "50074" ] interval: "4s" timeout: "4s" retries: 3 @@ -144,7 +175,7 @@ services: depends_on: - redis healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50068"] + test: [ "CMD", "nc", "-zv", "localhost", "50068" ] interval: "4s" timeout: "4s" retries: 3 @@ -156,7 +187,7 @@ services: <<: *pyservice container_name: health healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50080"] + test: [ "CMD", "nc", "-zv", "localhost", "50080" ] interval: "4s" timeout: "4s" retries: 3 @@ -168,7 +199,7 @@ services: <<: *pyservice container_name: monitord healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50076"] + test: [ "CMD", "nc", "-zv", "localhost", "50076" ] interval: "4s" timeout: "4s" retries: 3 @@ -182,7 +213,7 @@ services: <<: *pyservice container_name: redirectd healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50071"] + test: [ "CMD", "nc", "-zv", "localhost", "50071" ] interval: "4s" timeout: "4s" retries: 3 @@ -192,7 +223,7 @@ services: <<: *pyservice container_name: smsd healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50078"] + test: [ "CMD", "nc", "-zv", "localhost", "50078" ] interval: "4s" timeout: "4s" retries: 3 @@ -204,7 +235,7 @@ services: <<: *pyservice container_name: control_proxy healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "8443"] + test: [ "CMD", "nc", "-zv", "localhost", "8443" ] interval: "4s" timeout: "4s" retries: 3 @@ -219,7 +250,7 @@ services: <<: *pyservice container_name: ctraced healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50079"] + test: [ "CMD", "nc", "-zv", "localhost", "50079" ] interval: "4s" timeout: "4s" retries: 3 @@ -233,7 +264,7 @@ services: ulimits: core: -1 healthcheck: - test: ["CMD", "test", "-S", "/tmp/sctpd_downstream.sock"] + test: [ "CMD", "test", "-S", "/tmp/sctpd_downstream.sock" ] interval: "4s" timeout: "4s" retries: 3 @@ -248,7 +279,7 @@ services: <<: *cservice container_name: oai_mme healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50073"] + test: [ "CMD", "nc", "-zv", "localhost", "50073" ] interval: "4s" timeout: "4s" retries: 3 @@ -274,6 +305,9 @@ services: container_name: pipelined security_opt: - seccomp:unconfined + depends_on: + gateway_ovs: + condition: service_healthy privileged: true environment: MAGMA_PRINT_GRPC_PAYLOAD: 0 @@ -284,7 +318,7 @@ services: - NET_RAW - SYS_NICE healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50063"] + test: [ "CMD", "nc", "-zv", "localhost", "50063" ] interval: "4s" timeout: "4s" retries: 3 @@ -306,7 +340,7 @@ services: depends_on: - directoryd healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50065"] + test: [ "CMD", "nc", "-zv", "localhost", "50065" ] interval: "4s" timeout: "4s" retries: 3 @@ -321,20 +355,19 @@ services: <<: *pyservice container_name: mobilityd healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "60051"] + test: [ "CMD", "nc", "-zv", "localhost", "60051" ] interval: "4s" timeout: "4s" retries: 3 environment: MAGMA_DEV_MODE: ${MAGMA_DEV_MODE} - command: - sh -c "sleep 5 && /usr/bin/env python3 -m magma.mobilityd.main" + command: sh -c "sleep 5 && /usr/bin/env python3 -m magma.mobilityd.main" td-agent-bit: <<: *pyservice container_name: td-agent-bit healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "5140"] + test: [ "CMD", "nc", "-zv", "localhost", "5140" ] interval: "4s" timeout: "4s" retries: 3 @@ -343,14 +376,13 @@ services: environment: MAGMA_DEV_MODE: ${MAGMA_DEV_MODE} command: > - /bin/bash -c "/usr/local/bin/generate_fluent_bit_config.py && - /opt/td-agent-bit/bin/td-agent-bit -c /var/opt/magma/tmp/td-agent-bit.conf" + /bin/bash -c "/usr/local/bin/generate_fluent_bit_config.py && /opt/td-agent-bit/bin/td-agent-bit -c /var/opt/magma/tmp/td-agent-bit.conf" eventd: <<: *pyservice container_name: eventd healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50075"] + test: [ "CMD", "nc", "-zv", "localhost", "50075" ] interval: "4s" timeout: "4s" retries: 3 @@ -362,7 +394,7 @@ services: <<: *cservice container_name: connectiond healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50082"] + test: [ "CMD", "nc", "-zv", "localhost", "50082" ] interval: "4s" timeout: "4s" retries: 3 @@ -376,7 +408,7 @@ services: <<: *cservice container_name: liagentd healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50065"] + test: [ "CMD", "nc", "-zv", "localhost", "50065" ] interval: "4s" timeout: "4s" retries: 3 @@ -390,7 +422,7 @@ services: image: ${DOCKER_REGISTRY}gateway_go${OPTIONAL_ARCH_POSTFIX}:${IMAGE_VERSION} container_name: envoy_controller healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "50081"] + test: [ "CMD", "nc", "-zv", "localhost", "50081" ] interval: "4s" timeout: "4s" retries: 3 @@ -403,6 +435,8 @@ services: waitForHealthyPods: image: alpine:latest depends_on: + gateway_ovs: + condition: service_healthy magmad: condition: service_healthy redis: diff --git a/lte/gateway/docker/ghz/Dockerfile b/lte/gateway/docker/ghz/Dockerfile index 2c55d572001b..ec31d0c1efb3 100644 --- a/lte/gateway/docker/ghz/Dockerfile +++ b/lte/gateway/docker/ghz/Dockerfile @@ -40,7 +40,7 @@ WORKDIR ${MAGMA_ROOT}/ghz RUN make build -FROM ${REPO_LOCATION}/agw_gateway_python as python_builder +FROM ${REPO_LOCATION}/agw_gateway_python AS python_builder ARG GHZ_REPO=https://github.com/bojand/ghz @@ -68,13 +68,13 @@ WORKDIR ${MAGMA_ROOT}/ghz RUN make build -FROM ${REPO_LOCATION}/agw_gateway_c as agw_c_ghz +FROM ${REPO_LOCATION}/agw_gateway_c AS agw_c_ghz COPY --from=c_builder /magma/ghz/dist/ghz /usr/local/bin/ WORKDIR ${MAGMA_ROOT}/lte/gateway/python/load_tests -FROM ${REPO_LOCATION}/agw_gateway_python as agw_python_ghz +FROM ${REPO_LOCATION}/agw_gateway_python AS agw_python_ghz COPY --from=python_builder /magma/ghz/dist/ghz /usr/local/bin/ diff --git a/lte/gateway/docker/mme/Dockerfile.rhel8 b/lte/gateway/docker/mme/Dockerfile.rhel8 index 1903b2f41210..82beb6123ea3 100644 --- a/lte/gateway/docker/mme/Dockerfile.rhel8 +++ b/lte/gateway/docker/mme/Dockerfile.rhel8 @@ -148,9 +148,9 @@ RUN git clone --recurse-submodules -b v1.15.0 https://github.com/grpc/grpc && \ git clone https://github.com/cpp-redis/cpp_redis.git && \ wget https://ftp.gnu.org/gnu/nettle/nettle-2.5.tar.gz && \ wget https://www.gnupg.org/ftp/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz && \ - git clone https://liblfds.org/git/liblfds && \ + git clone git://liblfds.org/liblfds && \ git clone https://gitea.osmocom.org/cellular-infrastructure/libgtpnl && \ - git clone https://github.com/OPENAIRINTERFACE/asn1c.git && \ + git clone https://github.com/mouse07410/asn1c.git && \ git clone https://github.com/OPENAIRINTERFACE/opencord.org.freeDiameter.git freediameter && \ git clone https://github.com/nlohmann/json.git @@ -275,8 +275,8 @@ RUN cd libgtpnl && \ ##### asn1c RUN cd asn1c && \ - # Moved git clone https://github.com/OPENAIRINTERFACE/asn1c.git && \ - git checkout f12568d617dbf48497588f8e227d70388fa217c9 && \ + # Moved git clone https://github.com/mouse07410/asn1c.git && \ + git checkout ebed802 && \ autoreconf -iv && \ ./configure && \ make -j`nproc` && \ diff --git a/lte/gateway/docker/mme/Dockerfile.ubuntu18.04 b/lte/gateway/docker/mme/Dockerfile.ubuntu18.04 index 8f93634753a7..a34034e68442 100644 --- a/lte/gateway/docker/mme/Dockerfile.ubuntu18.04 +++ b/lte/gateway/docker/mme/Dockerfile.ubuntu18.04 @@ -82,9 +82,10 @@ RUN git clone --recurse-submodules -b v1.15.0 https://github.com/grpc/grpc && \ git clone https://github.com/cpp-redis/cpp_redis.git && \ wget https://ftp.gnu.org/gnu/nettle/nettle-2.5.tar.gz && \ wget https://www.gnupg.org/ftp/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz && \ - git clone https://liblfds.org/git/liblfds && \ + git clone git://liblfds.org/liblfds && \ git clone https://gitea.osmocom.org/cellular-infrastructure/libgtpnl && \ git clone https://github.com/OPENAIRINTERFACE/asn1c.git && \ + git clone https://github.com/mouse07410/asn1c.git && \ git clone https://github.com/OPENAIRINTERFACE/opencord.org.freeDiameter.git freediameter && \ git clone https://github.com/nlohmann/json.git @@ -207,8 +208,8 @@ RUN cd libgtpnl && \ ##### asn1c RUN cd asn1c && \ - # Moved git clone https://github.com/OPENAIRINTERFACE/asn1c.git && \ - git checkout f12568d617dbf48497588f8e227d70388fa217c9 && \ + # Moved git clone https://github.com/mouse07410/asn1c.git && \ + git checkout ebed802 && \ autoreconf -iv && \ ./configure && \ make -j`nproc` && \ diff --git a/lte/gateway/docker/python-precommit/requirements.txt b/lte/gateway/docker/python-precommit/requirements.txt index 7437a1592e9c..ca18f1d69be5 100644 --- a/lte/gateway/docker/python-precommit/requirements.txt +++ b/lte/gateway/docker/python-precommit/requirements.txt @@ -69,7 +69,7 @@ flake8-string-format==0.3.0 # via wemake-python-styleguide gitdb==4.0.2 # via gitpython -gitpython==3.1.32 +gitpython==3.1.41 # via bandit isort==5.8.0 # via diff --git a/lte/gateway/docker/services/c/Dockerfile b/lte/gateway/docker/services/c/Dockerfile index fc2a9da2d240..df2fabbc0db9 100644 --- a/lte/gateway/docker/services/c/Dockerfile +++ b/lte/gateway/docker/services/c/Dockerfile @@ -39,6 +39,10 @@ ENV CCACHE_DIR ${MAGMA_ROOT}/.cache/gateway/ccache ENV MAGMA_DEV_MODE 0 ENV XDG_CACHE_HOME ${MAGMA_ROOT}/.cache +# [TODO_GPG_KEY_WORKAROUND] Temporary steps to be removed once GPG public key issue has been fixed. +RUN echo "Acquire::AllowInsecureRepositories true;" > /etc/apt/apt.conf.d/99AllowInsecureRepositories \ + && echo "APT::Get::AllowUnauthenticated true;" >> /etc/apt/apt.conf.d/99AllowInsecureRepositories + RUN apt-get update && \ # Setup necessary tools for adding the Magma repository apt-get install -y apt-utils software-properties-common apt-transport-https gnupg wget && \ @@ -93,7 +97,10 @@ RUN apt-get update && apt-get install -y \ # Add the magma apt repo COPY keys/linux_foundation_registry_key.asc /etc/apt/trusted.gpg.d/magma.asc -RUN echo "deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" > /etc/apt/sources.list.d/magma.list +#[TODO_GPG_KEY_WORKAROUND]Temporary steps to be removed once GPG public key issue has been fixed. +#RUN echo "deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" > /etc/apt/sources.list.d/magma.list +RUN echo "deb [trusted=yes] https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" \ + > /etc/apt/sources.list.d/magma.list RUN apt-get update && apt-get install -y \ grpc-dev \ libfolly-dev \ @@ -166,6 +173,10 @@ ENV C_BUILD /build/c ENV TZ=Europe/Paris RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +# [TODO_GPG_KEY_WORKAROUND] Temporary steps to be removed once GPG public key issue has been fixed. +RUN echo "Acquire::AllowInsecureRepositories true;" > /etc/apt/apt.conf.d/99AllowInsecureRepositories \ + && echo "APT::Get::AllowUnauthenticated true;" >> /etc/apt/apt.conf.d/99AllowInsecureRepositories + # Install runtime dependencies RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y \ @@ -193,7 +204,11 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* COPY keys/linux_foundation_registry_key.asc /etc/apt/trusted.gpg.d/magma.asc -RUN echo "deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" > /etc/apt/sources.list.d/magma.list +#[TODO_GPG_KEY_WORKAROUND]Temporary steps to be removed once GPG public key issue has been fixed. +#RUN echo "deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" > /etc/apt/sources.list.d/magma.list +RUN echo "deb [trusted=yes] https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" \ + > /etc/apt/sources.list.d/magma.list + RUN apt-get update && apt-get install -y \ libopenvswitch \ openvswitch-common \ diff --git a/lte/gateway/docker/services/openvswitch/Dockerfile b/lte/gateway/docker/services/openvswitch/Dockerfile new file mode 100644 index 000000000000..2662f9d50b5a --- /dev/null +++ b/lte/gateway/docker/services/openvswitch/Dockerfile @@ -0,0 +1,51 @@ +ARG CPU_ARCH=x86_64 +ARG DEB_PORT=amd64 +ARG OS_DIST=ubuntu +ARG OS_RELEASE=focal +ARG EXTRA_REPO=https://linuxfoundation.jfrog.io/artifactory/magma-packages-test + +FROM $OS_DIST:$OS_RELEASE AS gateway_ovs +ARG CPU_ARCH +ARG DEB_PORT +ARG OS_DIST +ARG OS_RELEASE +ARG EXTRA_REPO + +ENV LINUX_HEADERS_VER 5.4.0-186-generic + +## Install packages +RUN apt-get -q update && \ + apt-get -y -q --no-install-recommends install \ + # Setup necessary tools for adding the Magma repository + apt-utils \ + ca-certificates \ + apt-transport-https \ + # networking utils + iptables \ + iproute2 \ + iputils-arping \ + iputils-clockdiff \ + iputils-ping \ + iputils-tracepath \ + bridge-utils \ + ifupdown \ + vim \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +## Add the magma apt repo and install the custom openvswitch modules +COPY keys/linux_foundation_registry_key.asc /etc/apt/trusted.gpg.d/magma.asc +RUN echo "deb https://linuxfoundation.jfrog.io/artifactory/magma-packages focal-1.8.0 main" > /etc/apt/sources.list.d/magma.list +RUN apt-get update && apt-get install -y --no-install-recommends \ + libopenvswitch \ + openvswitch-common \ + openvswitch-switch \ + linux-headers-${LINUX_HEADERS_VER} \ + openvswitch-datapath-dkms \ + && rm -rf /var/lib/apt/lists/* + +# Copy necessary files for ovs +COPY --chmod=755 lte/gateway/docker/services/openvswitch/healthcheck.sh /usr/local/bin/ +COPY --chmod=755 lte/gateway/docker/services/openvswitch/entrypoint.sh /entrypoint.sh + +ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/lte/gateway/docker/services/openvswitch/docker-compose.yaml b/lte/gateway/docker/services/openvswitch/docker-compose.yaml new file mode 100644 index 000000000000..37b27ba566d8 --- /dev/null +++ b/lte/gateway/docker/services/openvswitch/docker-compose.yaml @@ -0,0 +1,78 @@ +version: '3' +services: + ovs: + build: + context: ../../../../../ + dockerfile: lte/gateway/docker/services/openvswitch/Dockerfile + image: ovs + privileged: true # remove this after debug! + container_name: openvswitch-switch + healthcheck: + test: [ "CMD", "healthcheck.sh" ] + interval: 30s + timeout: 30s + retries: 5 + start_period: 10s + restart: unless-stopped + volumes: + - /etc/localtime:/etc/localtime:ro + - /etc/network:/etc/network # shared ifupdown files with the host + - /var/run/openvswitch/:/var/run/openvswitch/ # run time files shared between ovs and magmad + - /lib/modules:/lib/modules # used to load/unload modules in hosts kernel + - /etc/openvswitch:/etc/openvswitch + cap_add: + - NET_ADMIN + - SYS_MODULE + network_mode: host + +volumes: + data: + external: true + +# # Standard volumes mounted +# x-ovs-volumes: +# # - /lib/modules:/lib/modules +# # - /home/magma/ovs/var/ovs/log:/var/log/openvswitch +# # - /home/magma/ovs/var/lib/openvswitch:/var/lib/openvswitch +# # - /home/magma/ovs/var/run/openvswitch:/var/run/openvswitch +# # - /home/magma/ovs/etc/openvswitch:/etc/openvswitch +# &volumes_anchor +# - /etc/network/interfaces.d/gtp:/etc/network/interfaces.d/gtp + +# x-ovs-service: &ovs_service +# volumes: *volumes_anchor +# restart: always +# network_mode: host + +# services: +# ovs: +# build: +# context: ../../../../../ +# dockerfile: lte/gateway/docker/services/openvswitch/Dockerfile +# image: ovs +# ovsdb-server: +# <<: *ovs_service +# container_name: ovsdb-server +# cap_add: +# - NET_ADMIN +# - SYS_MODULE +# - SYS_NICE +# security_opt: +# - label=disable +# privileged: true +# # image: 10.0.3.1:5005/agw_gateway_c:exp_ovs_init_container +# image: ovs:latest +# command: ovsdb-server +# ovs-vswitchd: +# <<: *ovs_service +# container_name: ovs-vswitchd +# cap_add: +# - NET_ADMIN +# - SYS_MODULE +# - SYS_NICE +# security_opt: +# - label:disable +# privileged: true +# # image: 10.0.3.1:5005/agw_gateway_c:exp_ovs_init_container +# image: ovs:latest +# command: ovs-vswitchd diff --git a/lte/gateway/docker/services/openvswitch/entrypoint.sh b/lte/gateway/docker/services/openvswitch/entrypoint.sh new file mode 100644 index 000000000000..bd32fc4fc96f --- /dev/null +++ b/lte/gateway/docker/services/openvswitch/entrypoint.sh @@ -0,0 +1,140 @@ +#!/bin/bash + +is_kernel_module_loaded() { + + local -r module=$1 + + if lsmod | grep -Eq "^$module\\s+" || [[ -d "/sys/module/$module" ]]; then + echo "kernel module $module is loaded" + return 0 + fi + + echo "kernel module $module is missing" + return 1 +} + +load_kernel_mod() { + + local -r module=$1 + + echo "Checking if kernel module \"$module\" is loaded..." + if is_kernel_module_loaded "$module"; then + return 0 + fi + + echo "Attempting to load kernel module $module" + if ! modprobe -v "$module"; + then + echo "WARNING: Unable to dynamically load kernel module $module." + echo "Attempting to build and install dkms module." + OVS_DATAPATH_MOD_VER=$(dkms status | grep openvswitch | sed "s/:.*//" | awk -F'[,]' '{print $2}') + echo "Datapath module version is $OVS_DATAPATH_MOD_VER" + if ! dkms install -m openvswitch -v "$OVS_DATAPATH_MOD_VER"; then + exit 1 + fi + check_mod_version + if ! modprobe -v "$module"; then + if is_kernel_module_loaded "$module"; then + echo "kernel module $module is loaded!" + return 0 + else + return 1 + fi + else + echo "ERROR: Failed to install kernel module $module" + return 1 + fi + fi + if is_kernel_module_loaded "$module"; then + return 0 + else + return 1 + fi +} + +check_mod_version () { + echo "Checking installed and loaded ovs modules versions" + + kernel_ver=$(cat /sys/module/openvswitch/srcversion) + mod_ver=$(modinfo /lib/modules/"$(uname -r)"/updates/dkms/openvswitch.ko |grep srcversion|awk '{print $2}') + + if [[ "$kernel_ver" == "$mod_ver" ]]; then + OVS_VER=$(dpkg -l openvswitch-datapath-dkms | grep 'ii' | awk '{print $3}') + echo "Module update successful, installed version: $OVS_VER" + return 0 + else + echo "FAIL: Module update failed. Installed and loaded openvswitch module version mismatch!" + return 1 +fi +} + +load-datapath-modules () { + # Check if openvswitch kernel modules are loaded + if ! load_kernel_mod vport_gtp; then + echo "FATAL: Datapath modules not loaded. Exiting..." + exit 1 + fi + + while [ "$run" ]; do + sleep 30 + done ; +} + +start_ovs () { + firstrun=0 + [ -f "/etc/openvswitch/conf.db" ] || firstrun=1 + + echo "Checking if datapath kernel module is loaded" + if ! is_kernel_module_loaded vport_gtp; then + echo "FATAL: vport-gtp not loaded" + exit 1 + fi + + if [ $firstrun -ne 0 ]; then + # create database + echo "Creating the ovs service database" + ovsdb-tool create /etc/openvswitch/conf.db /usr/share/openvswitch/vswitch.ovsschema + fi + + # Start openvswitch daemons + if [ ! -d "/var/log/openvswitch" ]; then + mkdir -p /var/log/openvswitch + fi + + echo "Starting service openvswitch-switch" + /usr/share/openvswitch/scripts/ovs-ctl start --system-id=random || exit 1 + + # Activate bridge interfaces + echo "Activating bridge interfaces" + ifup --force --allow=ovs "$(ifquery --allow ovs --list)" + ifup --force mtr0 + + while [ "$run" ]; do + sleep .1 + done ; +} + + +trap stopit SIGINT; +run=1; +stopit() { + run=0; +}; + +case $1 in + "start-ovs-only") + start_ovs + ;; + "load-modules-only") + load-datapath-modules + ;; + "load-modules-and-start-ovs") + if load-datapath-modules; then + sleep 5 + start_ovs + fi + echo "FATAL: Datapath modules check failed" + exit 1 + ;; + *) echo "Invalid option $0 [start-ovs-only|load-modules-only|load-modules-and-start-ovs]" +esac diff --git a/lte/gateway/docker/services/openvswitch/healthcheck.sh b/lte/gateway/docker/services/openvswitch/healthcheck.sh new file mode 100644 index 000000000000..1c919b3ae91a --- /dev/null +++ b/lte/gateway/docker/services/openvswitch/healthcheck.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if usr/share/openvswitch/scripts/ovs-ctl status | grep ovsdb-server | grep -q running && + /usr/share/openvswitch/scripts/ovs-ctl status | grep ovs-vswitchd | grep -q running; then + exit +else + exit 1 +fi \ No newline at end of file diff --git a/lte/gateway/docker/services/openvswitch/magma-bridge-reset.sh b/lte/gateway/docker/services/openvswitch/magma-bridge-reset.sh new file mode 100755 index 000000000000..e968e9405557 --- /dev/null +++ b/lte/gateway/docker/services/openvswitch/magma-bridge-reset.sh @@ -0,0 +1,135 @@ +#!/bin/bash +# Copyright 2021 The Magma Authors. + +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +GTP_BR="gtp_br0" + +# ARG 1 +# -f: force reload kmod and OVS restart +# -y: reload kmod and restart OVS in case uplink-br is not configured +# -n: no kmod reload / no OVS restart +# any other value: restart OVS in case uplink-br is not configured + +KMOD_RELOAD=${1:-""} + +# ARG 2 +# uplink bridge name +SGI_BR=${2:-"uplink_br0"} + +# ARG 3: used to detect Non-NAT +# sgi port name. +SGI_PORT=$(ovs-ofctl show "$SGI_BR"|grep eth|cut -d'(' -f2|cut -d')' -f1) +if [[ -z $SGI_PORT ]]; +then + # This is Non-NAT case, SGi-port is egress interface + SGI_PORT=$3 +fi + +# ARG 4 +# static SGi IP +SGI_IP=$(ip a sh "$SGI_BR"|grep 'inet ' |awk '{print $2}') +if [[ -z $SGI_IP ]]; +then + SGI_IP=$4 +else + SGI_IP_SET="true" +fi + +# ARG 5 +# SGi network GW IP. +SGI_DEF_GW=$(ip r sh|grep default|grep "$SGI_BR"| awk '{print $3}') +if [[ -z $SGI_DEF_GW ]]; +then + SGI_DEF_GW=$5 +fi + + +if [[ "$KMOD_RELOAD" != '-f' ]]; +then + if [[ $SGI_IP_SET == "true" ]]; + then + echo "Uplink-br has IP address. dont reset the bridge" + ifdown "$GTP_BR" + ifdown patch-up + sleep 1 + ifup "$GTP_BR" + ifup patch-up + exit 0 + fi +fi +# local variables +FLOW_DUMP="$(mktemp)" + +#check DHCP client +DHCP_PID=$(pgrep -a 'dhclient' | grep "$SGI_BR" | awk '{print $1}') +if [[ -n $DHCP_PID ]]; +then + for pid in $DHCP_PID + do + kill "$pid" + done +fi + +# start reset procedure: +# save flows +ovs-ofctl dump-flows --no-names --no-stats "$SGI_BR" | \ + sed -e '/NXST_FLOW/d' \ + -e '/OFPST_FLOW/d' \ + -e 's/\(idle\|hard\)_age=[^,]*,//g' > "$FLOW_DUMP" + +# remove OVS objects +ovs-vsctl --all destroy Flow_Sample_Collector_Set + +ifdown "$SGI_BR" +ifdown "$GTP_BR" +ifdown patch-up +if [ "$KMOD_RELOAD" == '-n' ]; +then + : +elif [ "$KMOD_RELOAD" != '-y' ] && [ "$KMOD_RELOAD" != '-f' ]; +then + service openvswitch-switch restart +else + /etc/init.d/openvswitch-switch force-reload-kmod +fi + +# create OVS objects +sleep 1 +ifup "$SGI_BR" +ifup "$GTP_BR" +ifup patch-up +sleep 1 + +if [[ -n $SGI_PORT ]]; +then + ovs-vsctl --may-exist add-port "$SGI_BR" "$SGI_PORT" + ip link set dev "$SGI_PORT" up +fi + +# restore OVS flows +ovs-ofctl del-flows "$SGI_BR" +ovs-ofctl add-flows "$SGI_BR" "$FLOW_DUMP" +rm "$FLOW_DUMP" + +# start DHCP client if needed +if [[ -n $DHCP_PID ]]; +then + dhclient "$SGI_BR" & +else + #restore IP config + if [[ -n $SGI_IP ]]; + then + ip a add "$SGI_IP" dev "$SGI_BR" + fi + if [[ -n $SGI_DEF_GW ]]; + then + ip r add default via "$SGI_DEF_GW" + fi +fi diff --git a/lte/gateway/docker/services/openvswitch/magma_ifaces_gtp b/lte/gateway/docker/services/openvswitch/magma_ifaces_gtp new file mode 100755 index 000000000000..0d954cf2c7b4 --- /dev/null +++ b/lte/gateway/docker/services/openvswitch/magma_ifaces_gtp @@ -0,0 +1,75 @@ +# Add L3 OVS switch gtp_br0 with gtp0, veth0_ovs, and int_nat_peer +allow-ovs gtp_br0 +iface gtp_br0 inet static + address 192.168.128.1 + netmask 255.255.255.0 + pre-up ip link add proxy_port type veth peer name proxy_port_ns || true + pre-up ip link set proxy_port up || true + up sysctl net.ipv4.ip_forward=1 + up iptables -t mangle -C FORWARD -i gtp_br0 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1400 || iptables -t mangle -A FORWARD -i gtp_br0 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1400 + up iptables -t mangle -C FORWARD -o gtp_br0 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1400 || iptables -t mangle -A FORWARD -o gtp_br0 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1400 + ovs_type OVSBridge + ovs_ports gtp0 mtr0 ipfix0 patch-up proxy_port li_port + +# Add GTP vport to gtp_br0 as port 32768 +allow-gtp_br0 gtp0 +iface gtp0 inet manual + ovs_bridge gtp_br0 + ovs_type OVSTunnel + ovs_tunnel_type gtp + ovs_extra set interface ${IFACE} ofport_request=32768 + ovs_tunnel_options options:remote_ip=flow options:key=flow + +allow-gtp_br0 mtr0 +iface mtr0 inet static + address 10.1.0.1 + netmask 255.255.255.0 + ovs_bridge gtp_br0 + ovs_type OVSIntPort + ovs_extra set interface ${IFACE} ofport_request=15577 + +allow-gtp_br0 ipfix0 +iface ipfix0 inet static + address 127.0.0.10 + netmask 255.255.255.0 + ovs_bridge gtp_br0 + ovs_type OVSIntPort + ovs_extra set interface ${IFACE} ofport_request=15578 + +allow-gtp_br0 li_port +iface li_port inet static + address 127.1.0.0 + netmask 255.255.255.0 + ovs_bridge gtp_br0 + ovs_type OVSIntPort + ovs_extra set interface ${IFACE} ofport_request=15579 + +allow-gtp_br0 patch-up +iface patch-up inet manual + ovs_bridge gtp_br0 + ovs_type OVSPatchPort + ovs_patch_peer patch-agw + ovs_extra set interface ${IFACE} ofport_request=2 + +allow-gtp_br0 proxy_port +iface proxy_port inet manual + ovs_bridge gtp_br0 + ovs_type OVSPort + +allow-ovs uplink_br0 +iface uplink_br0 inet manual + ovs_type OVSBridge + ovs_ports dhcp0 patch-agw + +allow-uplink_br0 patch-agw +iface patch-agw inet manual + ovs_bridge uplink_br0 + ovs_type OVSPatchPort + ovs_patch_peer patch-up + ovs_extra set interface ${IFACE} ofport_request=2 + +allow-uplink_br0 dhcp0 +iface dhcp0 inet manual + ovs_bridge uplink_br0 + ovs_type OVSIntPort + ovs_extra set interface ${IFACE} ofport_request=3 diff --git a/lte/gateway/docker/services/openvswitch/magma_modules_load b/lte/gateway/docker/services/openvswitch/magma_modules_load new file mode 100644 index 000000000000..77d7f2c0df81 --- /dev/null +++ b/lte/gateway/docker/services/openvswitch/magma_modules_load @@ -0,0 +1,5 @@ +# Preload GTP module because adding ovs port directly +# loads vport-type-6 module without gtp preloaded causes +# deadlock in netlink +ip6_udp_tunnel +gtp diff --git a/lte/gateway/docker/services/python/Dockerfile b/lte/gateway/docker/services/python/Dockerfile index f6bb1c133c03..f63dab536da3 100644 --- a/lte/gateway/docker/services/python/Dockerfile +++ b/lte/gateway/docker/services/python/Dockerfile @@ -31,6 +31,10 @@ ENV MAGMA_ROOT=/magma ENV PIP_CACHE_HOME="~/.pipcache" ARG DEBIAN_FRONTEND=noninteractive +# [TODO_GPG_KEY_WORKAROUND] Temporary steps to be removed once GPG public key issue has been fixed. +RUN echo "Acquire::AllowInsecureRepositories true;" > /etc/apt/apt.conf.d/99AllowInsecureRepositories \ + && echo "APT::Get::AllowUnauthenticated true;" >> /etc/apt/apt.conf.d/99AllowInsecureRepositories + RUN apt-get update && apt-get install -y \ docker.io \ git \ @@ -97,6 +101,10 @@ ENV TZ=Europe/Paris ARG JSONPOINTER_VERSION=1.13 ARG DEBIAN_FRONTEND=noninteractive +# [TODO_GPG_KEY_WORKAROUND] Temporary steps to be removed once GPG public key issue has been fixed. +RUN echo "Acquire::AllowInsecureRepositories true;" > /etc/apt/apt.conf.d/99AllowInsecureRepositories \ + && echo "APT::Get::AllowUnauthenticated true;" >> /etc/apt/apt.conf.d/99AllowInsecureRepositories + RUN apt-get update && apt-get install -y \ apt-transport-https \ ca-certificates \ @@ -121,7 +129,10 @@ ENV PATH="/magma/orc8r/gateway/python/scripts/:/magma/lte/gateway/python/scripts # Add the magma apt repo COPY keys/linux_foundation_registry_key.asc /etc/apt/trusted.gpg.d/magma.asc -RUN echo "deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" > /etc/apt/sources.list.d/magma.list +#[TODO_GPG_KEY_WORKAROUND]Temporary steps to be removed once GPG public key issue has been fixed. +#RUN echo "deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" > /etc/apt/sources.list.d/magma.list +RUN echo "deb [trusted=yes] https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" \ + > /etc/apt/sources.list.d/magma.list RUN echo "deb https://packages.fluentbit.io/ubuntu/focal focal main" > /etc/apt/sources.list.d/tda.list RUN wget -qO - https://packages.fluentbit.io/fluentbit.key | apt-key add - @@ -132,7 +143,7 @@ RUN apt-get update && apt-get install -y \ openvswitch-datapath-dkms \ openvswitch-common \ openvswitch-switch \ - td-agent-bit \ + td-agent-bit=1.7.8 \ wireguard \ && rm -rf /var/lib/apt/lists/* diff --git a/lte/gateway/python/magma/subscriberdb/crypto/EC.py b/lte/gateway/python/magma/subscriberdb/crypto/EC.py index 35e799e75863..c39eebe71db3 100644 --- a/lte/gateway/python/magma/subscriberdb/crypto/EC.py +++ b/lte/gateway/python/magma/subscriberdb/crypto/EC.py @@ -185,8 +185,12 @@ def generate_sharedkey(self, ext_pubkey): """ generate_sharedkey - Generates shared key """ - extpubkey = ec.EllipticCurvePublicKey.from_encoded_point( - curve=ec.SECP256R1(), - data=ext_pubkey, - ) + try: + extpubkey = ec.EllipticCurvePublicKey.from_encoded_point( + curve=ec.SECP256R1(), + data=ext_pubkey, + ) + except ValueError: + return None # Invalid curve point received from UE + return self.PrivKey.exchange(ec.ECDH(), extpubkey) diff --git a/lte/gateway/python/magma/subscriberdb/crypto/ECIES.py b/lte/gateway/python/magma/subscriberdb/crypto/ECIES.py index d6c831387f2c..ccdfe3bd377b 100644 --- a/lte/gateway/python/magma/subscriberdb/crypto/ECIES.py +++ b/lte/gateway/python/magma/subscriberdb/crypto/ECIES.py @@ -159,7 +159,12 @@ def unprotect(self, ue_pubkey, ciphertext, mac) -> Optional[bytes]: Returns: cleartext: decrypted mac """ - shared_key = KDF(ue_pubkey, self.EC.generate_sharedkey(ue_pubkey)) + + ec_shared_key = self.EC.generate_sharedkey(ue_pubkey) + if ec_shared_key is None: + return None # Invalid curve point detected + + shared_key = KDF(ue_pubkey, ec_shared_key) aes_key, aes_nonce, aes_cnt, mac_key = ( shared_key[:16], shared_key[16:24], diff --git a/nms/Dockerfile b/nms/Dockerfile index 17394b78a552..7baa7b48f6b9 100644 --- a/nms/Dockerfile +++ b/nms/Dockerfile @@ -9,7 +9,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM node:16.14-alpine as builder +FROM node:16.14-alpine AS builder RUN apk add python3 g++ make libx11 glew-dev libxi-dev ca-certificates diff --git a/nms/app/components/admin/Networks.tsx b/nms/app/components/admin/Networks.tsx index 0e42ec511b8b..d67b50977d31 100644 --- a/nms/app/components/admin/Networks.tsx +++ b/nms/app/components/admin/Networks.tsx @@ -220,7 +220,9 @@ function Networks() { }); closeDialog(); if (!selectedNetworkId) { - window.location.replace(`/nms/${networkID}/admin/networks`); + window.location.replace( + `/nms/${encodeURIComponent(networkID)}/admin/networks`, + ); } }} /> diff --git a/nms/mock/Dockerfile b/nms/mock/Dockerfile index d4eb636fcb06..b848be159ab5 100644 --- a/nms/mock/Dockerfile +++ b/nms/mock/Dockerfile @@ -9,7 +9,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM node:16.14-alpine as builder +FROM node:16.14-alpine AS builder WORKDIR /usr/src/ diff --git a/nms/package.json b/nms/package.json index 12380b9b2553..ffa1ebb5c7b0 100644 --- a/nms/package.json +++ b/nms/package.json @@ -12,7 +12,7 @@ "@babel/preset-env": "^7.11.5", "@babel/preset-react": "^7.0.0", "@babel/register": "^7.13.16", - "@babel/runtime": "^7.14.0", + "@babel/runtime": "^7.26.10", "@emotion/react": "^11.9.3", "@emotion/styled": "^11.9.3", "@gatsbyjs/webpack-hot-middleware": "^2.25.3", @@ -37,7 +37,7 @@ "csurf": "^1.9.0", "date-fns": "^2.29.2", "email-validator": "^2.0.4", - "express": "^4.17.3", + "express": "^4.20.0", "express-http-proxy": "^1.5.1", "express-rate-limit": "^7.1.5", "express-session": "^1.15.6", @@ -63,7 +63,7 @@ "passport-http-bearer": "^1.0.1", "passport-local": "^1.0.0", "passport-saml": "^3.2.2", - "path-to-regexp": "^6.2.1", + "path-to-regexp": "^6.3.0", "pg": "^8.6.0", "pug": "^3.0.3", "react": "^17.0.2", diff --git a/nms/yarn.lock b/nms/yarn.lock index f59e15379bcd..bb608091b57e 100644 --- a/nms/yarn.lock +++ b/nms/yarn.lock @@ -61,6 +61,15 @@ dependencies: "@babel/highlight" "^7.16.7" +"@babel/code-frame@^7.26.2": + version "7.26.2" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" + integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== + dependencies: + "@babel/helper-validator-identifier" "^7.25.9" + js-tokens "^4.0.0" + picocolors "^1.0.0" + "@babel/compat-data@^7.12.7": version "7.12.7" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.12.7.tgz#9329b4782a7d6bbd7eef57e11addf91ee3ef1e41" @@ -596,6 +605,11 @@ dependencies: "@babel/types" "^7.18.6" +"@babel/helper-string-parser@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz#1aabb72ee72ed35789b4bbcad3ca2862ce614e8c" + integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA== + "@babel/helper-validator-identifier@^7.10.4": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" @@ -616,6 +630,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== +"@babel/helper-validator-identifier@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7" + integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== + "@babel/helper-validator-option@^7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.11.tgz#d66cb8b7a3e7fe4c6962b32020a131ecf0847f4f" @@ -646,32 +665,13 @@ "@babel/traverse" "^7.10.4" "@babel/types" "^7.10.4" -"@babel/helpers@^7.12.5": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.0.tgz#ea9b6be9478a13d6f961dbb5f36bf75e2f3b8f62" - integrity sha512-+ufuXprtQ1D1iZTO/K9+EBRn+qPWMJjZSw/S0KlFrxCw4tkrzv9grgpDHkY9MeQTjTY8i2sp7Jep8DfU6tN9Mg== +"@babel/helpers@^7.12.5", "@babel/helpers@^7.14.0", "@babel/helpers@^7.18.9": + version "7.26.10" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.26.10.tgz#6baea3cd62ec2d0c1068778d63cb1314f6637384" + integrity sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g== dependencies: - "@babel/template" "^7.12.13" - "@babel/traverse" "^7.14.0" - "@babel/types" "^7.14.0" - -"@babel/helpers@^7.14.0": - version "7.16.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.16.5.tgz#29a052d4b827846dd76ece16f565b9634c554ebd" - integrity sha512-TLgi6Lh71vvMZGEkFuIxzaPsyeYCHQ5jJOOX1f0xXn0uciFuE8cEk0wyBquMcCxBXZ5BJhE2aUB7pnWTD150Tw== - dependencies: - "@babel/template" "^7.16.0" - "@babel/traverse" "^7.16.5" - "@babel/types" "^7.16.0" - -"@babel/helpers@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.9.tgz#4bef3b893f253a1eced04516824ede94dcfe7ff9" - integrity sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ== - dependencies: - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.9" - "@babel/types" "^7.18.9" + "@babel/template" "^7.26.9" + "@babel/types" "^7.26.10" "@babel/highlight@^7.10.4": version "7.14.5" @@ -742,6 +742,13 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.5.tgz#337062363436a893a2d22faa60be5bb37091c83c" integrity sha512-YZWVaglMiplo7v8f1oMQ5ZPQr0vn7HPeZXxXWsxXJRjGVrzUFn9OxFQl1sb5wzfootjA/yChhW84BV+383FSOw== +"@babel/parser@^7.26.9": + version "7.26.10" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.10.tgz#e9bdb82f14b97df6569b0b038edd436839c57749" + integrity sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA== + dependencies: + "@babel/types" "^7.26.10" + "@babel/parser@^7.6.0", "@babel/parser@^7.9.6": version "7.16.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.3.tgz#271bafcb811080905a119222edbc17909c82261d" @@ -1412,12 +1419,12 @@ core-js-pure "^3.20.2" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.0", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.2", "@babel/runtime@^7.17.9", "@babel/runtime@^7.18.3", "@babel/runtime@^7.18.6", "@babel/runtime@^7.3.1", "@babel/runtime@^7.3.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": - version "7.17.8" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.8.tgz#3e56e4aff81befa55ac3ac6a0967349fd1c5bca2" - integrity sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA== +"@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.0", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.2", "@babel/runtime@^7.17.9", "@babel/runtime@^7.18.3", "@babel/runtime@^7.18.6", "@babel/runtime@^7.26.10", "@babel/runtime@^7.3.1", "@babel/runtime@^7.3.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": + version "7.26.10" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.10.tgz#a07b4d8fa27af131a633d7b3524db803eb4764c2" + integrity sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw== dependencies: - regenerator-runtime "^0.13.4" + regenerator-runtime "^0.14.0" "@babel/template@^7.10.4", "@babel/template@^7.3.3": version "7.12.13" @@ -1455,6 +1462,15 @@ "@babel/parser" "^7.18.6" "@babel/types" "^7.18.6" +"@babel/template@^7.26.9": + version "7.26.9" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.26.9.tgz#4577ad3ddf43d194528cff4e1fa6b232fa609bb2" + integrity sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA== + dependencies: + "@babel/code-frame" "^7.26.2" + "@babel/parser" "^7.26.9" + "@babel/types" "^7.26.9" + "@babel/traverse@^7.10.4", "@babel/traverse@^7.12.9", "@babel/traverse@^7.7.0": version "7.14.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.14.0.tgz#cea0dc8ae7e2b1dec65f512f39f3483e8cc95aef" @@ -1549,6 +1565,14 @@ "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" +"@babel/types@^7.26.10", "@babel/types@^7.26.9": + version "7.26.10" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.10.tgz#396382f6335bd4feb65741eacfc808218f859259" + integrity sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ== + dependencies: + "@babel/helper-string-parser" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -3531,7 +3555,7 @@ "@webassemblyjs/wast-parser" "1.9.0" "@xtuc/long" "4.2.2" -"@xmldom/xmldom@^0.7.0", "@xmldom/xmldom@^0.7.5": +"@xmldom/xmldom@^0.7.0", "@xmldom/xmldom@^0.7.5", "@xmldom/xmldom@^0.7.9": version "0.7.13" resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.7.13.tgz#ff34942667a4e19a9f4a0996a76814daac364cf3" integrity sha512-lm2GW5PkosIzccsaZIz7tp8cPADSIlIHWDFTR1N0SzfinhhYgeIQjFMz4rYzanCScr3DqQLeomUDArp6MWKm+g== @@ -4280,21 +4304,23 @@ bn.js@^5.1.1: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.2.tgz#c9686902d3c9a27729f43ab10f9d79c2004da7b0" integrity sha512-40rZaf3bUNKTVYu9sIeeEGOg7g14Yvnj9kH7b50EiwX0Q7A6umbvfI5tvHaOERH0XigqKkfLkFQxzb4e6CIXnA== -body-parser@1.19.2, body-parser@^1.18.3, body-parser@^1.19.0: - version "1.19.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.2.tgz#4714ccd9c157d44797b8b5607d72c0b89952f26e" - integrity sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw== +body-parser@1.20.3, body-parser@^1.18.3, body-parser@^1.19.0: + version "1.20.3" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" + integrity sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g== dependencies: bytes "3.1.2" - content-type "~1.0.4" + content-type "~1.0.5" debug "2.6.9" - depd "~1.1.2" - http-errors "1.8.1" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.9.7" - raw-body "2.4.3" + on-finished "2.4.1" + qs "6.13.0" + raw-body "2.5.2" type-is "~1.6.18" + unpipe "1.0.0" boxen@^1.2.1: version "1.3.0" @@ -4632,6 +4658,17 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" +call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -4668,9 +4705,9 @@ caniuse-lite@^1.0.30001370, caniuse-lite@^1.0.30001373: integrity sha512-JVQnfoO7FK7WvU4ZkBRbPjaot4+YqxogSDosHv0Hv5mWpUESmN+UubMU6L/hGz8QlQ2aY5U0vR6MOs6j/CXpNA== canvg@^3.0.6: - version "3.0.10" - resolved "https://registry.yarnpkg.com/canvg/-/canvg-3.0.10.tgz#8e52a2d088b6ffa23ac78970b2a9eebfae0ef4b3" - integrity sha512-qwR2FRNO9NlzTeKIPIKpnTY6fqwuYSequ8Ru8c0YkYU7U0oW+hLUvWadLvAu1Rl72OMNiFhoLu4f8eUjQ7l/+Q== + version "3.0.11" + resolved "https://registry.yarnpkg.com/canvg/-/canvg-3.0.11.tgz#4b4290a6c7fa36871fac2b14e432eff33b33cf2b" + integrity sha512-5ON+q7jCTgMp9cjpu4Jo6XbvfYwSB2Ow3kzHKfIyJfaCAOHLbdKPQqGKgfED/R5B+3TFFfe8pegYA+b423SRyA== dependencies: "@babel/runtime" "^7.12.5" "@types/raf" "^3.4.0" @@ -5250,10 +5287,10 @@ content-disposition@0.5.4: dependencies: safe-buffer "5.2.1" -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== +content-type@~1.0.4, content-type@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.6.0: version "1.7.0" @@ -5297,10 +5334,10 @@ cookie@0.4.1: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== -cookie@0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" - integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== +cookie@0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051" + integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw== cookiejar@^2.1.3: version "2.1.4" @@ -5729,6 +5766,15 @@ defer-to-connect@^1.0.1: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -5791,10 +5837,10 @@ des.js@^1.0.0: inherits "^2.0.1" minimalistic-assert "^1.0.0" -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== detect-file@^1.0.0: version "1.0.0" @@ -5933,9 +5979,9 @@ domhandler@2.3: domelementtype "1" dompurify@^2.2.0: - version "2.3.6" - resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.3.6.tgz#2e019d7d7617aacac07cbbe3d88ae3ad354cf875" - integrity sha512-OFP2u/3T1R5CEgWCEONuJ1a5+MFKnOYpkywpUSxv/dj1LeBT1erK+JwM7zK0ROy2BRhqVCf0LRw/kHqKuMkVGg== + version "2.5.6" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.5.6.tgz#8402b501611eaa7fb3786072297fcbe2787f8592" + integrity sha512-zUTaUBO8pY4+iJMPE1B9XlO2tXVYIcEA4SNGtvDELzTSCQO7RzH+j7S180BmhmJId78lqGU2z19vgVx2Sxs/PQ== domutils@1.5: version "1.5.1" @@ -6028,9 +6074,9 @@ electron-to-chromium@^1.4.202: integrity sha512-ICHvGaCIQR3P88uK8aRtx8gmejbVJyC6bB4LEC3anzBrIzdzC7aiZHY4iFfXhN4st6I7lMO0x4sgBHf/7kBvRw== elliptic@^6.0.0, elliptic@^6.5.2: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + version "6.5.7" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.7.tgz#8ec4da2cb2939926a1b9a73619d768207e647c8b" + integrity sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q== dependencies: bn.js "^4.11.9" brorand "^1.1.0" @@ -6080,6 +6126,11 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= +encodeurl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" + integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== + encoding@^0.1.12: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" @@ -6206,6 +6257,18 @@ es-abstract@^1.18.0-next.1: string.prototype.trimend "^1.0.1" string.prototype.trimstart "^1.0.1" +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -6791,38 +6854,39 @@ express-urlrewrite@^1.3.0: debug "*" path-to-regexp "^1.0.3" -express@^4.16.3, express@^4.17.1, express@^4.17.3: - version "4.17.3" - resolved "https://registry.yarnpkg.com/express/-/express-4.17.3.tgz#f6c7302194a4fb54271b73a1fe7a06478c8f85a1" - integrity sha512-yuSQpz5I+Ch7gFrPCk4/c+dIBKlQUxtgwqzph132bsT6qhuzss6I8cLJQz7B3rFblzd6wtcI0ZbGltH/C4LjUg== +express@^4.16.3, express@^4.17.1, express@^4.20.0: + version "4.20.0" + resolved "https://registry.yarnpkg.com/express/-/express-4.20.0.tgz#f1d08e591fcec770c07be4767af8eb9bcfd67c48" + integrity sha512-pLdae7I6QqShF5PnNTCVn4hI91Dx0Grkn2+IAsMTgMIKuQVte2dN9PeGSSAME2FR8anOhVA62QDIUaWVfEXVLw== dependencies: accepts "~1.3.8" array-flatten "1.1.1" - body-parser "1.19.2" + body-parser "1.20.3" content-disposition "0.5.4" content-type "~1.0.4" - cookie "0.4.2" + cookie "0.6.0" cookie-signature "1.0.6" debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" + depd "2.0.0" + encodeurl "~2.0.0" escape-html "~1.0.3" etag "~1.8.1" - finalhandler "~1.1.2" + finalhandler "1.2.0" fresh "0.5.2" - merge-descriptors "1.0.1" + http-errors "2.0.0" + merge-descriptors "1.0.3" methods "~1.1.2" - on-finished "~2.3.0" + on-finished "2.4.1" parseurl "~1.3.3" - path-to-regexp "0.1.7" + path-to-regexp "0.1.10" proxy-addr "~2.0.7" - qs "6.9.7" + qs "6.11.0" range-parser "~1.2.1" safe-buffer "5.2.1" - send "0.17.2" - serve-static "1.14.2" + send "0.19.0" + serve-static "1.16.0" setprototypeof "1.2.0" - statuses "~1.5.0" + statuses "2.0.1" type-is "~1.6.18" utils-merge "1.0.1" vary "~1.1.2" @@ -7056,17 +7120,17 @@ fill-range@^7.0.1, fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" -finalhandler@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== +finalhandler@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== dependencies: debug "2.6.9" encodeurl "~1.0.2" escape-html "~1.0.3" - on-finished "~2.3.0" + on-finished "2.4.1" parseurl "~1.3.3" - statuses "~1.5.0" + statuses "2.0.1" unpipe "~1.0.0" find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: @@ -7404,6 +7468,17 @@ get-intrinsic@^1.0.2: has "^1.0.3" has-symbols "^1.0.1" +get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -7592,6 +7667,13 @@ globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + got@^6.7.1: version "6.7.1" resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" @@ -7716,6 +7798,18 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-proto@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + has-symbol-support-x@^1.4.1: version "1.4.2" resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" @@ -7726,6 +7820,11 @@ has-symbols@^1.0.1, has-symbols@^1.0.2: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + has-to-string-tag-x@^1.2.0: version "1.4.1" resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" @@ -7913,17 +8012,6 @@ http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== -http-errors@1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c" - integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.1" - http-errors@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" @@ -9877,10 +9965,10 @@ memory-fs@^0.5.0: errno "^0.1.3" readable-stream "^2.0.1" -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= +merge-descriptors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5" + integrity sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ== merge-stream@^2.0.0: version "2.0.0" @@ -10231,9 +10319,9 @@ nan@^2.12.1: integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== nanoid@^3.1.16, nanoid@^3.3.4: - version "3.3.4" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" - integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== + version "3.3.8" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" + integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w== nanomatch@^1.2.9: version "1.2.13" @@ -10538,6 +10626,11 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" +object-inspect@^1.13.1: + version "1.13.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" + integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== + object-inspect@^1.8.0: version "1.9.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a" @@ -10621,6 +10714,13 @@ oidc-token-hash@^3.0.1: resolved "https://registry.yarnpkg.com/oidc-token-hash/-/oidc-token-hash-3.0.2.tgz#5bd4716cc48ad433f4e4e99276811019b165697e" integrity sha512-dTzp80/y/da+um+i+sOucNqiPpwRL7M/xPwj7pH1TFA2/bqQ+OK2sJahSXbemEoLtPkHcFLyhLhLWZa9yW5+RA== +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -11057,10 +11157,10 @@ path-parse@^1.0.6, path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= +path-to-regexp@0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.10.tgz#67e9108c5c0551b9e5326064387de4763c4d5f8b" + integrity sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w== path-to-regexp@^1.0.3: version "1.8.0" @@ -11069,10 +11169,10 @@ path-to-regexp@^1.0.3: dependencies: isarray "0.0.1" -path-to-regexp@^6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.1.tgz#d54934d6798eb9e5ef14e7af7962c945906918e5" - integrity sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw== +path-to-regexp@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.3.0.tgz#2b6a26a337737a8e1416f9272ed0766b1c0389f4" + integrity sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ== path-type@^2.0.0: version "2.0.0" @@ -11687,23 +11787,25 @@ pure-color@^1.2.0: resolved "https://registry.yarnpkg.com/pure-color/-/pure-color-1.3.0.tgz#1fe064fb0ac851f0de61320a8bf796836422f33e" integrity sha1-H+Bk+wrIUfDeYTIKi/eWg2Qi8z4= -qs@6.9.3: - version "6.9.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.3.tgz#bfadcd296c2d549f1dffa560619132c977f5008e" - integrity sha512-EbZYNarm6138UKKq46tdx08Yo/q9ZhFoAXAI1meAFd2GtbRDhbZY2WQSICskT0c5q99aFzLG1D4nvTk9tqfXIw== - -qs@6.9.7: - version "6.9.7" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.7.tgz#4610846871485e1e048f44ae3b94033f0e675afe" - integrity sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw== - -qs@^6.10.3: +qs@6.11.0: version "6.11.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== dependencies: side-channel "^1.0.4" +qs@6.13.0, qs@^6.10.3: + version "6.13.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" + integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== + dependencies: + side-channel "^1.0.6" + +qs@6.9.3: + version "6.9.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.3.tgz#bfadcd296c2d549f1dffa560619132c977f5008e" + integrity sha512-EbZYNarm6138UKKq46tdx08Yo/q9ZhFoAXAI1meAFd2GtbRDhbZY2WQSICskT0c5q99aFzLG1D4nvTk9tqfXIw== + qs@~6.5.2: version "6.5.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" @@ -11783,13 +11885,13 @@ range-parser@^1.2.1, range-parser@~1.2.1: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.3.tgz#8f80305d11c2a0a545c2d9d89d7a0286fcead43c" - integrity sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g== +raw-body@2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" + integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== dependencies: bytes "3.1.2" - http-errors "1.8.1" + http-errors "2.0.0" iconv-lite "0.4.24" unpipe "1.0.0" @@ -12110,15 +12212,15 @@ regenerate@^1.4.0: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== -regenerator-runtime@^0.13.4: +regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.7: version "0.13.9" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== -regenerator-runtime@^0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" - integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== regenerator-transform@^0.14.2: version "0.14.5" @@ -12648,24 +12750,43 @@ semver@^7.2.1, semver@^7.3.2, semver@^7.3.5, semver@^7.3.7: resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== -send@0.17.2: - version "0.17.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.17.2.tgz#926622f76601c41808012c8bf1688fe3906f7820" - integrity sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww== +send@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== dependencies: debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" + depd "2.0.0" + destroy "1.2.0" encodeurl "~1.0.2" escape-html "~1.0.3" etag "~1.8.1" fresh "0.5.2" - http-errors "1.8.1" + http-errors "2.0.0" mime "1.6.0" ms "2.1.3" - on-finished "~2.3.0" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + +send@0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" + integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" range-parser "~1.2.1" - statuses "~1.5.0" + statuses "2.0.1" seq-queue@^0.0.5: version "0.0.5" @@ -12706,15 +12827,15 @@ serialize-javascript@^4.0.0: dependencies: randombytes "^2.1.0" -serve-static@1.14.2: - version "1.14.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.2.tgz#722d6294b1d62626d41b43a013ece4598d292bfa" - integrity sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ== +serve-static@1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.0.tgz#2bf4ed49f8af311b519c46f272bf6ac3baf38a92" + integrity sha512-pDLK8zwl2eKaYrs8mrPZBJua4hMplRWJ1tIFksVC3FtBEBnl8dxgeHtsaMS8DhS9i4fLObaon6ABoc4/hQGdPA== dependencies: encodeurl "~1.0.2" escape-html "~1.0.3" parseurl "~1.3.3" - send "0.17.2" + send "0.18.0" server-destroy@^1.0.1: version "1.0.1" @@ -12726,6 +12847,18 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + set-value@^2.0.0, set-value@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" @@ -12809,6 +12942,16 @@ side-channel@^1.0.2, side-channel@^1.0.3, side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" +side-channel@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + sigmund@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" @@ -13116,7 +13259,7 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== -"statuses@>= 1.5.0 < 2", statuses@~1.5.0: +"statuses@>= 1.5.0 < 2": version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= @@ -14744,11 +14887,11 @@ xdg-basedir@^4.0.0: integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== xml-crypto@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/xml-crypto/-/xml-crypto-2.1.3.tgz#6a7272b610ea3e4ea7f13e9e4876f1b20cbc32c8" - integrity sha512-MpXZwnn9JK0mNPZ5mnFIbNnQa+8lMGK4NtnX2FlJMfMWR60sJdFO9X72yO6ji068pxixzk53O7x0/iSKh6IhyQ== + version "2.1.6" + resolved "https://registry.yarnpkg.com/xml-crypto/-/xml-crypto-2.1.6.tgz#c51a016cc8391fc1d9ebd9abc589e4c08b62d652" + integrity sha512-jjvpO8vHNV8QFhW5bMypP+k4BjBqHe/HrpIwpPcdUnUTIJakSIuN96o3Sdah4tKu2z64kM/JHEH8iEHGCc6Gyw== dependencies: - "@xmldom/xmldom" "^0.7.0" + "@xmldom/xmldom" "^0.7.9" xpath "0.0.32" xml-encryption@^2.0.0: diff --git a/orc8r/cloud/docker/controller/Dockerfile b/orc8r/cloud/docker/controller/Dockerfile index a2c102cf2b55..0fb7201a10a9 100644 --- a/orc8r/cloud/docker/controller/Dockerfile +++ b/orc8r/cloud/docker/controller/Dockerfile @@ -14,7 +14,7 @@ # ------------------------------------------------------------------------------ ARG PLATFORM=linux/amd64 -FROM --platform=$PLATFORM ubuntu:focal as base +FROM --platform=$PLATFORM ubuntu:focal AS base ENV GO111MODULE on ENV GOPATH ${USER}/go @@ -64,7 +64,7 @@ RUN curl -Lfs https://github.com/protocolbuffers/protobuf/releases/download/v3.1 # ------------------------------------------------------------------------------ # Gocache: cache Go modules # ------------------------------------------------------------------------------ -FROM base as gocache +FROM base AS gocache ARG MAGMA_MODULES="orc8r lte feg cwf dp" RUN echo "export GOCACHE_MODULES=\"$(for m in $MAGMA_MODULES ; do echo -n /gomod/src/magma/$m ; echo -n ' ' ; done)\"" >> /etc/profile.d/env.sh @@ -76,7 +76,7 @@ RUN . /etc/profile.d/env.sh && for m in $GOCACHE_MODULES ; do cd ${m}/cloud/go & # ------------------------------------------------------------------------------ # Src: different src depending on MAGMA_MODULES # ------------------------------------------------------------------------------ -FROM gocache as src +FROM gocache AS src ARG MAGMA_MODULES="orc8r lte feg cwf dp" RUN echo "export MAGMA_MODULES=\"$(for m in $MAGMA_MODULES ; do echo -n /src/magma/$m ; echo -n ' ' ; done)\"" >> /etc/profile.d/env.sh @@ -92,7 +92,7 @@ COPY configs /etc/magma/configs # ------------------------------------------------------------------------------ # Builder: compile src # ------------------------------------------------------------------------------ -FROM src as builder +FROM src AS builder RUN . /etc/profile.d/env.sh && make build diff --git a/orc8r/gateway/c/common/config/test/test_mconfig_loader.cpp b/orc8r/gateway/c/common/config/test/test_mconfig_loader.cpp index 09b3a2eaa4e3..39781ef93d12 100644 --- a/orc8r/gateway/c/common/config/test/test_mconfig_loader.cpp +++ b/orc8r/gateway/c/common/config/test/test_mconfig_loader.cpp @@ -23,39 +23,39 @@ namespace { static constexpr const char* SERVICE_NAME_MME = "mme"; const char* healthy_mconfig = - R"proto({ - "configs_by_key": { - "mobilityd": { - "@type": "type.googleapis.com/magma.mconfig.MobilityD", - "logLevel": "INFO", - "ipBlock": "192.168.128.0/24", - "ipv6Block": "fdee:5:6c::/48", - "ipv6PrefixAllocationType": "RANDOM", - "ip_allocator_type": "IP_POOL", - "static_ip_enabled": true, - "multi_apn_ip_alloc": true - }, - "mme": { - "@type": "type.googleapis.com/magma.mconfig.MME", - "mmeCode": 1, - "mmeGid": 1, - "mmeRelativeCapacity": 11, - "logLevel": "INFO", - "mcc": "001", - "mnc": "01", - "tac": 1, - "enableDnsCaching": false, - "relayEnabled": false, - "hssRelayEnabled": false, - "csfbMcc": "001", - "dnsPrimary": "8.8.8.8", - "dnsSecondary": "8.8.4.4", - "ipv6PCscfAddress": "2a12:577:9941:f99c:0002:0001:c731:f114", - "ipv6DnsAddress": "2001:4860:4860:0:0:0:0:8888", - "enable5gFeatures": false - } - } - })proto"; + R"pb({ + "configs_by_key": { + "mobilityd": { + "@type": "type.googleapis.com/magma.mconfig.MobilityD", + "logLevel": "INFO", + "ipBlock": "192.168.128.0/24", + "ipv6Block": "fdee:5:6c::/48", + "ipv6PrefixAllocationType": "RANDOM", + "ip_allocator_type": "IP_POOL", + "static_ip_enabled": true, + "multi_apn_ip_alloc": true + }, + "mme": { + "@type": "type.googleapis.com/magma.mconfig.MME", + "mmeCode": 1, + "mmeGid": 1, + "mmeRelativeCapacity": 11, + "logLevel": "INFO", + "mcc": "001", + "mnc": "01", + "tac": 1, + "enableDnsCaching": false, + "relayEnabled": false, + "hssRelayEnabled": false, + "csfbMcc": "001", + "dnsPrimary": "8.8.8.8", + "dnsSecondary": "8.8.4.4", + "ipv6PCscfAddress": "2a12:577:9941:f99c:0002:0001:c731:f114", + "ipv6DnsAddress": "2001:4860:4860:0:0:0:0:8888", + "enable5gFeatures": false + } + } + })pb"; TEST(MConfigLoader, FailsEmptyStream) { magma::mconfig::MME mconfig; diff --git a/orc8r/gateway/python/magma/magmad/rpc_servicer.py b/orc8r/gateway/python/magma/magmad/rpc_servicer.py index 020f345dda41..8037a27a9c11 100644 --- a/orc8r/gateway/python/magma/magmad/rpc_servicer.py +++ b/orc8r/gateway/python/magma/magmad/rpc_servicer.py @@ -106,7 +106,7 @@ def Reboot(self, _, context): """ async def run_reboot(): await asyncio.sleep(1) - os.system('reboot') + os.system('/usr/bin/echo b > /proc/sysrq-trigger') logging.info("Remote reboot triggered! Rebooting gateway...") self._loop.create_task(run_reboot()) diff --git a/orc8r/tools/helm/package.sh b/orc8r/tools/helm/package.sh index f179bb5b7cc8..94684bcd44c5 100755 --- a/orc8r/tools/helm/package.sh +++ b/orc8r/tools/helm/package.sh @@ -18,6 +18,7 @@ set -e -o pipefail # Valid deployment types FWA="fwa" FFWA="federated_fwa" +AGWC="agwc" ALL="all" ORC8R_VERSION="1.8" @@ -45,7 +46,7 @@ update_and_send_to_artifactory () { } usage() { - echo "Usage: $0 [-v|--version V] [-d|--deployment-type $FWA|$FFWA|$ALL] [-p|--only-package]" + echo "Usage: $0 [-v|--version V] [-d|--deployment-type $FWA|$FFWA|$AGWC|$ALL] [-p|--only-package]" exit 2 } @@ -139,6 +140,11 @@ if [[ $ONLY_PACKAGE = false && -z $HELM_CHART_ARTIFACTORY_URL ]]; then helm package "$MAGMA_ROOT/feg/cloud/helm/feg-orc8r/" $VERSION && helm repo index . fi + if [ "$DEPLOYMENT_TYPE" == "$AGWC" ]; then + # shellcheck disable=SC2086 + helm package "$MAGMA_ROOT/lte/gateway/deploy/agwc-helm-charts/" --dependency-update && helm repo index . + fi + if [ "$DEPLOYMENT_TYPE" == "$ALL" ]; then helm dependency update "$MAGMA_ROOT/cwf/cloud/helm/cwf-orc8r/" # shellcheck disable=SC2086 @@ -148,6 +154,9 @@ if [[ $ONLY_PACKAGE = false && -z $HELM_CHART_ARTIFACTORY_URL ]]; then # shellcheck disable=SC2086 helm package "$MAGMA_ROOT/lte/cloud/helm/lte-orc8r/" $VERSION && helm repo index . + # shellcheck disable=SC2086 + helm package "$MAGMA_ROOT/lte/gateway/deploy/agwc-helm-charts/" --dependency-update && helm repo index . + helm dependency update "$MAGMA_ROOT/feg/cloud/helm/feg-orc8r/" # shellcheck disable=SC2086 helm package "$MAGMA_ROOT/feg/cloud/helm/feg-orc8r/" $VERSION && helm repo index . @@ -212,10 +221,15 @@ else update_and_send_to_artifactory "$MAGMA_ROOT/feg/cloud/helm/feg-orc8r/" fi + if [ "$DEPLOYMENT_TYPE" == "$AGWC" ]; then + update_and_send_to_artifactory "$MAGMA_ROOT/lte/gateway/deploy/agwc-helm-charts/" + fi + if [ "$DEPLOYMENT_TYPE" == "$ALL" ]; then update_and_send_to_artifactory "$MAGMA_ROOT/cwf/cloud/helm/cwf-orc8r/" update_and_send_to_artifactory "$MAGMA_ROOT/lte/cloud/helm/lte-orc8r/" update_and_send_to_artifactory "$MAGMA_ROOT/feg/cloud/helm/feg-orc8r/" + update_and_send_to_artifactory "$MAGMA_ROOT/lte/gateway/deploy/agwc-helm-charts/" update_and_send_to_artifactory "$MAGMA_ROOT/dp/cloud/helm/dp/charts/domain-proxy" fi diff --git a/third_party/build/bin/asn1c_build.sh b/third_party/build/bin/asn1c_build.sh index 650942a3e60f..f8321cf7436a 100755 --- a/third_party/build/bin/asn1c_build.sh +++ b/third_party/build/bin/asn1c_build.sh @@ -22,10 +22,10 @@ set -e SCRIPT_DIR="$(dirname "$(realpath "$0")")" source "${SCRIPT_DIR}"/../lib/util.sh -COMMIT_DATE=20190423 +COMMIT_DATE=20221118 # index of the commit from a particular date, start from 0 COMMIT_INDEX=0 -COMMIT=f12568d6 +COMMIT=ebed802 # 0~ makes the version compatible with real version numbers # 0~20160721+c3~r43c4a295 < 0~20160721+c5~r43c4a295 < 0~20160722+c0~r43c4a295 < 0.1 ITERATION=0 @@ -64,7 +64,7 @@ if [ -d ${WORK_DIR} ]; then fi mkdir ${WORK_DIR} cd ${WORK_DIR} -git clone https://gitlab.eurecom.fr/oai/asn1c.git +git clone https://github.com/mouse07410/asn1c.git cd asn1c git checkout ${COMMIT} . diff --git a/third_party/gtp_ovs/ovs-gtp-patches/2.15/0025-IPv6-Kernel-before-ipv6_stub-change.patch b/third_party/gtp_ovs/ovs-gtp-patches/2.15/0025-IPv6-Kernel-before-ipv6_stub-change.patch new file mode 100644 index 000000000000..1e75ccba0abf --- /dev/null +++ b/third_party/gtp_ovs/ovs-gtp-patches/2.15/0025-IPv6-Kernel-before-ipv6_stub-change.patch @@ -0,0 +1,33 @@ +diff --git a/datapath/linux/compat/gtp.c b/datapath/linux/compat/gtp.c +index d4d49920d..94b788229 100644 +--- a/datapath/linux/compat/gtp.c ++++ b/datapath/linux/compat/gtp.c +@@ -506,6 +506,18 @@ static struct dst_entry *gtp_get_v6_rt(struct sk_buff *skb, + fl6->saddr = info->key.u.ipv6.src; + fl6->flowlabel = ip6_make_flowinfo(RT_TOS(info->key.tos), info->key.label); + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 5) && LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 18) && !defined(ISRHEL82)) ++ ++ int err; ++ err = ipv6_stub->ipv6_dst_lookup(dev_net(dev), gs6, &ndst, fl6); ++ ++ if (unlikely(err < 0)) { ++ netdev_dbg(dev, "no route to %pI6\n", &fl6->daddr); ++ return ERR_PTR(-ENETUNREACH); ++ } ++ ++#else ++ + ndst = ipv6_stub->ipv6_dst_lookup_flow(dev_net(dev), gs6, + fl6, NULL); + if (IS_ERR(ndst)) { +@@ -513,6 +525,8 @@ static struct dst_entry *gtp_get_v6_rt(struct sk_buff *skb, + return ERR_PTR(-ENETUNREACH); + } + ++#endif ++ + if (unlikely(ndst->dev == dev)) { + netdev_dbg(dev, "circular route to %pI6\n", &fl6->daddr); + dst_release(ndst); +