Change in osmo-gbproxy[master]: gbproxy: Route STATUS in PtP-BVC by TLLI/TMSI as well

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sun Oct 31 07:45:09 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gbproxy/+/26036 )

Change subject: gbproxy: Route STATUS in PtP-BVC by TLLI/TMSI as well
......................................................................

gbproxy: Route STATUS in PtP-BVC by TLLI/TMSI as well

Related: SYS#5235, OS#4892
Change-Id: Ib31c60ba840522719f307df089efeb8f4da1d9ae
---
M src/gb_proxy.c
1 file changed, 21 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/gb_proxy.c b/src/gb_proxy.c
index 18e0efb..7333e80 100644
--- a/src/gb_proxy.c
+++ b/src/gb_proxy.c
@@ -380,6 +380,8 @@
 	return gbprox_relay2peer(msg, sgsn_bvc, sig_bvci ? 0 : sgsn_bvc->bvci);
 }
 
+static int gbproxy_tlli_from_status_pdu(struct tlv_parsed *tp, uint32_t *tlli, char *log_pfx);
+
 /* Receive an incoming PTP message from a BSS-side NS-VC */
 static int gbprox_rx_ptp_from_bss(struct gbproxy_nse *nse, struct msgb *msg, uint16_t ns_bvci)
 {
@@ -496,12 +498,28 @@
 		osmo_fsm_inst_dispatch(bss_bvc->fi, BSSGP_BVCFSM_E_RX_FC_BVC, msg);
 		break;
 	case BSSGP_PDUT_STATUS:
-		/* TODO: Implement by inspecting the contained PDU */
-		if (!TLVP_PRESENT(&tp, BSSGP_IE_PDU_IN_ERROR))
+	{
+		struct gbproxy_sgsn *sgsn;
+		/* Check if the status needs to be terminated locally */
+		uint8_t cause = *TLVP_VAL(&tp, BSSGP_IE_CAUSE);
+
+		LOGPNSE(nse, LOGL_NOTICE, "Rx STATUS cause=0x%02x(%s)\n", cause,
+			bssgp_cause_str(cause));
+
+		if (gbproxy_tlli_from_status_pdu(&tp, &tlli, log_pfx) == 0)
+			sgsn = gbproxy_select_sgsn(nse->cfg, &tlli);
+		else
+			sgsn = gbproxy_select_sgsn(nse->cfg, NULL);
+
+		if (!sgsn) {
+			rc = -EINVAL;
 			break;
-		LOGPBVC(bss_bvc, LOGL_ERROR, "Rx %s: Implementation missing\n", pdut_name);
+		}
+
+		rc = gbprox_relay2nse(msg, sgsn->nse, ns_bvci);
 		break;
 	}
+	}
 
 	return 0;
 }

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gbproxy/+/26036
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: Ib31c60ba840522719f307df089efeb8f4da1d9ae
Gerrit-Change-Number: 26036
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211031/499221cd/attachment.htm>


More information about the gerrit-log mailing list