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

July 2024

  • 1 participants
  • 1379 discussions
[S] Change in pysim[master]: pySim.commands: make use of status word interpreter for CHV
by laforge 31 Jul '24

31 Jul '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37651?usp=email ) Change subject: pySim.commands: make use of status word interpreter for CHV ...................................................................... pySim.commands: make use of status word interpreter for CHV Related: OS#6398 Change-Id: I71efe9d6804c4845bb81f1b3b443215dad0ac301 --- M pySim/commands.py 1 file changed, 11 insertions(+), 1 deletion(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim/commands.py b/pySim/commands.py index 3f659eb..43fc705 100644 --- a/pySim/commands.py +++ b/pySim/commands.py @@ -679,7 +679,7 @@ raise RuntimeError('Failed to %s chv_no 0x%02X with code 0x%s, %i tries left.' % (op_name, chv_no, b2h(pin_code).upper(), int(sw[3]))) if sw != '9000': - raise SwMatchError(sw, '9000') + raise SwMatchError(sw, '9000', self._tp.sw_interpreter) def verify_chv(self, chv_no: int, code: Hexstr) -> ResTuple: """Verify a given CHV (Card Holder Verification == PIN) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37651?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I71efe9d6804c4845bb81f1b3b443215dad0ac301 Gerrit-Change-Number: 37651 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-bsc[rel-1.12.1]: osmo_bsc_sigtran: Don't try to decode ipaccess_head a second time
by daniel 31 Jul '24

31 Jul '24
Attention is currently required from: laforge, osmith, pespin. daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/37674?usp=email ) Change subject: osmo_bsc_sigtran: Don't try to decode ipaccess_head a second time ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > Is this really a bug? Is it a problem doing it twice? […] The second time it parses the wrong data so ctrl messages in sccplite are no longer decoded correctly. See https://projects.osmocom.org/issues/6422 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/37674?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: rel-1.12.1 Gerrit-Change-Id: I300bbab3c0215d52bc5f6232ace5c37a6613feb7 Gerrit-Change-Number: 37674 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 31 Jul 2024 17:27:46 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-pcu[master]: tbf_ul_ass_fsm: Clarify use of X2000 timer
by fixeria 31 Jul '24

31 Jul '24
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/37669?usp=email ) Change subject: tbf_ul_ass_fsm: Clarify use of X2000 timer ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/37669?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iee27d1b2a8ddac53e14efd20a8c8aec35de58174 Gerrit-Change-Number: 37669 Gerrit-PatchSet: 2 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-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 31 Jul 2024 17:26:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-netif[rel-1.5.1]: ipa: Ensure osmo_ipa_segmentation_cb sets msg->l2h to the payload data
by pespin 31 Jul '24

31 Jul '24
Attention is currently required from: daniel, laforge, osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/37673?usp=email ) Change subject: ipa: Ensure osmo_ipa_segmentation_cb sets msg->l2h to the payload data ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > Yeah, I think this happens in step 5 of the process here: […] You are expected to submit it together with the release commit which has the tag, since otherwise you are basically submitting/merging to a temporary branch. -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/37673?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: rel-1.5.1 Gerrit-Change-Id: Id91cddf9948ca49abf092850fae3a8f17e445b45 Gerrit-Change-Number: 37673 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Wed, 31 Jul 2024 17:20:57 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-netif[rel-1.5.1]: ipa: Ensure osmo_ipa_segmentation_cb sets msg->l2h to the payload data
by daniel 31 Jul '24

31 Jul '24
Attention is currently required from: laforge, osmith, pespin. daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/37673?usp=email ) Change subject: ipa: Ensure osmo_ipa_segmentation_cb sets msg->l2h to the payload data ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > AFAIU this should come with an extra commit with the release? Yeah, I think this happens in step 5 of the process here: https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_releas… -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/37673?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: rel-1.5.1 Gerrit-Change-Id: Id91cddf9948ca49abf092850fae3a8f17e445b45 Gerrit-Change-Number: 37673 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 31 Jul 2024 17:19:52 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ggsn[master]: gtp: Allow setting callback to receive update_context_ind
by pespin 31 Jul '24

31 Jul '24
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/37597?usp=email ) Change subject: gtp: Allow setting callback to receive update_context_ind ...................................................................... Patch Set 4: (1 comment) Patchset: PS3: > likewise, TODO-RELEASE for ABI change? Done -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/37597?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: Ic80a9a928c55b6ff85be96014920bb42793cb943 Gerrit-Change-Number: 37597 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 31 Jul 2024 17:19:36 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ggsn[master]: gtp: Store rx Direct Tunnel Flags in UpdatePDPCtx{Req,Resp}
by pespin 31 Jul '24

31 Jul '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/37595?usp=email ) Change subject: gtp: Store rx Direct Tunnel Flags in UpdatePDPCtx{Req,Resp} ...................................................................... gtp: Store rx Direct Tunnel Flags in UpdatePDPCtx{Req,Resp} In Update PDP Ctx Response, only SGSN is expected to transmit Direct Tunnel Flags in the message. Related: SYS#5435 Change-Id: Ia3e360a35d30858eab1e438dc2508fd756c2e22e --- M gtp/gtp.c 1 file changed, 24 insertions(+), 0 deletions(-) Approvals: pespin: Looks good to me, approved laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/gtp/gtp.c b/gtp/gtp.c index 62cad60..8736cad 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -1984,6 +1984,11 @@ } /* OMC identity */ + + /* Direct Tunnel Flags */ + if (gtpie_gettlv(ie, GTPIE_DIR_TUN_FLAGS, 0, &pdp->dir_tun_flags.l, + &pdp->dir_tun_flags.v, sizeof(pdp->dir_tun_flags.v))) { + } } /* Confirm to peer that things were "successful" */ @@ -2093,6 +2098,12 @@ &pdp->qos_neg.v, sizeof(pdp->qos_neg.v))) { goto err_missing; } + + /* Direct Tunnel Flags */ + if (gsn->mode == GTP_MODE_GGSN && + gtpie_gettlv(ie, GTPIE_DIR_TUN_FLAGS, 0, &pdp->dir_tun_flags.l, + &pdp->dir_tun_flags.v, sizeof(pdp->dir_tun_flags.v))) { + } } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/37595?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: Ia3e360a35d30858eab1e438dc2508fd756c2e22e Gerrit-Change-Number: 37595 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ggsn[master]: gtp: Allow tx Direct Tunnel Flags in UpdatePDPCtx{Req,Resp}
by pespin 31 Jul '24

31 Jul '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/37594?usp=email ) Change subject: gtp: Allow tx Direct Tunnel Flags in UpdatePDPCtx{Req,Resp} ...................................................................... gtp: Allow tx Direct Tunnel Flags in UpdatePDPCtx{Req,Resp} In Update PDP Ctx Response, only SGSN is expected to transmit Direct Tunnel Flags in the message. Related: SYS#5435 Change-Id: I36d93619e2fe9cafd3092515df18b82d29099d2d --- M TODO-RELEASE M gtp/gtp.c M include/osmocom/gtp/pdp.h 3 files changed, 31 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index 0ed7189..1815fce 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libgtp append new field dir_tun_flags in struct pdp_t (older users not using the field should be fine since struct pdp_t is allocated internally) diff --git a/gtp/gtp.c b/gtp/gtp.c index 245927b..62cad60 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -1686,6 +1686,11 @@ gtpie_tlv(&packet, &length, GTP_MAX, GTPIE_OMC_ID, pdp->omcid.l, pdp->omcid.v); + /* Direct Tunnel Flags */ + if ((pdp->version == 1) && pdp->dir_tun_flags.l) + gtpie_tlv(&packet, &length, GTP_MAX, GTPIE_DIR_TUN_FLAGS, + pdp->dir_tun_flags.l, pdp->dir_tun_flags.v); + gtp_req(gsn, pdp->version, pdp, &packet, length, inetaddr, cbp); return 0; @@ -1747,6 +1752,11 @@ pdp->qos_neg.l, pdp->qos_neg.v); /* TODO: Charging gateway address */ + + /* Direct Tunnel Flags */ + if ((gsn->mode == GTP_MODE_SGSN) && (version == 1) && pdp->dir_tun_flags.l) + gtpie_tlv(&packet, &length, GTP_MAX, GTPIE_DIR_TUN_FLAGS, + pdp->dir_tun_flags.l, pdp->dir_tun_flags.v); } return gtp_resp(version, gsn, pdp, &packet, length, peer, diff --git a/include/osmocom/gtp/pdp.h b/include/osmocom/gtp/pdp.h index 4dcdde4..da4a382 100644 --- a/include/osmocom/gtp/pdp.h +++ b/include/osmocom/gtp/pdp.h @@ -46,6 +46,11 @@ unsigned char *v; }; +struct ul1_t { + unsigned int l; + unsigned char v[1]; +}; + struct ul16_t { unsigned int l; unsigned char v[16]; @@ -244,6 +249,8 @@ bool tx_gpdu_seq; /* Transmit (true) or suppress G-PDU sequence numbers */ struct llist_head qmsg_list_req; /* list of req qmsg_t in retrans queue belonging this pdp ctx */ + + struct ul1_t dir_tun_flags; /* Direct Tunnel Flags, TS 29.060 7.7.81 */ }; /* functions related to pdp_t management */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/37594?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I36d93619e2fe9cafd3092515df18b82d29099d2d Gerrit-Change-Number: 37594 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(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
[S] Change in osmo-ggsn[master]: gtp: Allow UpdatePDPContext initiated by GGSN
by pespin 31 Jul '24

31 Jul '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/37666?usp=email ) Change subject: gtp: Allow UpdatePDPContext initiated by GGSN ...................................................................... gtp: Allow UpdatePDPContext initiated by GGSN The Update PDP Context procedure can be initiated GGSN -> SGSN, as described in TS 29.060 7.3.3. Related: OS#6512 Change-Id: I1c3441c71b90c5bbf6f4545484586222e6180fe1 --- M gtp/gtp.c 1 file changed, 26 insertions(+), 13 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/gtp/gtp.c b/gtp/gtp.c index 8736cad..9b68315 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -1899,8 +1899,9 @@ } if (version == 1) { - /* TEID (mandatory) */ - if (gtpie_gettv4(ie, GTPIE_TEI_DI, 0, &pdp->teid_gn)) { + /* TEID (mandatory SGSN->GGSN, Optional SGSN<-GGSN) */ + if (gtpie_gettv4(ie, GTPIE_TEI_DI, 0, &pdp->teid_gn) && + gsn->mode == GTP_MODE_GGSN) { rate_ctr_inc2(gsn->ctrg, GSN_CTR_PKT_MISSING); GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Missing mandatory information field\n"); @@ -1954,9 +1955,10 @@ pdp, GTPCAUSE_MAN_IE_MISSING); } - /* SGSN address for user traffic (mandatory) */ + /* SGSN address for user traffic (mandatory SGSN->GGSN, optional SGSN<-GGSN) */ if (gtpie_gettlv(ie, GTPIE_GSN_ADDR, 1, &pdp->gsnru.l, - &pdp->gsnru.v, sizeof(pdp->gsnru.v))) { + &pdp->gsnru.v, sizeof(pdp->gsnru.v)) && + gsn->mode == GTP_MODE_GGSN) { rate_ctr_inc2(gsn->ctrg, GSN_CTR_PKT_MISSING); GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Missing mandatory information field\n"); @@ -1966,9 +1968,10 @@ } if (version == 1) { - /* QoS (mandatory) */ + /* QoS (mandatory SGSN->GGSN, optional SGSN<-GGSN) */ if (gtpie_gettlv(ie, GTPIE_QOS_PROFILE, 0, &pdp->qos_req.l, - &pdp->qos_req.v, sizeof(pdp->qos_req.v))) { + &pdp->qos_req.v, sizeof(pdp->qos_req.v)) && + gsn->mode == GTP_MODE_GGSN) { rate_ctr_inc2(gsn->ctrg, GSN_CTR_PKT_MISSING); GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Missing mandatory information field\n"); @@ -1978,7 +1981,7 @@ GTPCAUSE_MAN_IE_MISSING); } - /* TFT (conditional) */ + /* TFT (conditional SGSN->GGSN, optional SGSN<-GGSN) */ if (gtpie_gettlv(ie, GTPIE_TFT, 0, &pdp->tft.l, &pdp->tft.v, sizeof(pdp->tft.v))) { } @@ -2100,8 +2103,7 @@ } /* Direct Tunnel Flags */ - if (gsn->mode == GTP_MODE_GGSN && - gtpie_gettlv(ie, GTPIE_DIR_TUN_FLAGS, 0, &pdp->dir_tun_flags.l, + if (gtpie_gettlv(ie, GTPIE_DIR_TUN_FLAGS, 0, &pdp->dir_tun_flags.l, &pdp->dir_tun_flags.v, sizeof(pdp->dir_tun_flags.v))) { } } @@ -2820,8 +2822,7 @@ } if ((gsn->mode == GTP_MODE_GGSN) && - ((pheader->type == GTP_CREATE_PDP_RSP) || - (pheader->type == GTP_UPDATE_PDP_RSP))) { + (pheader->type == GTP_CREATE_PDP_RSP)) { rate_ctr_inc2(gsn->ctrg, GSN_CTR_PKT_UNEXPECT); GTP_LOGPKG(LOGL_ERROR, &peer, buffer, status, @@ -2831,8 +2832,7 @@ } if ((gsn->mode == GTP_MODE_SGSN) && - ((pheader->type == GTP_CREATE_PDP_REQ) || - (pheader->type == GTP_UPDATE_PDP_REQ))) { + (pheader->type == GTP_CREATE_PDP_REQ)) { rate_ctr_inc2(gsn->ctrg, GSN_CTR_PKT_UNEXPECT); GTP_LOGPKG(LOGL_ERROR, &peer, buffer, status, -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/37666?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I1c3441c71b90c5bbf6f4545484586222e6180fe1 Gerrit-Change-Number: 37666 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ggsn[master]: gtp: Allow setting callback to receive update_context_ind
by pespin 31 Jul '24

31 Jul '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/37597?usp=email ) Change subject: gtp: Allow setting callback to receive update_context_ind ...................................................................... gtp: Allow setting callback to receive update_context_ind This will be used by: * SGSN: Get to know that RNC has gonne down according to GGSN (re-attempt Direct Tunnel or go back to tun SGSN<->GGSN). * GGSN: Maybe find out that Direct Flags are used (should be handled internally directly in the rx path probably) Related: OS#6512 Change-Id: Ic80a9a928c55b6ff85be96014920bb42793cb943 --- M TODO-RELEASE M gtp/gsn.c M gtp/gtp.c M include/osmocom/gtp/gsn.h M include/osmocom/gtp/gtp.h 5 files changed, 91 insertions(+), 27 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index 1815fce..905c234 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -8,3 +8,5 @@ # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line libgtp append new field dir_tun_flags in struct pdp_t (older users not using the field should be fine since struct pdp_t is allocated internally) +libgtp ABI break new field cb_create_context_ind in struct gsn_t +libgtp new API gtp_set_cb_update_context_ind(), gtp_update_context_resp() \ No newline at end of file diff --git a/gtp/gsn.c b/gtp/gsn.c index c23fb2a..612baf2 100644 --- a/gtp/gsn.c +++ b/gtp/gsn.c @@ -497,6 +497,7 @@ /* Initialise call back functions */ (*gsn)->cb_create_context_ind = 0; + (*gsn)->cb_update_context_ind = 0; (*gsn)->cb_delete_context = 0; (*gsn)->cb_unsup_ind = 0; (*gsn)->cb_conf = 0; @@ -563,6 +564,13 @@ return 0; } +int gtp_set_cb_update_context_ind(struct gsn_t *gsn, + int (*cb_update_context_ind)(struct pdp_t *pdp)) +{ + gsn->cb_update_context_ind = cb_update_context_ind; + return 0; +} + int gtp_retrans(struct gsn_t *gsn) { /* dummy API, deprecated. */ diff --git a/gtp/gtp.c b/gtp/gtp.c index 9b68315..02cf8a3 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -1696,10 +1696,11 @@ return 0; } + /* Send Update PDP Context Response */ static int gtp_update_pdp_resp(struct gsn_t *gsn, uint8_t version, struct sockaddr_in *peer, int fd, - void *pack, unsigned len, + uint16_t seq, uint64_t tid, struct pdp_t *pdp, uint8_t cause) { @@ -1760,7 +1761,22 @@ } return gtp_resp(version, gsn, pdp, &packet, length, peer, - fd, get_seq(pack), get_tid(pack)); + fd, seq, tid); +} + + +/* API: Application response to context indication */ +int gtp_update_context_resp(struct gsn_t *gsn, struct pdp_t *pdp, int cause) +{ + + /* Now send off a reply to the peer */ + gtp_update_pdp_resp(gsn, pdp->version, &pdp->sa_peer, + pdp->fd, pdp->seq, pdp->tid, pdp, cause); + + if (!gtp_cause_successful(cause)) + gtp_freepdp(gsn, pdp); + + return 0; } /* Handle Update PDP Context Request */ @@ -1768,13 +1784,15 @@ struct sockaddr_in *peer, int fd, void *pack, unsigned len) { - struct pdp_t *pdp; + struct pdp_t *pdp = NULL; struct pdp_t pdp_backup; union gtpie_member *ie[GTPIE_SIZE]; uint8_t recovery; + int rc; uint16_t seq = get_seq(pack); int hlen = get_hlen(pack); + uint64_t tid = get_tid(pack); uint64_t imsi; uint8_t nsapi; @@ -1792,8 +1810,8 @@ if (0 == version) return EOF; else - return gtp_update_pdp_resp(gsn, version, peer, fd, pack, - len, NULL, + return gtp_update_pdp_resp(gsn, version, peer, fd, seq, + tid, NULL, GTPCAUSE_INVALID_MESSAGE); } @@ -1808,8 +1826,8 @@ GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context: TID=0x%" PRIx64 "\n", get_tid(pack)); - return gtp_update_pdp_resp(gsn, version, peer, fd, pack, - len, NULL, + return gtp_update_pdp_resp(gsn, version, peer, fd, seq, + tid, NULL, GTPCAUSE_NON_EXIST); } @@ -1821,8 +1839,8 @@ rate_ctr_inc2(gsn->ctrg, GSN_CTR_PKT_MISSING); GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Missing mandatory information field\n"); - return gtp_update_pdp_resp(gsn, version, peer, fd, pack, - len, NULL, + return gtp_update_pdp_resp(gsn, version, peer, fd, seq, + tid, NULL, GTPCAUSE_MAN_IE_MISSING); } @@ -1835,7 +1853,7 @@ "Unknown PDP context: TEI=0x%" PRIx32 "\n", get_tei(pack)); return gtp_update_pdp_resp(gsn, version, peer, - fd, pack, len, NULL, + fd, seq, tid, NULL, GTPCAUSE_NON_EXIST); } } else { @@ -1846,7 +1864,7 @@ "Unknown PDP context: IMSI=0x%" PRIx64 " NSAPI=%" PRIu8 "\n", imsi, nsapi); return gtp_update_pdp_resp(gsn, version, peer, - fd, pack, len, NULL, + fd, seq, tid, NULL, GTPCAUSE_NON_EXIST); } } @@ -1855,6 +1873,12 @@ return EOF; } + /* Update internal state to be used when user calls gtp_update_context_resp(): */ + pdp->seq = seq; + pdp->sa_peer = *peer; + pdp->fd = fd; + pdp->version = version; + /* Make a backup copy in case anything is wrong */ memcpy(&pdp_backup, pdp, sizeof(pdp_backup)); @@ -1865,8 +1889,8 @@ GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Missing mandatory information field\n"); memcpy(pdp, &pdp_backup, sizeof(pdp_backup)); - return gtp_update_pdp_resp(gsn, version, peer, fd, pack, - len, pdp, + return gtp_update_pdp_resp(gsn, version, peer, fd, seq, + tid, pdp, GTPCAUSE_MAN_IE_MISSING); } } @@ -1882,8 +1906,8 @@ GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Missing mandatory information field\n"); memcpy(pdp, &pdp_backup, sizeof(pdp_backup)); - return gtp_update_pdp_resp(gsn, version, peer, fd, pack, - len, pdp, + return gtp_update_pdp_resp(gsn, version, peer, fd, seq, + tid, pdp, GTPCAUSE_MAN_IE_MISSING); } @@ -1892,8 +1916,8 @@ GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Missing mandatory information field\n"); memcpy(pdp, &pdp_backup, sizeof(pdp_backup)); - return gtp_update_pdp_resp(gsn, version, peer, fd, pack, - len, pdp, + return gtp_update_pdp_resp(gsn, version, peer, fd, seq, + tid, pdp, GTPCAUSE_MAN_IE_MISSING); } } @@ -1906,8 +1930,8 @@ GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Missing mandatory information field\n"); memcpy(pdp, &pdp_backup, sizeof(pdp_backup)); - return gtp_update_pdp_resp(gsn, version, peer, fd, pack, - len, pdp, + return gtp_update_pdp_resp(gsn, version, peer, fd, seq, + tid, pdp, GTPCAUSE_MAN_IE_MISSING); } @@ -1923,8 +1947,8 @@ GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Missing mandatory information field\n"); memcpy(pdp, &pdp_backup, sizeof(pdp_backup)); - return gtp_update_pdp_resp(gsn, version, peer, fd, pack, - len, pdp, + return gtp_update_pdp_resp(gsn, version, peer, fd, seq, + tid, pdp, GTPCAUSE_MAN_IE_MISSING); } } @@ -1951,7 +1975,7 @@ GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Missing mandatory information field\n"); memcpy(pdp, &pdp_backup, sizeof(pdp_backup)); - return gtp_update_pdp_resp(gsn, version, peer, fd, pack, len, + return gtp_update_pdp_resp(gsn, version, peer, fd, seq, tid, pdp, GTPCAUSE_MAN_IE_MISSING); } @@ -1963,7 +1987,7 @@ GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Missing mandatory information field\n"); memcpy(pdp, &pdp_backup, sizeof(pdp_backup)); - return gtp_update_pdp_resp(gsn, version, peer, fd, pack, len, + return gtp_update_pdp_resp(gsn, version, peer, fd, seq, tid, pdp, GTPCAUSE_MAN_IE_MISSING); } @@ -1976,8 +2000,8 @@ GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Missing mandatory information field\n"); memcpy(pdp, &pdp_backup, sizeof(pdp_backup)); - return gtp_update_pdp_resp(gsn, version, peer, fd, pack, - len, pdp, + return gtp_update_pdp_resp(gsn, version, peer, fd, seq, + tid, pdp, GTPCAUSE_MAN_IE_MISSING); } @@ -1994,9 +2018,17 @@ } } + /* Callback function to validate login */ + if (gsn->cb_update_context_ind != 0) + rc = gsn->cb_update_context_ind(pdp); + else { + /* Confirm to peer that things were "successful" */ + rc = gtp_update_pdp_resp(gsn, version, peer, fd, seq, tid, pdp, + GTPCAUSE_ACC_REQ); + } + /* Confirm to peer that things were "successful" */ - return gtp_update_pdp_resp(gsn, version, peer, fd, pack, len, pdp, - GTPCAUSE_ACC_REQ); + return rc; } /* Handle Update PDP Context Response */ diff --git a/include/osmocom/gtp/gsn.h b/include/osmocom/gtp/gsn.h index 936db9b..006fdfd 100644 --- a/include/osmocom/gtp/gsn.h +++ b/include/osmocom/gtp/gsn.h @@ -99,6 +99,7 @@ /* Call back functions */ int (*cb_delete_context) (struct pdp_t *); int (*cb_create_context_ind) (struct pdp_t *); + int (*cb_update_context_ind)(struct pdp_t *pdp); int (*cb_unsup_ind) (struct sockaddr_in * peer); int (*cb_extheader_ind) (struct sockaddr_in * peer); int (*cb_ran_info_relay_ind) (struct sockaddr_in *peer, union gtpie_member **ie); @@ -134,6 +135,8 @@ int (*cb_create_context_ind) (struct pdp_t * pdp)); +extern int gtp_set_cb_update_context_ind(struct gsn_t *gsn, + int (*cb_update_context_ind)(struct pdp_t *pdp)); extern int gtp_set_cb_data_ind(struct gsn_t *gsn, int (*cb_data_ind) (struct pdp_t * pdp, void *pack, unsigned len)); diff --git a/include/osmocom/gtp/gtp.h b/include/osmocom/gtp/gtp.h index e3c66c9..001a696 100644 --- a/include/osmocom/gtp/gtp.h +++ b/include/osmocom/gtp/gtp.h @@ -248,6 +248,9 @@ extern int gtp_update_context(struct gsn_t *gsn, struct pdp_t *pdp, void *cbp, struct in_addr *inetaddr); +extern int gtp_update_context_resp(struct gsn_t *gsn, struct pdp_t *pdp, + int cause); + extern int gtp_delete_context_req(struct gsn_t *gsn, struct pdp_t *pdp, void *cbp, int teardown) OSMO_DEPRECATED("Use gtp_delete_context_req2() instead, to avoid freeing pdp ctx before reply"); -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/37597?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: Ic80a9a928c55b6ff85be96014920bb42793cb943 Gerrit-Change-Number: 37597 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • ...
  • 138
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.