lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

January 2023

  • 1 participants
  • 2205 discussions
Change in libosmo-gprs[master]: sndcp: Fix wrong prim op passed in osmo_gprs_sndcp_prim_alloc_sn_xid_...
by fixeria 12 Jan '23

12 Jan '23
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30951 ) Change subject: sndcp: Fix wrong prim op passed in osmo_gprs_sndcp_prim_alloc_sn_xid_rsp() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30951 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I0644bf481c06a2cfc1d9f57995eefedf36e8b839 Gerrit-Change-Number: 30951 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 12 Jan 2023 14:44:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in docker-playground[master]: */Dockerfile: clone from gerrit.osmocom.org using https://
by fixeria 12 Jan '23

12 Jan '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/30896 ) Change subject: */Dockerfile: clone from gerrit.osmocom.org using https:// ...................................................................... */Dockerfile: clone from gerrit.osmocom.org using https:// * Do not clone using deprecated git://, use https:// instead. * Clone from the main repo gerrit.osmocom.org (if possible). * Use the gitiles plugin to fetch the last commit from Gerrit. Change-Id: I204fa6e3e3ebbdb8732393b897fca35659d61ae8 --- M fpga-build/Dockerfile M gr-gsm-master/Dockerfile M nplab-m3ua-test/Dockerfile M nplab-sua-test/Dockerfile M osmo-bsc-master/Dockerfile M osmo-bts-master/Dockerfile M osmo-cbc-master/Dockerfile M osmo-dev-on-debian-sid/Dockerfile M osmo-gbproxy-master/Dockerfile M osmo-ggsn-master/Dockerfile M osmo-hlr-master/Dockerfile M osmo-hnbgw-master/Dockerfile M osmo-hnodeb-master/Dockerfile M osmo-mgw-master/Dockerfile M osmo-msc-master/Dockerfile M osmo-nitb-master/Dockerfile M osmo-ns-master/Dockerfile M osmo-pcap-master/Dockerfile M osmo-pcu-master/Dockerfile M osmo-remsim-master/Dockerfile M osmo-sgsn-master/Dockerfile M osmo-sip-master/Dockerfile M osmo-smlc-master/Dockerfile M osmo-stp-master/Dockerfile M osmo-uecups-master/Dockerfile M osmo-upf-master/Dockerfile M osmocom-bb-host-master/Dockerfile 27 files changed, 59 insertions(+), 56 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/fpga-build/Dockerfile b/fpga-build/Dockerfile index 6e975a7..1421d29 100644 --- a/fpga-build/Dockerfile +++ b/fpga-build/Dockerfile @@ -39,13 +39,13 @@ ENV PATH=/opt/fpga-toolchain/bin:/opt/xpack-riscv-none-embed-gcc-${RISCV_TOOLCHAIN_VER}/bin:${PATH} # Install osmo-ci.git/scripts to /usr/local/bin -ADD http://git.osmocom.org/osmo-ci/patch /tmp/osmo-ci-commit -RUN git clone https://git.osmocom.org/osmo-ci osmo-ci && \ +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-ci/+/master?format=TEXT /tmp/osmo-ci-commit +RUN git clone https://gerrit.osmocom.org/osmo-ci.git && \ cp -v $(find osmo-ci/scripts \ -maxdepth 1 \ -type f ) \ /usr/local/bin # Install osmo-gsm-manuals to /opt/osmo-gsm-manuals -ADD http://git.osmocom.org/osmo-gsm-manuals/patch /tmp/osmo-gsm-manuals-commit -RUN git -C /opt clone https://git.osmocom.org/osmo-gsm-manuals +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-gsm-manuals/+/master?format… /tmp/osmo-gsm-manuals-commit +RUN git -C /opt clone https://gerrit.osmocom.org/osmo-gsm-manuals diff --git a/gr-gsm-master/Dockerfile b/gr-gsm-master/Dockerfile index f0e4e97..3301bfd 100644 --- a/gr-gsm-master/Dockerfile +++ b/gr-gsm-master/Dockerfile @@ -13,8 +13,8 @@ ARG GR_GSM_BRANCH="master" -RUN git clone git://git.osmocom.org/gr-gsm -ADD http://git.osmocom.org/gr-gsm/patch?h=$GR_GSM_BRANCH /tmp/commit-gr-gsm +RUN git clone https://gerrit.osmocom.org/gr-gsm +ADD https://gerrit.osmocom.org/plugins/gitiles/gr-gsm/+/$GR_GSM_BRANCH?format=T… /tmp/commit-gr-gsm RUN cd gr-gsm \ && git fetch && git checkout -f -B $GR_GSM_BRANCH origin/$GR_GSM_BRANCH \ diff --git a/nplab-m3ua-test/Dockerfile b/nplab-m3ua-test/Dockerfile index 1a53329..2f6ad93 100644 --- a/nplab-m3ua-test/Dockerfile +++ b/nplab-m3ua-test/Dockerfile @@ -2,7 +2,7 @@ FROM $USER/sigtran-tests -RUN cd /tmp && git clone git://git.osmocom.org/nplab/m3ua-testtool +RUN cd /tmp && git clone https://git.osmocom.org/nplab/m3ua-testtool ADD http://git.osmocom.org/nplab/m3ua-testtool/patch/?h=laforge/python3 /tmp/commit RUN cd /tmp/m3ua-testtool && \ git fetch && \ diff --git a/nplab-sua-test/Dockerfile b/nplab-sua-test/Dockerfile index 931623b..6bb3ad2 100644 --- a/nplab-sua-test/Dockerfile +++ b/nplab-sua-test/Dockerfile @@ -2,7 +2,7 @@ FROM $USER/sigtran-tests -RUN cd /tmp && git clone git://git.osmocom.org/nplab/sua-testtool +RUN cd /tmp && git clone https://git.osmocom.org/nplab/sua-testtool ADD http://git.osmocom.org/nplab/sua-testtool/patch/?h=laforge/python3 /tmp/commit RUN cd /tmp/sua-testtool && \ git fetch && \ diff --git a/osmo-bsc-master/Dockerfile b/osmo-bsc-master/Dockerfile index 32ded30..65ec5d4 100644 --- a/osmo-bsc-master/Dockerfile +++ b/osmo-bsc-master/Dockerfile @@ -36,8 +36,8 @@ ARG OSMO_BSC_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-bsc.git -ADD http://git.osmocom.org/osmo-bsc/patch?h=$OSMO_BSC_BRANCH /tmp/commit-osmo-bsc +RUN git clone https://gerrit.osmocom.org/osmo-bsc.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-bsc/+/$OSMO_BSC_BRANCH?form… /tmp/commit-osmo-bsc RUN cd osmo-bsc && \ git fetch && git checkout $OSMO_BSC_BRANCH && \ diff --git a/osmo-bts-master/Dockerfile b/osmo-bts-master/Dockerfile index 67dd75f..8c43973 100644 --- a/osmo-bts-master/Dockerfile +++ b/osmo-bts-master/Dockerfile @@ -35,8 +35,8 @@ ARG OSMO_BTS_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-bts.git -ADD http://git.osmocom.org/osmo-bts/patch?h=$OSMO_BTS_BRANCH /tmp/commit-osmo-bts +RUN git clone https://gerrit.osmocom.org/osmo-bts.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-bts/+/$OSMO_BTS_BRANCH?form… /tmp/commit-osmo-bts RUN cd osmo-bts && \ git fetch && git checkout $OSMO_BTS_BRANCH && \ diff --git a/osmo-cbc-master/Dockerfile b/osmo-cbc-master/Dockerfile index a4ec904..0e90fc8 100644 --- a/osmo-cbc-master/Dockerfile +++ b/osmo-cbc-master/Dockerfile @@ -29,8 +29,8 @@ ARG OSMO_CBC_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-cbc.git -ADD http://git.osmocom.org/osmo-cbc/patch?h=$OSMO_CBC_BRANCH /tmp/commit-osmo-cbc +RUN git clone https://gerrit.osmocom.org/osmo-cbc.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-cbc/+/$OSMO_CBC_BRANCH?form… /tmp/commit-osmo-cbc RUN cd osmo-cbc && \ git fetch && git checkout $OSMO_CBC_BRANCH && \ diff --git a/osmo-dev-on-debian-sid/Dockerfile b/osmo-dev-on-debian-sid/Dockerfile index 81ba3cd..3b2791d 100644 --- a/osmo-dev-on-debian-sid/Dockerfile +++ b/osmo-dev-on-debian-sid/Dockerfile @@ -3,12 +3,13 @@ WORKDIR /build -ADD http://git.osmocom.org/osmo-dev/patch /build/commit-osmo-dev -RUN git clone git://git.osmocom.org/osmo-dev.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-dev/+/master?format=TEXT /build/commit-osmo-dev +RUN git clone https://gerrit.osmocom.org/osmo-dev.git RUN cd osmo-dev && \ ./gen_makefile.py 3G+2G.deps default.opts iu.opts -m make --ldconfig-without-sudo +# Not using gitiles plugin here because gen_makefile.py clones from git.osmocom.org ADD http://git.osmocom.org/libosmocore/patch /build/commit-libosmocore ADD http://git.osmocom.org/libosmo-abis/patch /build/commit-libosmo-abis ADD http://git.osmocom.org/libosmo-netif/patch /build/commit-libosmo-netif diff --git a/osmo-gbproxy-master/Dockerfile b/osmo-gbproxy-master/Dockerfile index 3e0e40c..484bb88 100644 --- a/osmo-gbproxy-master/Dockerfile +++ b/osmo-gbproxy-master/Dockerfile @@ -30,8 +30,8 @@ ARG OSMO_GBPROXY_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-gbproxy.git -ADD http://git.osmocom.org/osmo-gbproxy/patch?h=$OSMO_GBPROXY_BRANCH /tmp/commit +RUN git clone https://gerrit.osmocom.org/osmo-gbproxy.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-gbproxy/+/$OSMO_GBPROXY_BRA… /tmp/commit-osmo-gbproxy RUN cd osmo-gbproxy && \ git fetch && git checkout $OSMO_GBPROXY_BRANCH && \ diff --git a/osmo-ggsn-master/Dockerfile b/osmo-ggsn-master/Dockerfile index 1a4504b..7f505d0 100644 --- a/osmo-ggsn-master/Dockerfile +++ b/osmo-ggsn-master/Dockerfile @@ -37,8 +37,9 @@ ARG OSMO_GGSN_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-ggsn.git -ADD http://git.osmocom.org/osmo-ggsn/patch/?h=$OSMO_GGSN_BRANCH /tmp/commit +RUN git clone https://gerrit.osmocom.org/osmo-ggsn.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-ggsn/+/$OSMO_GGSN_BRANCH?fo… /tmp/commit-osmo-ggsn + RUN cd osmo-ggsn && \ git fetch && git checkout $OSMO_GGSN_BRANCH && \ (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_GGSN_BRANCH || exit 1); \ diff --git a/osmo-hlr-master/Dockerfile b/osmo-hlr-master/Dockerfile index 1c3251a..192c939 100644 --- a/osmo-hlr-master/Dockerfile +++ b/osmo-hlr-master/Dockerfile @@ -31,8 +31,8 @@ ARG OSMO_HLR_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-hlr.git -ADD http://git.osmocom.org/osmo-hlr/patch?h=$OSMO_HLR_BRANCH /tmp/commit-osmo-hlr +RUN git clone https://gerrit.osmocom.org/osmo-hlr.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-hlr/+/$OSMO_HLR_BRANCH?form… /tmp/commit-osmo-hlr RUN cd osmo-hlr && \ git fetch && git checkout $OSMO_HLR_BRANCH && \ diff --git a/osmo-hnbgw-master/Dockerfile b/osmo-hnbgw-master/Dockerfile index d842fb3..f69a6b4 100644 --- a/osmo-hnbgw-master/Dockerfile +++ b/osmo-hnbgw-master/Dockerfile @@ -23,8 +23,8 @@ ARG OSMO_HNBGW_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-hnbgw.git -ADD http://git.osmocom.org/osmo-hnbgw/patch?h=$OSMO_HNBGW_BRANCH /tmp/commit-osmo-hnbgw +RUN git clone https://gerrit.osmocom.org/osmo-hnbgw.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-hnbgw/+/$OSMO_HNBGW_BRANCH?… /tmp/commit-osmo-hnbgw RUN cd osmo-hnbgw && \ git fetch && git checkout $OSMO_HNBGW_BRANCH && \ diff --git a/osmo-hnodeb-master/Dockerfile b/osmo-hnodeb-master/Dockerfile index 1a3ded9..ffdb639 100644 --- a/osmo-hnodeb-master/Dockerfile +++ b/osmo-hnodeb-master/Dockerfile @@ -17,8 +17,8 @@ ARG OSMO_IUH_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-iuh.git -ADD http://git.osmocom.org/osmo-iuh/patch?h=$OSMO_IUH_BRANCH /tmp/commit-osmo-iuh +RUN git clone https://gerrit.osmocom.org/osmo-iuh.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-iuh/+/$OSMO_IUH_BRANCH?form… /tmp/commit-osmo-iuh RUN cd osmo-iuh && \ git fetch && git checkout $OSMO_IUH_BRANCH && \ @@ -31,8 +31,8 @@ ARG OSMO_HNODEB_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-hnodeb.git -ADD http://git.osmocom.org/osmo-hnodeb/patch?h=$OSMO_HNODEB_BRANCH /tmp/commit-osmo-hnodeb +RUN git clone https://gerrit.osmocom.org/osmo-hnodeb.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-hnodeb/+/$OSMO_HNODEB_BRANC… /tmp/commit-osmo-hnodeb RUN cd osmo-hnodeb && \ git fetch && git checkout $OSMO_HNODEB_BRANCH && \ diff --git a/osmo-mgw-master/Dockerfile b/osmo-mgw-master/Dockerfile index dea4951..20b5b1a 100644 --- a/osmo-mgw-master/Dockerfile +++ b/osmo-mgw-master/Dockerfile @@ -31,8 +31,8 @@ ARG OSMO_MGW_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-mgw.git -ADD http://git.osmocom.org/osmo-mgw/patch?h=$OSMO_MGW_BRANCH /tmp/commit-osmo-mgw +RUN git clone https://gerrit.osmocom.org/osmo-mgw.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-mgw/+/$OSMO_MGW_BRANCH?form… /tmp/commit-osmo-mgw RUN cd osmo-mgw && \ diff --git a/osmo-msc-master/Dockerfile b/osmo-msc-master/Dockerfile index 7d79988..7a0362d 100644 --- a/osmo-msc-master/Dockerfile +++ b/osmo-msc-master/Dockerfile @@ -44,8 +44,8 @@ ARG OSMO_MSC_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-msc.git -ADD http://git.osmocom.org/osmo-msc/patch?h=$OSMO_MSC_BRANCH /tmp/commit-osmo-msc +RUN git clone https://gerrit.osmocom.org/osmo-msc.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-msc/+/$OSMO_MSC_BRANCH?form… /tmp/commit-osmo-msc RUN cd osmo-msc && \ git fetch && git checkout $OSMO_MSC_BRANCH && \ diff --git a/osmo-nitb-master/Dockerfile b/osmo-nitb-master/Dockerfile index 43a8d22..aa82a5f 100644 --- a/osmo-nitb-master/Dockerfile +++ b/osmo-nitb-master/Dockerfile @@ -18,8 +18,8 @@ ARG OSMO_NITB_BRANCH="master" -RUN git clone git://git.osmocom.org/openbsc.git -ADD http://git.osmocom.org/openbsc/patch?h=$OSMO_NITB_BRANCH /tmp/commit-openbsc +RUN git clone https://gerrit.osmocom.org/openbsc.git +ADD https://gerrit.osmocom.org/plugins/gitiles/openbsc/+/$OSMO_NITB_BRANCH?form… /tmp/commit-openbsc RUN cd openbsc/openbsc && \ git fetch && git checkout $OSMO_NITB_BRANCH && \ diff --git a/osmo-ns-master/Dockerfile b/osmo-ns-master/Dockerfile index 2f88c83..b5164a6 100644 --- a/osmo-ns-master/Dockerfile +++ b/osmo-ns-master/Dockerfile @@ -22,8 +22,8 @@ ARG LIBOSMOCORE_BRANCH="master" -RUN git clone git://git.osmocom.org/libosmocore.git -ADD http://git.osmocom.org/libosmocore/patch?h=$LIBOSMOCORE_BRANCH /tmp/commit-libosmocore +RUN git clone https://gerrit.osmocom.org/libosmocore.git +ADD https://gerrit.osmocom.org/plugins/gitiles/libosmocore/+/$LIBOSMOCORE_BRANC… /tmp/commit-libosmocore RUN cd libosmocore && \ git fetch && git checkout $LIBOSMOCORE_BRANCH && \ diff --git a/osmo-pcap-master/Dockerfile b/osmo-pcap-master/Dockerfile index eeb210c..e595bc1 100644 --- a/osmo-pcap-master/Dockerfile +++ b/osmo-pcap-master/Dockerfile @@ -28,8 +28,8 @@ ARG OSMO_PCAP_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-pcap.git -ADD http://git.osmocom.org/osmo-pcap/patch?h=$OSMO_PCAP_BRANCH /tmp/commit-osmo-pcap +RUN git clone https://gerrit.osmocom.org/osmo-pcap.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-pcap/+/$OSMO_PCAP_BRANCH?fo… /tmp/commit-osmo-pcap RUN cd osmo-pcap && \ git fetch && git checkout $OSMO_PCAP_BRANCH && \ diff --git a/osmo-pcu-master/Dockerfile b/osmo-pcu-master/Dockerfile index 41cd6d5..ac0fc1e 100644 --- a/osmo-pcu-master/Dockerfile +++ b/osmo-pcu-master/Dockerfile @@ -25,8 +25,8 @@ ARG OSMO_PCU_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-pcu.git -ADD http://git.osmocom.org/osmo-pcu/patch?h=$OSMO_PCU_BRANCH /tmp/commit-osmo-pcu +RUN git clone https://gerrit.osmocom.org/osmo-pcu.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-pcu/+/$OSMO_PCU_BRANCH?form… /tmp/commit-osmo-pcu RUN cd osmo-pcu && \ git fetch && git checkout $OSMO_PCU_BRANCH && \ diff --git a/osmo-remsim-master/Dockerfile b/osmo-remsim-master/Dockerfile index 173f243..c21bcbb 100644 --- a/osmo-remsim-master/Dockerfile +++ b/osmo-remsim-master/Dockerfile @@ -65,8 +65,8 @@ ARG OSMO_REMSIM_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-remsim.git -ADD http://git.osmocom.org/osmo-remsim/patch?h=$OSMO_REMSIM_BRANCH /tmp/commit-osmo-remsim +RUN git clone https://gerrit.osmocom.org/osmo-remsim.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-remsim/+/$OSMO_REMSIM_BRANC… /tmp/commit-osmo-remsim RUN cd osmo-remsim && \ git fetch && git checkout $OSMO_REMSIM_BRANCH && \ diff --git a/osmo-sgsn-master/Dockerfile b/osmo-sgsn-master/Dockerfile index 55d9695..edd912f 100644 --- a/osmo-sgsn-master/Dockerfile +++ b/osmo-sgsn-master/Dockerfile @@ -42,8 +42,8 @@ ARG OSMO_SGSN_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-sgsn.git -ADD http://git.osmocom.org/osmo-sgsn/patch?h=$OSMO_SGSN_BRANCH /tmp/commit +RUN git clone https://gerrit.osmocom.org/osmo-sgsn.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-sgsn/+/$OSMO_SGSN_BRANCH?fo… /tmp/commit-osmo-sgsn RUN cd osmo-sgsn && \ git fetch && git checkout $OSMO_SGSN_BRANCH && \ diff --git a/osmo-sip-master/Dockerfile b/osmo-sip-master/Dockerfile index 3261a55..71fcf53 100644 --- a/osmo-sip-master/Dockerfile +++ b/osmo-sip-master/Dockerfile @@ -25,8 +25,8 @@ ARG OSMO_SIP_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-sip-connector.git -ADD http://git.osmocom.org/osmo-sip-connector/patch?h=$OSMO_SIP_BRANCH /tmp/commit-osmo-sip-connector +RUN git clone https://gerrit.osmocom.org/osmo-sip-connector.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-sip-connector/+/$OSMO_SIP_B… /tmp/commit-osmo-sip-connector RUN cd osmo-sip-connector && \ git fetch && git checkout $OSMO_SIP_BRANCH && \ diff --git a/osmo-smlc-master/Dockerfile b/osmo-smlc-master/Dockerfile index b814f7a..c602268 100644 --- a/osmo-smlc-master/Dockerfile +++ b/osmo-smlc-master/Dockerfile @@ -30,8 +30,8 @@ ARG OSMO_SMLC_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-smlc.git -ADD http://git.osmocom.org/osmo-smlc/patch?h=$OSMO_SMLC_BRANCH /tmp/commit-osmo-smlc +RUN git clone https://gerrit.osmocom.org/osmo-smlc.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-smlc/+/$OSMO_SMLC_BRANCH?fo… /tmp/commit-osmo-smlc RUN cd osmo-smlc && \ git fetch && git checkout $OSMO_SMLC_BRANCH && \ diff --git a/osmo-stp-master/Dockerfile b/osmo-stp-master/Dockerfile index 7061e89..2e6ecd6 100644 --- a/osmo-stp-master/Dockerfile +++ b/osmo-stp-master/Dockerfile @@ -25,8 +25,9 @@ ARG OSMO_STP_BRANCH="master" -RUN git clone git://git.osmocom.org/libosmo-sccp.git -ADD http://git.osmocom.org/libosmo-sccp/patch?h=$OSMO_STP_BRANCH /tmp/commit +RUN git clone https://gerrit.osmocom.org/libosmo-sccp.git +ADD https://gerrit.osmocom.org/plugins/gitiles/libosmo-sccp/+/$OSMO_STP_BRANCH?… /tmp/commit-libosmo-sccp + RUN cd libosmo-sccp && \ git fetch && git checkout $OSMO_STP_BRANCH && \ (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_STP_BRANCH || exit 1); \ diff --git a/osmo-uecups-master/Dockerfile b/osmo-uecups-master/Dockerfile index 74469e5..7841b32 100644 --- a/osmo-uecups-master/Dockerfile +++ b/osmo-uecups-master/Dockerfile @@ -19,8 +19,8 @@ ARG OSMO_UECUPS_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-uecups.git -ADD http://git.osmocom.org/osmo-uecups/patch?h=$OSMO_UECUPS_BRANCH /tmp/commit-osmo-uecups +RUN git clone https://gerrit.osmocom.org/osmo-uecups.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-uecups/+/$OSMO_UECUPS_BRANC… /tmp/commit-osmo-uecups RUN cd osmo-uecups && \ git fetch && git checkout $OSMO_UECUPS_BRANCH && \ diff --git a/osmo-upf-master/Dockerfile b/osmo-upf-master/Dockerfile index 7c5c1e6..97cdd95 100644 --- a/osmo-upf-master/Dockerfile +++ b/osmo-upf-master/Dockerfile @@ -29,8 +29,8 @@ ARG OSMO_UPF_BRANCH="master" -RUN git clone git://git.osmocom.org/osmo-upf.git -ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-upf/+/refs/heads/$OSMO_UPF_… /tmp/commit-osmo-upf +RUN git clone https://gerrit.osmocom.org/osmo-upf.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-upf/+/$OSMO_UPF_BRANCH?form… /tmp/commit-osmo-upf RUN cd osmo-upf && \ git fetch && git checkout $OSMO_UPF_BRANCH && \ diff --git a/osmocom-bb-host-master/Dockerfile b/osmocom-bb-host-master/Dockerfile index 21c7f31..efc9925 100644 --- a/osmocom-bb-host-master/Dockerfile +++ b/osmocom-bb-host-master/Dockerfile @@ -12,9 +12,9 @@ WORKDIR /tmp -RUN git clone git://git.osmocom.org/osmocom-bb.git +RUN git clone https://gerrit.osmocom.org/osmocom-bb.git +ADD https://gerrit.osmocom.org/plugins/gitiles/osmocom-bb/+/$OSMO_BB_BRANCH?for… /tmp/commit-osmocom-bb -ADD http://git.osmocom.org/osmocom-bb/patch?h=$OSMO_BB_BRANCH /tmp/commit RUN cd osmocom-bb && \ git fetch && git checkout $OSMO_BB_BRANCH && \ (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_BB_BRANCH || exit 1); \ -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/30896 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I204fa6e3e3ebbdb8732393b897fca35659d61ae8 Gerrit-Change-Number: 30896 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmocore[master]: gsm0408_test: add unittest for gsm_gsmtime2fn()
by fixeria 12 Jan '23

12 Jan '23
Attention is currently required from: laforge, dexter. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30945 ) Change subject: gsm0408_test: add unittest for gsm_gsmtime2fn() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I8b9b71c8dcccf3b44326b5e61229f4637689d763 Gerrit-Change-Number: 30945 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Thu, 12 Jan 2023 14:42:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: gsm_utils: improve gsm_gsmtime2fn()
by fixeria 12 Jan '23

12 Jan '23
Attention is currently required from: laforge, dexter. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30946 ) Change subject: gsm_utils: improve gsm_gsmtime2fn() ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ibf94bca8223f1f7858a6dd67bf27de0ab6feab20 Gerrit-Change-Number: 30946 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Thu, 12 Jan 2023 14:42:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-sgsn[master]: Move global mmctx list into struct sgsn_instance
by pespin 12 Jan '23

12 Jan '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30905 ) Change subject: Move global mmctx list into struct sgsn_instance ...................................................................... Move global mmctx list into struct sgsn_instance Change-Id: Idf8458902321da03b9b0831dad3ad383a9c7afa1 --- M include/osmocom/sgsn/mmctx.h M include/osmocom/sgsn/sgsn.h M src/sgsn/mmctx.c M src/sgsn/sgsn.c M src/sgsn/sgsn_ctrl.c M src/sgsn/sgsn_vty.c M tests/sgsn/sgsn_test.c 7 files changed, 16 insertions(+), 15 deletions(-) Approvals: Jenkins Builder: Verified lynxis lazus: Looks good to me, approved laforge: Looks good to me, but someone else must approve diff --git a/include/osmocom/sgsn/mmctx.h b/include/osmocom/sgsn/mmctx.h index dd78124..c19f599 100644 --- a/include/osmocom/sgsn/mmctx.h +++ b/include/osmocom/sgsn/mmctx.h @@ -281,8 +281,6 @@ struct sgsn_pdp_ctx *sgsn_pdp_ctx_by_tid(const struct sgsn_mm_ctx *mm, uint8_t tid); -extern struct llist_head sgsn_mm_ctxts; - uint32_t sgsn_alloc_ptmsi(void); /* Called on subscriber data updates */ diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h index 0963863..441a614 100644 --- a/include/osmocom/sgsn/sgsn.h +++ b/include/osmocom/sgsn/sgsn.h @@ -156,6 +156,7 @@ struct llist_head apn_list; /* list of struct sgsn_apn_ctx */ struct llist_head ggsn_list; /* list of struct sgsn_ggsn_ctx */ struct llist_head mme_list; /* list of struct sgsn_mme_ctx */ + struct llist_head mm_list; /* list of struct sgsn_mm_ctx */ struct llist_head pdp_list; /* list of struct sgsn_pdp_ctx */ struct ctrl_handle *ctrlh; diff --git a/src/sgsn/mmctx.c b/src/sgsn/mmctx.c index c40db21..0e93092 100644 --- a/src/sgsn/mmctx.c +++ b/src/sgsn/mmctx.c @@ -60,8 +60,6 @@ #include "../../config.h" -LLIST_HEAD(sgsn_mm_ctxts); - const struct value_string sgsn_ran_type_names[] = { { MM_CTX_T_GERAN_Gb, "GPRS/EDGE via Gb" }, { MM_CTX_T_UTRAN_Iu, "UMTS via Iu" }, @@ -98,7 +96,7 @@ { struct sgsn_mm_ctx *ctx; - llist_for_each_entry(ctx, &sgsn_mm_ctxts, list) { + llist_for_each_entry(ctx, &sgsn->mm_list, list) { if (ctx->ran_type == MM_CTX_T_UTRAN_Iu && uectx == ctx->iu.ue_ctx) return ctx; @@ -113,7 +111,7 @@ { struct sgsn_mm_ctx *ctx; - llist_for_each_entry(ctx, &sgsn_mm_ctxts, list) { + llist_for_each_entry(ctx, &sgsn->mm_list, list) { if ((tlli == ctx->gb.tlli || tlli == ctx->gb.tlli_new) && gprs_ra_id_equals(raid, &ctx->ra)) return ctx; @@ -137,7 +135,7 @@ if (tlli_type != TLLI_FOREIGN && tlli_type != TLLI_LOCAL) return NULL; - llist_for_each_entry(ctx, &sgsn_mm_ctxts, list) { + llist_for_each_entry(ctx, &sgsn->mm_list, list) { if ((gprs_tmsi2tlli(ctx->p_tmsi, tlli_type) == tlli || gprs_tmsi2tlli(ctx->p_tmsi_old, tlli_type) == tlli) && gprs_ra_id_equals(raid, &ctx->ra)) @@ -151,7 +149,7 @@ { struct sgsn_mm_ctx *ctx; - llist_for_each_entry(ctx, &sgsn_mm_ctxts, list) { + llist_for_each_entry(ctx, &sgsn->mm_list, list) { if (p_tmsi == ctx->p_tmsi || (ctx->p_tmsi_old && ctx->p_tmsi_old == p_tmsi)) return ctx; @@ -163,7 +161,7 @@ { struct sgsn_mm_ctx *ctx; - llist_for_each_entry(ctx, &sgsn_mm_ctxts, list) { + llist_for_each_entry(ctx, &sgsn->mm_list, list) { if (!strcmp(imsi, ctx->imsi)) return ctx; } @@ -205,7 +203,7 @@ INIT_LLIST_HEAD(&ctx->pdp_list); - llist_add(&ctx->list, &sgsn_mm_ctxts); + llist_add(&ctx->list, &sgsn->mm_list); return ctx; @@ -411,7 +409,7 @@ goto restart; } - llist_for_each_entry(mm, &sgsn_mm_ctxts, list) { + llist_for_each_entry(mm, &sgsn->mm_list, list) { if (mm->p_tmsi == ptmsi) { if (!max_retries--) goto failed; diff --git a/src/sgsn/sgsn.c b/src/sgsn/sgsn.c index f394db8..6619bf2 100644 --- a/src/sgsn/sgsn.c +++ b/src/sgsn/sgsn.c @@ -99,7 +99,7 @@ { struct sgsn_mm_ctx *mmctx = NULL; - llist_for_each_entry(mmctx, &sgsn_mm_ctxts, list) { + llist_for_each_entry(mmctx, &sgsn->mm_list, list) { if (llme == mmctx->gb.llme) { gsm0408_gprs_access_cancelled(mmctx, SGSN_ERROR_CAUSE_NONE); return; @@ -176,6 +176,7 @@ INIT_LLIST_HEAD(&inst->apn_list); INIT_LLIST_HEAD(&inst->ggsn_list); INIT_LLIST_HEAD(&inst->mme_list); + INIT_LLIST_HEAD(&inst->mm_list); INIT_LLIST_HEAD(&inst->pdp_list); osmo_timer_setup(&inst->llme_timer, sgsn_llme_check_cb, NULL); diff --git a/src/sgsn/sgsn_ctrl.c b/src/sgsn/sgsn_ctrl.c index 15c15ce..069304a 100644 --- a/src/sgsn/sgsn_ctrl.c +++ b/src/sgsn/sgsn_ctrl.c @@ -33,7 +33,7 @@ struct sgsn_mm_ctx *mm; cmd->reply = talloc_strdup(cmd, ""); - llist_for_each_entry(mm, &sgsn_mm_ctxts, list) { + llist_for_each_entry(mm, &sgsn->mm_list, list) { char *addr = NULL; struct sgsn_pdp_ctx *pdp; diff --git a/src/sgsn/sgsn_vty.c b/src/sgsn/sgsn_vty.c index 4a1d085..79764f1 100644 --- a/src/sgsn/sgsn_vty.c +++ b/src/sgsn/sgsn_vty.c @@ -711,7 +711,7 @@ SHOW_STR MMCTX_STR "All MM Contexts\n" INCLUDE_PDP_STR) { struct sgsn_mm_ctx *mm; - llist_for_each_entry(mm, &sgsn_mm_ctxts, list) + llist_for_each_entry(mm, &sgsn->mm_list, list) vty_dump_mmctx(vty, "", mm, (argc > 0) ? 1 : 0); return CMD_SUCCESS; @@ -1006,7 +1006,7 @@ struct gprs_subscr *subscr, *tmp_subscr; struct sgsn_mm_ctx *mm, *tmp_mm; - llist_for_each_entry_safe(mm, tmp_mm, &sgsn_mm_ctxts, list) + llist_for_each_entry_safe(mm, tmp_mm, &sgsn->mm_list, list) { gsm0408_gprs_access_cancelled(mm, SGSN_ERROR_CAUSE_NONE); } diff --git a/tests/sgsn/sgsn_test.c b/tests/sgsn/sgsn_test.c index bf4d82b..f821165 100644 --- a/tests/sgsn/sgsn_test.c +++ b/tests/sgsn/sgsn_test.c @@ -379,6 +379,7 @@ uint32_t local_tlli = 0xffeeddcc; printf("Testing authentication triplet handling\n"); + sgsn = sgsn_instance_alloc(tall_sgsn_ctx); /* Check for emptiness */ OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL); @@ -864,6 +865,7 @@ uint32_t local_tlli; printf("Testing GMM detach accept (unexpected)\n"); + sgsn = sgsn_instance_alloc(tall_sgsn_ctx); /* DTAP - Detach Accept (MT) */ /* normal detach */ @@ -900,6 +902,7 @@ uint32_t local_tlli; printf("Testing GMM Status (no MMCTX)\n"); + sgsn = sgsn_instance_alloc(tall_sgsn_ctx); /* DTAP - GMM Status, protocol error */ static const unsigned char gmm_status[] = { 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30905 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Idf8458902321da03b9b0831dad3ad383a9c7afa1 Gerrit-Change-Number: 30905 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-sgsn[master]: gtphub.h: Remove dependency on sgsn/gprs_sgsn.h
by pespin 12 Jan '23

12 Jan '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30903 ) Change subject: gtphub.h: Remove dependency on sgsn/gprs_sgsn.h ...................................................................... gtphub.h: Remove dependency on sgsn/gprs_sgsn.h It is only really needed to import define GSM_APN_LENGTH, which is actually also available in libosmogsm. Hence simply use the one from libosmogsm. Change-Id: I4c6110feeeaa1adfb6b1f0147eeb56dfe34636ec --- M include/osmocom/gtphub/gtphub.h M src/gtphub/gtphub.c M src/gtphub/gtphub_ares.c M src/gtphub/gtphub_main.c M src/gtphub/gtphub_sock.c M tests/gtphub/gtphub_test.c 6 files changed, 14 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved laforge: Looks good to me, but someone else must approve diff --git a/include/osmocom/gtphub/gtphub.h b/include/osmocom/gtphub/gtphub.h index 6a439b5..dbf8469 100644 --- a/include/osmocom/gtphub/gtphub.h +++ b/include/osmocom/gtphub/gtphub.h @@ -27,9 +27,7 @@ #include <osmocom/core/select.h> #include <osmocom/core/timer.h> #include <osmocom/core/rate_ctr.h> - -#include <osmocom/sgsn/gprs_sgsn.h> - +#include <osmocom/gsm/apn.h> /* support */ @@ -428,7 +426,7 @@ /* The APN OI, the Operator Identifier, is the combined address, * including parts of the IMSI and APN NI, and ending with ".gprs". */ - char apn_oi_str[GSM_APN_LENGTH]; + char apn_oi_str[APN_MAXLEN+1]; /* Which address and port we resolved that to. */ struct gtphub_peer_port *peer; diff --git a/src/gtphub/gtphub.c b/src/gtphub/gtphub.c index 2b00f59..937e6a4 100644 --- a/src/gtphub/gtphub.c +++ b/src/gtphub/gtphub.c @@ -475,7 +475,7 @@ * present but cannot be decoded. */ static int get_ie_apn_str(union gtpie_member *ie[], const char **apn_str) { - static char apn_buf[GSM_APN_LENGTH]; + static char apn_buf[APN_MAXLEN+1]; unsigned int len; if (gtpie_gettlv(ie, GTPIE_APN, 0, &len, apn_buf, sizeof(apn_buf)) != 0) diff --git a/src/gtphub/gtphub_ares.c b/src/gtphub/gtphub_ares.c index a2d8a4a..774563d 100644 --- a/src/gtphub/gtphub_ares.c +++ b/src/gtphub/gtphub_ares.c @@ -33,6 +33,7 @@ #include <osmocom/core/utils.h> #include <osmocom/gsm/apn.h> +#include <osmocom/gsm/protocol/gsm_23_003.h> /* TODO split GRX ares from sgsn into a separate struct and allow use without * globals. */ @@ -56,8 +57,8 @@ struct gtphub *hub; char imsi_str[GSM23003_IMSI_MAX_DIGITS+1]; - char apn_ni_str[GSM_APN_LENGTH]; - char apn_oi_str[GSM_APN_LENGTH]; + char apn_ni_str[APN_MAXLEN+1]; + char apn_oi_str[APN_MAXLEN+1]; int have_3dig_mnc; }; diff --git a/src/gtphub/gtphub_main.c b/src/gtphub/gtphub_main.c index 4d1e9cf..d25123e 100644 --- a/src/gtphub/gtphub_main.c +++ b/src/gtphub/gtphub_main.c @@ -34,6 +34,7 @@ #include <osmocom/core/logging.h> #include <osmocom/core/utils.h> #include <osmocom/core/rate_ctr.h> +#include <osmocom/core/msgb.h> #include <osmocom/vty/logging.h> #include <osmocom/vty/telnet_interface.h> diff --git a/src/gtphub/gtphub_sock.c b/src/gtphub/gtphub_sock.c index 59a0d42..6f299d2 100644 --- a/src/gtphub/gtphub_sock.c +++ b/src/gtphub/gtphub_sock.c @@ -25,6 +25,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <errno.h> +#include <string.h> + +#include <osmocom/core/utils.h> + #include <osmocom/gtphub/gtphub.h> #include <osmocom/sgsn/debug.h> diff --git a/tests/gtphub/gtphub_test.c b/tests/gtphub/gtphub_test.c index 4f58315..5fa730a 100644 --- a/tests/gtphub/gtphub_test.c +++ b/tests/gtphub/gtphub_test.c @@ -27,6 +27,7 @@ #include <osmocom/core/utils.h> #include <osmocom/core/application.h> +#include <osmocom/gsm/protocol/gsm_23_003.h> #include <osmocom/sgsn/debug.h> @@ -376,7 +377,7 @@ } char resolve_ggsn_got_imsi[GSM23003_IMSI_MAX_DIGITS+1]; -char resolve_ggsn_got_ni[GSM_APN_LENGTH]; +char resolve_ggsn_got_ni[APN_MAXLEN+1]; struct sgsn_sockaddr resolved_ggsn_addr; static int resolve_to_ggsn(const char *addr, uint16_t port) -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30903 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I4c6110feeeaa1adfb6b1f0147eeb56dfe34636ec Gerrit-Change-Number: 30903 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: daniel <dwillmann(a)sysmocom.de> Gerrit-CC: lynxis lazus <lynxis(a)fe80.eu> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-sgsn[master]: Split gprs_sgsn.{c,h} -> {auth,mmctx,sgsn}.{c,h}
by pespin 12 Jan '23

12 Jan '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30904 ) Change subject: Split gprs_sgsn.{c,h} -> {auth,mmctx,sgsn}.{c,h} ...................................................................... Split gprs_sgsn.{c,h} -> {auth,mmctx,sgsn}.{c,h} Some level of split already existed, like sgsn_auth.c, but headers were entangled together. Let's clearly separate application centric code (sgsn.c/h), auth related code (auth.c/h) and mmctx related code (mmctx.c/h). Change-Id: I048a082851c1275c959649942904205b02acce2a --- M include/osmocom/sgsn/Makefile.am A include/osmocom/sgsn/auth.h M include/osmocom/sgsn/gprs_gmm.h M include/osmocom/sgsn/gprs_gmm_fsm.h M include/osmocom/sgsn/gprs_llc.h M include/osmocom/sgsn/gprs_ranap.h M include/osmocom/sgsn/gprs_sm.h M include/osmocom/sgsn/gprs_sndcp.h R include/osmocom/sgsn/mmctx.h M include/osmocom/sgsn/sgsn.h M src/gprs/gprs_llc_parse.c M src/sgsn/Makefile.am M src/sgsn/gprs_bssgp.c M src/sgsn/gprs_gmm.c M src/sgsn/gprs_gmm_attach.c M src/sgsn/gprs_llc.c M src/sgsn/gprs_mm_state_gb_fsm.c M src/sgsn/gprs_mm_state_iu_fsm.c M src/sgsn/gprs_ns.c M src/sgsn/gprs_ranap.c M src/sgsn/gprs_sm.c M src/sgsn/gprs_sndcp.c M src/sgsn/gprs_subscriber.c R src/sgsn/mmctx.c M src/sgsn/pdpctx.c A src/sgsn/sgsn.c M src/sgsn/sgsn_auth.c M src/sgsn/sgsn_cdr.c M src/sgsn/sgsn_ctrl.c M src/sgsn/sgsn_libgtp.c M src/sgsn/sgsn_vty.c M tests/sgsn/Makefile.am M tests/sgsn/gprs_gb_parse.c 33 files changed, 312 insertions(+), 219 deletions(-) Approvals: Jenkins Builder: Verified dexter: Looks good to me, but someone else must approve daniel: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/sgsn/Makefile.am b/include/osmocom/sgsn/Makefile.am index 017954d..aa6cd0f 100644 --- a/include/osmocom/sgsn/Makefile.am +++ b/include/osmocom/sgsn/Makefile.am @@ -1,5 +1,6 @@ noinst_HEADERS = \ apn.h \ + auth.h \ common.h \ crc24.h \ debug.h \ @@ -13,7 +14,6 @@ gprs_llc.h \ gprs_llc_xid.h \ gprs_ranap.h \ - gprs_sgsn.h \ gprs_sm.h \ gprs_sndcp_comp.h \ gprs_sndcp_dcomp.h \ @@ -25,6 +25,7 @@ gtp.h \ gtp_ggsn.h \ gtp_mme.h \ + mmctx.h \ pdpctx.h \ sgsn.h \ sgsn_rim.h \ diff --git a/include/osmocom/sgsn/auth.h b/include/osmocom/sgsn/auth.h new file mode 100644 index 0000000..a46fb16 --- /dev/null +++ b/include/osmocom/sgsn/auth.h @@ -0,0 +1,39 @@ +/* MS authorization and subscriber data handling */ +#pragma once + +#include <osmocom/core/linuxlist.h> + +struct sgsn_config; +struct sgsn_instance; +struct sgsn_mm_ctx; +struct gsm_auth_tuple; + +/* Authorization/ACL handling */ +enum sgsn_auth_state { + SGSN_AUTH_UNKNOWN, + SGSN_AUTH_AUTHENTICATE, + SGSN_AUTH_UMTS_RESYNC, + SGSN_AUTH_ACCEPTED, + SGSN_AUTH_REJECTED +}; + +extern const struct value_string *sgsn_auth_state_names; + +void sgsn_auth_init(struct sgsn_instance *sgsn); +/* Request authorization */ +enum sgsn_auth_state sgsn_auth_state(struct sgsn_mm_ctx *mm); +int sgsn_auth_request(struct sgsn_mm_ctx *mm); +void sgsn_auth_update(struct sgsn_mm_ctx *mm); +struct gsm_auth_tuple *sgsn_auth_get_tuple(struct sgsn_mm_ctx *mmctx, + unsigned key_seq); + +/* + * Authorization/ACL handling + */ +struct imsi_acl_entry { + struct llist_head list; + char imsi[OSMO_IMSI_BUF_SIZE]; +}; +struct imsi_acl_entry *sgsn_acl_lookup(const char *imsi, const struct sgsn_config *cfg); +int sgsn_acl_add(const char *imsi, struct sgsn_config *cfg); +int sgsn_acl_del(const char *imsi, struct sgsn_config *cfg); diff --git a/include/osmocom/sgsn/gprs_gmm.h b/include/osmocom/sgsn/gprs_gmm.h index 0d04280..71dd1fa 100644 --- a/include/osmocom/sgsn/gprs_gmm.h +++ b/include/osmocom/sgsn/gprs_gmm.h @@ -1,11 +1,15 @@ #ifndef _GPRS_GMM_H #define _GPRS_GMM_H -#include <osmocom/core/msgb.h> -#include <osmocom/sgsn/gprs_sgsn.h> - #include <stdbool.h> +#include <osmocom/core/msgb.h> +#include <osmocom/gsm/gsm48.h> +#include <osmocom/crypt/auth.h> + +struct sgsn_mm_ctx; +struct gprs_llc_llme; + int gsm48_tx_gmm_auth_ciph_req(struct sgsn_mm_ctx *mm, const struct osmo_auth_vector *vec, uint8_t key_seq, bool force_standby); diff --git a/include/osmocom/sgsn/gprs_gmm_fsm.h b/include/osmocom/sgsn/gprs_gmm_fsm.h index f10851e..2f0e81a 100644 --- a/include/osmocom/sgsn/gprs_gmm_fsm.h +++ b/include/osmocom/sgsn/gprs_gmm_fsm.h @@ -1,8 +1,10 @@ #pragma once #include <osmocom/core/fsm.h> -#include <osmocom/sgsn/gprs_sgsn.h> +#include <osmocom/sgsn/mmctx.h> + +struct gprs_llc_llme; /* 3GPP TS 24.008 § 4.1.3.3 GMM mobility management states on the network side */ enum gmm_fsm_states { diff --git a/include/osmocom/sgsn/gprs_llc.h b/include/osmocom/sgsn/gprs_llc.h index 32b16b0..6f0e492 100644 --- a/include/osmocom/sgsn/gprs_llc.h +++ b/include/osmocom/sgsn/gprs_llc.h @@ -2,9 +2,15 @@ #include <stdint.h> #include <stdbool.h> -#include <osmocom/sgsn/gprs_sgsn.h> + +#include <osmocom/core/timer.h> +#include <osmocom/gsm/tlv.h> +#include <osmocom/crypt/gprs_cipher.h> + #include <osmocom/sgsn/gprs_llc_xid.h> +struct sgsn_mm_ctx; + /* Section 4.7 LLC Layer Structure */ enum gprs_llc_sapi { GPRS_SAPI_GMM = 1, diff --git a/include/osmocom/sgsn/gprs_ranap.h b/include/osmocom/sgsn/gprs_ranap.h index 62fdf6f..68f9115 100644 --- a/include/osmocom/sgsn/gprs_ranap.h +++ b/include/osmocom/sgsn/gprs_ranap.h @@ -1,13 +1,15 @@ #pragma once #include <osmocom/core/msgb.h> -#include <osmocom/sgsn/gprs_sgsn.h> #ifdef BUILD_IU #include <osmocom/ranap/ranap_ies_defs.h> #include <osmocom/ranap/ranap_msg_factory.h> #include <osmocom/ranap/iu_client.h> +struct sgsn_mm_ctx; +struct sgsn_pdp_ctx; + void activate_pdp_rabs(struct sgsn_mm_ctx *ctx); int sgsn_ranap_iu_event(struct ranap_ue_conn_ctx *ctx, enum ranap_iu_event_type type, void *data); int iu_rab_act_ps(uint8_t rab_id, struct sgsn_pdp_ctx *pdp); diff --git a/include/osmocom/sgsn/gprs_sm.h b/include/osmocom/sgsn/gprs_sm.h index 55c95b8..78bb2d8 100644 --- a/include/osmocom/sgsn/gprs_sm.h +++ b/include/osmocom/sgsn/gprs_sm.h @@ -1,7 +1,10 @@ #pragma once #include <osmocom/core/msgb.h> -#include <osmocom/sgsn/gprs_sgsn.h> + +struct sgsn_mm_ctx; +struct sgsn_pdp_ctx; +struct gprs_llc_llme; int gsm48_tx_gsm_deact_pdp_req(struct sgsn_pdp_ctx *pdp, uint8_t sm_cause, bool teardown); int gsm48_tx_gsm_act_pdp_rej(struct sgsn_mm_ctx *mm, uint8_t tid, diff --git a/include/osmocom/sgsn/gprs_sndcp.h b/include/osmocom/sgsn/gprs_sndcp.h index b4a0af8..30ea053 100644 --- a/include/osmocom/sgsn/gprs_sndcp.h +++ b/include/osmocom/sgsn/gprs_sndcp.h @@ -3,6 +3,9 @@ #include <stdint.h> #include <osmocom/core/linuxlist.h> +#include <osmocom/gsm/gsm48.h> + +struct gprs_llc_lle; /* A fragment queue header, maintaining list of fragments for one N-PDU */ struct defrag_state { diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/mmctx.h similarity index 87% rename from include/osmocom/sgsn/gprs_sgsn.h rename to include/osmocom/sgsn/mmctx.h index c9e301d..dd78124 100644 --- a/include/osmocom/sgsn/gprs_sgsn.h +++ b/include/osmocom/sgsn/mmctx.h @@ -1,5 +1,4 @@ -#ifndef _GPRS_SGSN_H -#define _GPRS_SGSN_H +#pragma once #include <stdint.h> #include <netinet/in.h> @@ -15,6 +14,7 @@ #include <osmocom/crypt/auth.h> #include <osmocom/sgsn/apn.h> +#include <osmocom/sgsn/auth.h> #include <osmocom/sgsn/gprs_subscriber.h> #define GSM_EXTENSION_LENGTH 15 @@ -48,17 +48,6 @@ GMM_T3350_MODE_PTMSI_REALL, }; -/* Authorization/ACL handling */ -enum sgsn_auth_state { - SGSN_AUTH_UNKNOWN, - SGSN_AUTH_AUTHENTICATE, - SGSN_AUTH_UMTS_RESYNC, - SGSN_AUTH_ACCEPTED, - SGSN_AUTH_REJECTED -}; - -#define MS_RADIO_ACCESS_CAPA - enum sgsn_ggsn_lookup_state { SGSN_GGSN_2DIGIT, SGSN_GGSN_3DIGIT, @@ -296,32 +285,5 @@ uint32_t sgsn_alloc_ptmsi(void); -/* - * Authorization/ACL handling - */ -struct imsi_acl_entry { - struct llist_head list; - char imsi[OSMO_IMSI_BUF_SIZE]; -}; - -#define SGSN_ERROR_CAUSE_NONE (-1) - -struct sgsn_config; -struct sgsn_instance; -extern const struct value_string *sgsn_auth_state_names; - -void sgsn_auth_init(struct sgsn_instance *sgsn); -struct imsi_acl_entry *sgsn_acl_lookup(const char *imsi, const struct sgsn_config *cfg); -int sgsn_acl_add(const char *imsi, struct sgsn_config *cfg); -int sgsn_acl_del(const char *imsi, struct sgsn_config *cfg); -/* Request authorization */ -int sgsn_auth_request(struct sgsn_mm_ctx *mm); -enum sgsn_auth_state sgsn_auth_state(struct sgsn_mm_ctx *mm); -void sgsn_auth_update(struct sgsn_mm_ctx *mm); -struct gsm_auth_tuple *sgsn_auth_get_tuple(struct sgsn_mm_ctx *mmctx, - unsigned key_seq); - /* Called on subscriber data updates */ void sgsn_update_subscriber_data(struct sgsn_mm_ctx *mmctx); - -#endif /* _GPRS_SGSN_H */ diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h index aadb8a7..0963863 100644 --- a/include/osmocom/sgsn/sgsn.h +++ b/include/osmocom/sgsn/sgsn.h @@ -8,7 +8,7 @@ #include <osmocom/gprs/gprs_ns2.h> #include <osmocom/gprs/gprs_bssgp.h> -#include <osmocom/sgsn/gprs_sgsn.h> +#include <osmocom/sgsn/auth.h> #include <osmocom/sgsn/gtp_mme.h> #include <osmocom/gsm/oap_client.h> #include <osmocom/gsupclient/gsup_client.h> @@ -25,6 +25,8 @@ struct hostent; +#define SGSN_ERROR_CAUSE_NONE (-1) + enum sgsn_auth_policy { SGSN_AUTH_POLICY_OPEN, SGSN_AUTH_POLICY_CLOSED, diff --git a/src/gprs/gprs_llc_parse.c b/src/gprs/gprs_llc_parse.c index e400e25..d099cda 100644 --- a/src/gprs/gprs_llc_parse.c +++ b/src/gprs/gprs_llc_parse.c @@ -29,7 +29,7 @@ #include <osmocom/gprs/gprs_bssgp.h> #include <osmocom/sgsn/debug.h> -#include <osmocom/sgsn/gprs_sgsn.h> +#include <osmocom/sgsn/mmctx.h> #include <osmocom/sgsn/gprs_gmm.h> #include <osmocom/sgsn/gprs_llc.h> #include <osmocom/sgsn/crc24.h> diff --git a/src/sgsn/Makefile.am b/src/sgsn/Makefile.am index 75f9608..93b9fa0 100644 --- a/src/sgsn/Makefile.am +++ b/src/sgsn/Makefile.am @@ -47,7 +47,6 @@ gprs_gmm_fsm.c \ gprs_mm_state_gb_fsm.c \ gprs_ns.c \ - gprs_sgsn.c \ gprs_sm.c \ gprs_sndcp.c \ gprs_sndcp_comp.c \ @@ -57,11 +56,13 @@ gprs_sndcp_xid.c \ gtp_ggsn.c \ gtp_mme.c \ + sgsn.c \ sgsn_main.c \ sgsn_vty.c \ sgsn_libgtp.c \ gprs_llc.c \ gprs_llc_vty.c \ + mmctx.c \ pdpctx.c \ sgsn_ctrl.c \ sgsn_auth.c \ diff --git a/src/sgsn/gprs_bssgp.c b/src/sgsn/gprs_bssgp.c index d6bd25f..5db751c 100644 --- a/src/sgsn/gprs_bssgp.c +++ b/src/sgsn/gprs_bssgp.c @@ -29,6 +29,7 @@ #include <osmocom/sgsn/gprs_llc.h> #include <osmocom/sgsn/gprs_gmm.h> #include <osmocom/sgsn/sgsn_rim.h> +#include <osmocom/sgsn/mmctx.h> /* call-back function for the BSSGP protocol */ int sgsn_bssgp_rx_prim(struct osmo_prim_hdr *oph) diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index 2f15c92..5bf66c3 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -48,7 +48,7 @@ #include <osmocom/sgsn/debug.h> #include <osmocom/sgsn/gprs_llc.h> -#include <osmocom/sgsn/gprs_sgsn.h> +#include <osmocom/sgsn/mmctx.h> #include <osmocom/sgsn/gprs_gmm.h> #include <osmocom/sgsn/gprs_utils.h> #include <osmocom/sgsn/gprs_subscriber.h> diff --git a/src/sgsn/gprs_gmm_attach.c b/src/sgsn/gprs_gmm_attach.c index 59417df..708ea8f 100644 --- a/src/sgsn/gprs_gmm_attach.c +++ b/src/sgsn/gprs_gmm_attach.c @@ -6,6 +6,7 @@ #include <osmocom/gsm/protocol/gsm_04_08_gprs.h> #include <osmocom/sgsn/debug.h> #include <osmocom/sgsn/gprs_gmm.h> +#include <osmocom/sgsn/mmctx.h> #include <osmocom/sgsn/sgsn.h> #define X(s) (1 << (s)) diff --git a/src/sgsn/gprs_llc.c b/src/sgsn/gprs_llc.c index 302e018..6f56385 100644 --- a/src/sgsn/gprs_llc.c +++ b/src/sgsn/gprs_llc.c @@ -33,7 +33,7 @@ #include <osmocom/gsm/gsm_utils.h> #include <osmocom/sgsn/debug.h> -#include <osmocom/sgsn/gprs_sgsn.h> +#include <osmocom/sgsn/mmctx.h> #include <osmocom/sgsn/gprs_gmm.h> #include <osmocom/sgsn/gprs_llc.h> #include <osmocom/sgsn/crc24.h> diff --git a/src/sgsn/gprs_mm_state_gb_fsm.c b/src/sgsn/gprs_mm_state_gb_fsm.c index 6e812d3..5a007e9 100644 --- a/src/sgsn/gprs_mm_state_gb_fsm.c +++ b/src/sgsn/gprs_mm_state_gb_fsm.c @@ -27,6 +27,7 @@ #include <osmocom/sgsn/debug.h> #include <osmocom/sgsn/sgsn.h> +#include <osmocom/sgsn/mmctx.h> #define X(s) (1 << (s)) diff --git a/src/sgsn/gprs_mm_state_iu_fsm.c b/src/sgsn/gprs_mm_state_iu_fsm.c index 597507c..5ac0097 100644 --- a/src/sgsn/gprs_mm_state_iu_fsm.c +++ b/src/sgsn/gprs_mm_state_iu_fsm.c @@ -31,6 +31,7 @@ #include <osmocom/sgsn/gprs_ranap.h> #include <osmocom/sgsn/gtp.h> #include <osmocom/sgsn/pdpctx.h> +#include <osmocom/sgsn/mmctx.h> #define X(s) (1 << (s)) diff --git a/src/sgsn/gprs_ns.c b/src/sgsn/gprs_ns.c index e2ff931..eb447fa 100644 --- a/src/sgsn/gprs_ns.c +++ b/src/sgsn/gprs_ns.c @@ -31,7 +31,6 @@ #include "config.h" -#include <osmocom/sgsn/gprs_sgsn.h> #include <osmocom/sgsn/debug.h> void gprs_ns_prim_status_cb(struct osmo_gprs_ns2_prim *nsp) diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c index d3d958d..5e0d8ed 100644 --- a/src/sgsn/gprs_ranap.c +++ b/src/sgsn/gprs_ranap.c @@ -40,6 +40,7 @@ #include <osmocom/sgsn/gtp_ggsn.h> #include <osmocom/sgsn/gtp.h> #include <osmocom/sgsn/pdpctx.h> +#include <osmocom/sgsn/mmctx.h> /* Send RAB activation requests for all PDP contexts */ void activate_pdp_rabs(struct sgsn_mm_ctx *ctx) diff --git a/src/sgsn/gprs_sm.c b/src/sgsn/gprs_sm.c index 3a5ba3b..1194f31 100644 --- a/src/sgsn/gprs_sm.c +++ b/src/sgsn/gprs_sm.c @@ -44,6 +44,7 @@ #include <osmocom/sgsn/gprs_ranap.h> #include <osmocom/sgsn/gtp.h> #include <osmocom/sgsn/pdpctx.h> +#include <osmocom/sgsn/mmctx.h> /* 3GPP TS 04.08 sec 6.1.3.4.3(.a) "Abnormal cases" */ #define T339X_MAX_RETRANS 4 diff --git a/src/sgsn/gprs_sndcp.c b/src/sgsn/gprs_sndcp.c index 6707c28..36e808f 100644 --- a/src/sgsn/gprs_sndcp.c +++ b/src/sgsn/gprs_sndcp.c @@ -42,6 +42,7 @@ #include <osmocom/sgsn/gprs_sndcp_dcomp.h> #include <osmocom/sgsn/gprs_sndcp_comp.h> #include <osmocom/sgsn/gprs_gmm.h> +#include <osmocom/sgsn/mmctx.h> #include <osmocom/sgsn/gtp.h> #define DEBUG_IP_PACKETS 0 /* 0=Disabled, 1=Enabled */ diff --git a/src/sgsn/gprs_subscriber.c b/src/sgsn/gprs_subscriber.c index 416e6a4..460450c 100644 --- a/src/sgsn/gprs_subscriber.c +++ b/src/sgsn/gprs_subscriber.c @@ -30,7 +30,7 @@ #include <osmocom/gsupclient/gsup_client.h> #include <osmocom/sgsn/sgsn.h> -#include <osmocom/sgsn/gprs_sgsn.h> +#include <osmocom/sgsn/mmctx.h> #include <osmocom/sgsn/gprs_gmm.h> #include <osmocom/sgsn/gprs_utils.h> diff --git a/src/sgsn/gprs_sgsn.c b/src/sgsn/mmctx.c similarity index 76% rename from src/sgsn/gprs_sgsn.c rename to src/sgsn/mmctx.c index 55e1cb2..c40db21 100644 --- a/src/sgsn/gprs_sgsn.c +++ b/src/sgsn/mmctx.c @@ -1,4 +1,4 @@ -/* GPRS SGSN functionality */ +/* Mobility Management context */ /* (C) 2009 by Harald Welte <laforge(a)gnumonks.org> * @@ -38,7 +38,7 @@ #include <osmocom/sgsn/gprs_subscriber.h> #include <osmocom/sgsn/debug.h> -#include <osmocom/sgsn/gprs_sgsn.h> +#include <osmocom/sgsn/mmctx.h> #include <osmocom/sgsn/sgsn.h> #include <osmocom/sgsn/gprs_gmm.h> #include <osmocom/sgsn/gprs_sm.h> @@ -60,10 +60,6 @@ #include "../../config.h" -#define GPRS_LLME_CHECK_TICK 30 - -extern struct osmo_tdef sgsn_T_defs[]; - LLIST_HEAD(sgsn_mm_ctxts); const struct value_string sgsn_ran_type_names[] = { @@ -97,40 +93,6 @@ .class_id = OSMO_STATS_CLASS_SUBSCRIBER, }; -static const struct rate_ctr_desc sgsn_ctr_description[] = { - { "llc:dl_bytes", "Count sent LLC bytes before giving it to the bssgp layer" }, - { "llc:ul_bytes", "Count successful received LLC bytes (encrypt & fcs correct)" }, - { "llc:dl_packets", "Count successful sent LLC packets before giving it to the bssgp layer" }, - { "llc:ul_packets", "Count successful received LLC packets (encrypt & fcs correct)" }, - { "gprs:attach_requested", "Received attach requests" }, - { "gprs:attach_accepted", "Sent attach accepts" }, - { "gprs:attach_rejected", "Sent attach rejects" }, - { "gprs:detach_requested", "Received detach requests" }, - { "gprs:detach_acked", "Sent detach acks" }, - { "gprs:routing_area_requested", "Received routing area requests" }, - { "gprs:routing_area_requested", "Sent routing area acks" }, - { "gprs:routing_area_requested", "Sent routing area rejects" }, - { "pdp:activate_requested", "Received activate requests" }, - { "pdp:activate_rejected", "Sent activate rejects" }, - { "pdp:activate_accepted", "Sent activate accepts" }, - { "pdp:request_activated", "unused" }, - { "pdp:request_activate_rejected", "unused" }, - { "pdp:modify_requested", "unused" }, - { "pdp:modify_accepted", "unused" }, - { "pdp:dl_deactivate_requested", "Sent deactivate requests" }, - { "pdp:dl_deactivate_accepted", "Sent deactivate accepted" }, - { "pdp:ul_deactivate_requested", "Received deactivate requests" }, - { "pdp:ul_deactivate_accepted", "Received deactivate accepts" }, -}; - -static const struct rate_ctr_group_desc sgsn_ctrg_desc = { - "sgsn", - "SGSN Overall Statistics", - OSMO_STATS_CLASS_GLOBAL, - ARRAY_SIZE(sgsn_ctr_description), - sgsn_ctr_description, -}; - /* look-up an SGSN MM context based on Iu UE context (struct ue_conn_ctx)*/ struct sgsn_mm_ctx *sgsn_mm_ctx_by_ue_ctx(const void *uectx) { @@ -622,121 +584,3 @@ return ggsn; } - -static void sgsn_llme_cleanup_free(struct gprs_llc_llme *llme) -{ - struct sgsn_mm_ctx *mmctx = NULL; - - llist_for_each_entry(mmctx, &sgsn_mm_ctxts, list) { - if (llme == mmctx->gb.llme) { - gsm0408_gprs_access_cancelled(mmctx, SGSN_ERROR_CAUSE_NONE); - return; - } - } - - /* No MM context found */ - LOGP(DGPRS, LOGL_INFO, "Deleting orphaned LLME, TLLI 0x%08x\n", - llme->tlli); - gprs_llgmm_unassign(llme); -} - -static void sgsn_llme_check_cb(void *data_) -{ - struct gprs_llc_llme *llme, *llme_tmp; - struct timespec now_tp; - time_t now, age; - time_t max_age = gprs_max_time_to_idle(); - - int rc; - - rc = osmo_clock_gettime(CLOCK_MONOTONIC, &now_tp); - OSMO_ASSERT(rc >= 0); - now = now_tp.tv_sec; - - LOGP(DGPRS, LOGL_DEBUG, - "Checking for inactive LLMEs, time = %u\n", (unsigned)now); - - llist_for_each_entry_safe(llme, llme_tmp, &gprs_llc_llmes, list) { - if (llme->age_timestamp == GPRS_LLME_RESET_AGE) - llme->age_timestamp = now; - - age = now - llme->age_timestamp; - - if (age > max_age || age < 0) { - LOGP(DGPRS, LOGL_INFO, - "Inactivity timeout for TLLI 0x%08x, age %d\n", - llme->tlli, (int)age); - sgsn_llme_cleanup_free(llme); - } - } - - osmo_timer_schedule(&sgsn->llme_timer, GPRS_LLME_CHECK_TICK, 0); -} - -static int sgsn_instance_talloc_destructor(struct sgsn_instance *sgi) -{ - sgsn_cdr_release(sgi); - osmo_timer_del(&sgi->llme_timer); - rate_ctr_group_free(sgi->rate_ctrs); - return 0; -} - -struct sgsn_instance *sgsn_instance_alloc(void *talloc_ctx) -{ - struct sgsn_instance *inst; - inst = talloc_zero(talloc_ctx, struct sgsn_instance); - - talloc_set_destructor(inst, sgsn_instance_talloc_destructor); - - inst->cfg.gtp_statedir = talloc_strdup(inst, "./"); - inst->cfg.auth_policy = SGSN_AUTH_POLICY_CLOSED; - inst->cfg.require_authentication = true; /* only applies if auth_policy is REMOTE */ - inst->cfg.gsup_server_port = OSMO_GSUP_PORT; - - inst->cfg.T_defs = sgsn_T_defs; - osmo_tdefs_reset(inst->cfg.T_defs); - inst->cfg.T_defs_gtp = gtp_T_defs; - osmo_tdefs_reset(inst->cfg.T_defs_gtp); - - inst->rate_ctrs = rate_ctr_group_alloc(inst, &sgsn_ctrg_desc, 0); - OSMO_ASSERT(inst->rate_ctrs); - - INIT_LLIST_HEAD(&inst->apn_list); - INIT_LLIST_HEAD(&inst->ggsn_list); - INIT_LLIST_HEAD(&inst->mme_list); - INIT_LLIST_HEAD(&inst->pdp_list); - - osmo_timer_setup(&inst->llme_timer, sgsn_llme_check_cb, NULL); - osmo_timer_schedule(&inst->llme_timer, GPRS_LLME_CHECK_TICK, 0); - /* These are mostly setting up stuff not related to VTY cfg, so they can be set up here: */ - sgsn_auth_init(inst); - sgsn_cdr_init(inst); - return inst; -} - -/* To be called after VTY config parsing: */ -int sgsn_inst_init(struct sgsn_instance *sgsn) -{ - int rc; - - /* start control interface after reading config for - * ctrl_vty_get_bind_addr() */ - sgsn->ctrlh = ctrl_interface_setup(NULL, OSMO_CTRL_PORT_SGSN, NULL); - if (!sgsn->ctrlh) { - LOGP(DGPRS, LOGL_ERROR, "Failed to create CTRL interface.\n"); - return -EIO; - } - - rc = sgsn_ctrl_cmds_install(); - if (rc != 0) { - LOGP(DGPRS, LOGL_ERROR, "Failed to install CTRL commands.\n"); - return -EFAULT; - } - - rc = gprs_subscr_init(sgsn); - if (rc < 0) { - LOGP(DGPRS, LOGL_FATAL, "Cannot set up SGSN\n"); - return rc; - } - return 0; -} diff --git a/src/sgsn/pdpctx.c b/src/sgsn/pdpctx.c index 77146fc..70fba20 100644 --- a/src/sgsn/pdpctx.c +++ b/src/sgsn/pdpctx.c @@ -28,7 +28,7 @@ #include <osmocom/core/stats.h> #include <osmocom/sgsn/pdpctx.h> -#include <osmocom/sgsn/gprs_sgsn.h> +#include <osmocom/sgsn/mmctx.h> #include <osmocom/sgsn/sgsn.h> #include <osmocom/sgsn/debug.h> #include <osmocom/sgsn/signal.h> diff --git a/src/sgsn/sgsn.c b/src/sgsn/sgsn.c new file mode 100644 index 0000000..f394db8 --- /dev/null +++ b/src/sgsn/sgsn.c @@ -0,0 +1,214 @@ +/* SGSN instance */ + +/* (C) 2009 by Harald Welte <laforge(a)gnumonks.org> + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include <stdint.h> + +#include <osmocom/core/linuxlist.h> +#include <osmocom/core/talloc.h> +#include <osmocom/core/timer.h> +#include <osmocom/core/rate_ctr.h> +#include <osmocom/core/stats.h> +#include <osmocom/core/backtrace.h> +#include <osmocom/ctrl/control_if.h> +#include <osmocom/ctrl/ports.h> +#include <osmocom/gprs/gprs_ns2.h> +#include <osmocom/gprs/gprs_bssgp.h> +#include <osmocom/gsm/protocol/gsm_04_08_gprs.h> +#include <osmocom/gsm/apn.h> +#include <osmocom/gsm/gsm_utils.h> +#include <osmocom/gsm/gsup.h> + +#include <osmocom/sgsn/gprs_subscriber.h> +#include <osmocom/sgsn/debug.h> +#include <osmocom/sgsn/sgsn.h> +#include <osmocom/sgsn/gprs_gmm.h> +#include <osmocom/sgsn/gprs_sm.h> +#include <osmocom/sgsn/gprs_utils.h> +#include <osmocom/sgsn/signal.h> +#include <osmocom/sgsn/gprs_gmm_attach.h> +#include <osmocom/sgsn/gprs_mm_state_gb_fsm.h> +#include <osmocom/sgsn/gprs_mm_state_iu_fsm.h> +#include <osmocom/sgsn/gprs_gmm_fsm.h> +#include <osmocom/sgsn/gprs_llc.h> +#include <osmocom/sgsn/gprs_sndcp.h> +#include <osmocom/sgsn/gtp_ggsn.h> +#include <osmocom/sgsn/gtp.h> +#include <osmocom/sgsn/pdpctx.h> + +#include <pdp.h> + +#include <time.h> + +#define GPRS_LLME_CHECK_TICK 30 + +extern struct osmo_tdef sgsn_T_defs[]; + +static const struct rate_ctr_desc sgsn_ctr_description[] = { + { "llc:dl_bytes", "Count sent LLC bytes before giving it to the bssgp layer" }, + { "llc:ul_bytes", "Count successful received LLC bytes (encrypt & fcs correct)" }, + { "llc:dl_packets", "Count successful sent LLC packets before giving it to the bssgp layer" }, + { "llc:ul_packets", "Count successful received LLC packets (encrypt & fcs correct)" }, + { "gprs:attach_requested", "Received attach requests" }, + { "gprs:attach_accepted", "Sent attach accepts" }, + { "gprs:attach_rejected", "Sent attach rejects" }, + { "gprs:detach_requested", "Received detach requests" }, + { "gprs:detach_acked", "Sent detach acks" }, + { "gprs:routing_area_requested", "Received routing area requests" }, + { "gprs:routing_area_requested", "Sent routing area acks" }, + { "gprs:routing_area_requested", "Sent routing area rejects" }, + { "pdp:activate_requested", "Received activate requests" }, + { "pdp:activate_rejected", "Sent activate rejects" }, + { "pdp:activate_accepted", "Sent activate accepts" }, + { "pdp:request_activated", "unused" }, + { "pdp:request_activate_rejected", "unused" }, + { "pdp:modify_requested", "unused" }, + { "pdp:modify_accepted", "unused" }, + { "pdp:dl_deactivate_requested", "Sent deactivate requests" }, + { "pdp:dl_deactivate_accepted", "Sent deactivate accepted" }, + { "pdp:ul_deactivate_requested", "Received deactivate requests" }, + { "pdp:ul_deactivate_accepted", "Received deactivate accepts" }, +}; + +static const struct rate_ctr_group_desc sgsn_ctrg_desc = { + "sgsn", + "SGSN Overall Statistics", + OSMO_STATS_CLASS_GLOBAL, + ARRAY_SIZE(sgsn_ctr_description), + sgsn_ctr_description, +}; + +static void sgsn_llme_cleanup_free(struct gprs_llc_llme *llme) +{ + struct sgsn_mm_ctx *mmctx = NULL; + + llist_for_each_entry(mmctx, &sgsn_mm_ctxts, list) { + if (llme == mmctx->gb.llme) { + gsm0408_gprs_access_cancelled(mmctx, SGSN_ERROR_CAUSE_NONE); + return; + } + } + + /* No MM context found */ + LOGP(DGPRS, LOGL_INFO, "Deleting orphaned LLME, TLLI 0x%08x\n", + llme->tlli); + gprs_llgmm_unassign(llme); +} + +static void sgsn_llme_check_cb(void *data_) +{ + struct gprs_llc_llme *llme, *llme_tmp; + struct timespec now_tp; + time_t now, age; + time_t max_age = gprs_max_time_to_idle(); + + int rc; + + rc = osmo_clock_gettime(CLOCK_MONOTONIC, &now_tp); + OSMO_ASSERT(rc >= 0); + now = now_tp.tv_sec; + + LOGP(DGPRS, LOGL_DEBUG, + "Checking for inactive LLMEs, time = %u\n", (unsigned)now); + + llist_for_each_entry_safe(llme, llme_tmp, &gprs_llc_llmes, list) { + if (llme->age_timestamp == GPRS_LLME_RESET_AGE) + llme->age_timestamp = now; + + age = now - llme->age_timestamp; + + if (age > max_age || age < 0) { + LOGP(DGPRS, LOGL_INFO, + "Inactivity timeout for TLLI 0x%08x, age %d\n", + llme->tlli, (int)age); + sgsn_llme_cleanup_free(llme); + } + } + + osmo_timer_schedule(&sgsn->llme_timer, GPRS_LLME_CHECK_TICK, 0); +} + +static int sgsn_instance_talloc_destructor(struct sgsn_instance *sgi) +{ + sgsn_cdr_release(sgi); + osmo_timer_del(&sgi->llme_timer); + rate_ctr_group_free(sgi->rate_ctrs); + return 0; +} + +struct sgsn_instance *sgsn_instance_alloc(void *talloc_ctx) +{ + struct sgsn_instance *inst; + inst = talloc_zero(talloc_ctx, struct sgsn_instance); + + talloc_set_destructor(inst, sgsn_instance_talloc_destructor); + + inst->cfg.gtp_statedir = talloc_strdup(inst, "./"); + inst->cfg.auth_policy = SGSN_AUTH_POLICY_CLOSED; + inst->cfg.require_authentication = true; /* only applies if auth_policy is REMOTE */ + inst->cfg.gsup_server_port = OSMO_GSUP_PORT; + + inst->cfg.T_defs = sgsn_T_defs; + osmo_tdefs_reset(inst->cfg.T_defs); + inst->cfg.T_defs_gtp = gtp_T_defs; + osmo_tdefs_reset(inst->cfg.T_defs_gtp); + + inst->rate_ctrs = rate_ctr_group_alloc(inst, &sgsn_ctrg_desc, 0); + OSMO_ASSERT(inst->rate_ctrs); + + INIT_LLIST_HEAD(&inst->apn_list); + INIT_LLIST_HEAD(&inst->ggsn_list); + INIT_LLIST_HEAD(&inst->mme_list); + INIT_LLIST_HEAD(&inst->pdp_list); + + osmo_timer_setup(&inst->llme_timer, sgsn_llme_check_cb, NULL); + osmo_timer_schedule(&inst->llme_timer, GPRS_LLME_CHECK_TICK, 0); + /* These are mostly setting up stuff not related to VTY cfg, so they can be set up here: */ + sgsn_auth_init(inst); + sgsn_cdr_init(inst); + return inst; +} + +/* To be called after VTY config parsing: */ +int sgsn_inst_init(struct sgsn_instance *sgsn) +{ + int rc; + + /* start control interface after reading config for + * ctrl_vty_get_bind_addr() */ + sgsn->ctrlh = ctrl_interface_setup(NULL, OSMO_CTRL_PORT_SGSN, NULL); + if (!sgsn->ctrlh) { + LOGP(DGPRS, LOGL_ERROR, "Failed to create CTRL interface.\n"); + return -EIO; + } + + rc = sgsn_ctrl_cmds_install(); + if (rc != 0) { + LOGP(DGPRS, LOGL_ERROR, "Failed to install CTRL commands.\n"); + return -EFAULT; + } + + rc = gprs_subscr_init(sgsn); + if (rc < 0) { + LOGP(DGPRS, LOGL_FATAL, "Cannot set up SGSN\n"); + return rc; + } + return 0; +} diff --git a/src/sgsn/sgsn_auth.c b/src/sgsn/sgsn_auth.c index b8d8035..cbff6f8 100644 --- a/src/sgsn/sgsn_auth.c +++ b/src/sgsn/sgsn_auth.c @@ -22,7 +22,7 @@ #include <osmocom/gsm/protocol/gsm_04_08_gprs.h> #include <osmocom/core/utils.h> #include <osmocom/sgsn/sgsn.h> -#include <osmocom/sgsn/gprs_sgsn.h> +#include <osmocom/sgsn/mmctx.h> #include <osmocom/sgsn/gprs_gmm.h> #include <osmocom/sgsn/gprs_subscriber.h> #include <osmocom/sgsn/debug.h> diff --git a/src/sgsn/sgsn_cdr.c b/src/sgsn/sgsn_cdr.c index db32644..1536c13 100644 --- a/src/sgsn/sgsn_cdr.c +++ b/src/sgsn/sgsn_cdr.c @@ -29,6 +29,7 @@ #include <osmocom/sgsn/vty.h> #include <osmocom/sgsn/gtp_ggsn.h> #include <osmocom/sgsn/pdpctx.h> +#include <osmocom/sgsn/mmctx.h> #include <gtp.h> #include <pdp.h> diff --git a/src/sgsn/sgsn_ctrl.c b/src/sgsn/sgsn_ctrl.c index 8961f37..15c15ce 100644 --- a/src/sgsn/sgsn_ctrl.c +++ b/src/sgsn/sgsn_ctrl.c @@ -21,7 +21,7 @@ #include <osmocom/ctrl/control_if.h> #include <osmocom/ctrl/control_cmd.h> -#include <osmocom/sgsn/gprs_sgsn.h> +#include <osmocom/sgsn/mmctx.h> #include <osmocom/sgsn/pdpctx.h> #include <osmocom/sgsn/sgsn.h> #include <osmocom/sgsn/debug.h> diff --git a/src/sgsn/sgsn_libgtp.c b/src/sgsn/sgsn_libgtp.c index e2d5670..7c08e6f 100644 --- a/src/sgsn/sgsn_libgtp.c +++ b/src/sgsn/sgsn_libgtp.c @@ -47,7 +47,7 @@ #include <osmocom/sgsn/sgsn.h> #include <osmocom/sgsn/gprs_ns.h> #include <osmocom/sgsn/gprs_llc.h> -#include <osmocom/sgsn/gprs_sgsn.h> +#include <osmocom/sgsn/mmctx.h> #include <osmocom/sgsn/gprs_gmm.h> #include <osmocom/sgsn/gprs_sm.h> #include <osmocom/sgsn/gprs_subscriber.h> diff --git a/src/sgsn/sgsn_vty.c b/src/sgsn/sgsn_vty.c index fa62561..4a1d085 100644 --- a/src/sgsn/sgsn_vty.c +++ b/src/sgsn/sgsn_vty.c @@ -38,7 +38,7 @@ #include <osmocom/sgsn/gprs_ns.h> #include <osmocom/sgsn/gprs_gmm.h> #include <osmocom/sgsn/gprs_bssgp.h> -#include <osmocom/sgsn/gprs_sgsn.h> +#include <osmocom/sgsn/mmctx.h> #include <osmocom/sgsn/gtp_ggsn.h> #include <osmocom/sgsn/gtp_mme.h> #include <osmocom/sgsn/vty.h> diff --git a/tests/sgsn/Makefile.am b/tests/sgsn/Makefile.am index 8df1395..d22a8d9 100644 --- a/tests/sgsn/Makefile.am +++ b/tests/sgsn/Makefile.am @@ -57,10 +57,11 @@ $(top_builddir)/src/sgsn/gprs_gmm.o \ $(top_builddir)/src/sgsn/gprs_gmm_fsm.o \ $(top_builddir)/src/sgsn/gprs_mm_state_gb_fsm.o \ - $(top_builddir)/src/sgsn/gprs_sgsn.o \ $(top_builddir)/src/sgsn/gtp_ggsn.o \ $(top_builddir)/src/sgsn/gtp_mme.o \ + $(top_builddir)/src/sgsn/mmctx.o \ $(top_builddir)/src/sgsn/pdpctx.o \ + $(top_builddir)/src/sgsn/sgsn.o \ $(top_builddir)/src/sgsn/sgsn_cdr.o \ $(top_builddir)/src/sgsn/sgsn_ctrl.o \ $(top_builddir)/src/sgsn/sgsn_vty.o \ diff --git a/tests/sgsn/gprs_gb_parse.c b/tests/sgsn/gprs_gb_parse.c index 3338911..670839f 100644 --- a/tests/sgsn/gprs_gb_parse.c +++ b/tests/sgsn/gprs_gb_parse.c @@ -18,6 +18,8 @@ * */ +#include <arpa/inet.h> + #include <osmocom/gsm/gsm48.h> #include <osmocom/gsm/protocol/gsm_04_08_gprs.h> -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30904 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I048a082851c1275c959649942904205b02acce2a Gerrit-Change-Number: 30904 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: lynxis lazus <lynxis(a)fe80.eu> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-sgsn[master]: Fix extra whitespace in pdpctx_ctr_description
by pespin 12 Jan '23

12 Jan '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30932 ) Change subject: Fix extra whitespace in pdpctx_ctr_description ...................................................................... Fix extra whitespace in pdpctx_ctr_description Change-Id: I4d9145c681e725b709fde38f6e9b4516d37b4d8c --- M src/sgsn/pdpctx.c 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified daniel: Looks good to me, approved diff --git a/src/sgsn/pdpctx.c b/src/sgsn/pdpctx.c index 70fba20..e779420 100644 --- a/src/sgsn/pdpctx.c +++ b/src/sgsn/pdpctx.c @@ -40,10 +40,10 @@ #include <osmocom/sgsn/gtp.h> static const struct rate_ctr_desc pdpctx_ctr_description[] = { - { "udata:packets:in", "User Data Messages ( In)" }, - { "udata:packets:out", "User Data Messages (Out)" }, - { "udata:bytes:in", "User Data Bytes ( In)" }, - { "udata:bytes:out", "User Data Bytes (Out)" }, + { "udata:packets:in", "User Data Messages ( In)" }, + { "udata:packets:out", "User Data Messages (Out)" }, + { "udata:bytes:in", "User Data Bytes ( In)" }, + { "udata:bytes:out", "User Data Bytes (Out)" }, }; static const struct rate_ctr_group_desc pdpctx_ctrg_desc = { -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30932 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I4d9145c681e725b709fde38f6e9b4516d37b4d8c Gerrit-Change-Number: 30932 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-sgsn[master]: vty: Introduce encryption cipher-plugin-path command
by pespin 12 Jan '23

12 Jan '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30909 ) Change subject: vty: Introduce encryption cipher-plugin-path command ...................................................................... vty: Introduce encryption cipher-plugin-path command The load of plugins will eventually be moved to libosmo-gprs implementation, and path will be passed as a parameter. Once it's moved inside libosmo-gprs, it will be more strict on load failures, which can cause internally if the path doesn't exist (unless NULL is passed). Hence, add a VTY config to allow configuring the right path, and have it disabled by default. Change-Id: I4f965c7afafa193f4d7486750dd3e43cca22bb65 --- M include/osmocom/sgsn/sgsn.h M src/sgsn/sgsn_main.c M src/sgsn/sgsn_vty.c M tests/osmo-sgsn_test-nodes.vty 4 files changed, 30 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified daniel: Looks good to me, but someone else must approve pespin: Looks good to me, approved dexter: Looks good to me, but someone else must approve lynxis lazus: Looks good to me, but someone else must approve diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h index 441a614..6e93178 100644 --- a/include/osmocom/sgsn/sgsn.h +++ b/include/osmocom/sgsn/sgsn.h @@ -77,6 +77,7 @@ /* misc */ struct gprs_ns2_inst *nsi; + char *crypt_cipher_plugin_path; enum sgsn_auth_policy auth_policy; uint8_t gea_encryption_mask; uint8_t uea_encryption_mask; diff --git a/src/sgsn/sgsn_main.c b/src/sgsn/sgsn_main.c index d9d454c..04de6a2 100644 --- a/src/sgsn/sgsn_main.c +++ b/src/sgsn/sgsn_main.c @@ -413,8 +413,6 @@ sgsn->cfg.nsi = sgsn_nsi; bssgp_set_bssgp_callback(sgsn_bssgp_dispatch_ns_unitdata_req_cb, sgsn_nsi); - gprs_llc_init("/usr/local/lib/osmocom/crypt/"); - gprs_ns2_vty_init(sgsn_nsi); bssgp_vty_init(); gprs_llc_vty_init(); @@ -449,6 +447,8 @@ if (rc < 0) exit(1); + gprs_llc_init(sgsn->cfg.crypt_cipher_plugin_path); + rc = sgsn_gtp_init(sgsn); if (rc) { LOGP(DGPRS, LOGL_FATAL, "Cannot bind/listen on GTP socket\n"); diff --git a/src/sgsn/sgsn_vty.c b/src/sgsn/sgsn_vty.c index 79764f1..b31fb59 100644 --- a/src/sgsn/sgsn_vty.c +++ b/src/sgsn/sgsn_vty.c @@ -282,6 +282,8 @@ vty_out(vty, "%s", VTY_NEWLINE); } + if (g_cfg->crypt_cipher_plugin_path) + vty_out(vty, "encryption cipher-plugin-path %s%s", g_cfg->crypt_cipher_plugin_path, VTY_NEWLINE); if (g_cfg->sgsn_ipa_name) vty_out(vty, " gsup ipa-name %s%s", g_cfg->sgsn_ipa_name, VTY_NEWLINE); if (g_cfg->gsup_server_addr.sin_addr.s_addr) @@ -839,6 +841,27 @@ return CMD_SUCCESS; } +DEFUN(cfg_encrypt_cipher_plugin_path, cfg_encrypt_cipher_plugin_path_cmd, + "encryption cipher-plugin-path PATH", + ENCRYPTION_STR + "Path to gprs encryption cipher plugin directory\n" + "Plugin path\n") +{ + osmo_talloc_replace_string(sgsn, &sgsn->cfg.crypt_cipher_plugin_path, argv[0]); + + return CMD_SUCCESS; +} + +DEFUN(cfg_no_encrypt_cipher_plugin_path, cfg_no_encrypt_cipher_plugin_path_cmd, + "no encryption cipher-plugin-path PATH", + NO_STR ENCRYPTION_STR + "Path to gprs encryption cipher plugin directory\n" + "Plugin path\n") +{ + TALLOC_FREE(sgsn->cfg.crypt_cipher_plugin_path); + return CMD_SUCCESS; +} + DEFUN(cfg_authentication, cfg_authentication_cmd, "authentication (optional|required)", "Whether to enforce MS authentication in GERAN (only with auth-policy remote)\n" @@ -1773,6 +1796,8 @@ install_element(SGSN_NODE, &cfg_encrypt2_cmd); install_element(SGSN_NODE, &cfg_encrypt_cmd); install_element(SGSN_NODE, &cfg_encryption_uea_cmd); + install_element(SGSN_NODE, &cfg_encrypt_cipher_plugin_path_cmd); + install_element(SGSN_NODE, &cfg_no_encrypt_cipher_plugin_path_cmd); install_element(SGSN_NODE, &cfg_gsup_ipa_name_cmd); install_element(SGSN_NODE, &cfg_gsup_remote_ip_cmd); diff --git a/tests/osmo-sgsn_test-nodes.vty b/tests/osmo-sgsn_test-nodes.vty index 22d81d2..4c65415 100644 --- a/tests/osmo-sgsn_test-nodes.vty +++ b/tests/osmo-sgsn_test-nodes.vty @@ -37,6 +37,8 @@ authentication (optional|required) encryption gea <0-4> [<0-4>] [<0-4>] [<0-4>] [<0-4>] encryption uea <0-2> [<0-2>] [<0-2>] + encryption cipher-plugin-path PATH + no encryption cipher-plugin-path PATH gsup ipa-name NAME gsup remote-ip A.B.C.D gsup remote-port <0-65535> -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30909 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I4f965c7afafa193f4d7486750dd3e43cca22bb65 Gerrit-Change-Number: 30909 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-sgsn[master]: vty: Introduce encryption cipher-plugin-path command
by pespin 12 Jan '23

12 Jan '23
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30909 ) Change subject: vty: Introduce encryption cipher-plugin-path command ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30909 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I4f965c7afafa193f4d7486750dd3e43cca22bb65 Gerrit-Change-Number: 30909 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Thu, 12 Jan 2023 14:41:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • ...
  • 221
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.