laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/34120 )
Change subject: sgsn_rim: get rid of MME check in sgsn_rim_rx_from_gtp:
......................................................................
sgsn_rim: get rid of MME check in sgsn_rim_rx_from_gtp:
There is no point in checking the MME any further. When the message has
reached this code path it is about to be forwarded to BSSGP, so the MME
does not play a role in the following code pathes.
The check also relys on the source RIM ROUTING INFORMATION IE inside the
RAN TRANSPARENT CONTAINER, which we are not supposed to decode.
Change-Id: I97c89aeb11537ae54d1fbea48c75619d8a92af61
Related: OS#6095
---
M include/osmocom/sgsn/sgsn_rim.h
M src/sgsn/sgsn_libgtp.c
M src/sgsn/sgsn_rim.c
3 files changed, 28 insertions(+), 22 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/include/osmocom/sgsn/sgsn_rim.h b/include/osmocom/sgsn/sgsn_rim.h
index aa5a726..f43b09a 100644
--- a/include/osmocom/sgsn/sgsn_rim.h
+++ b/include/osmocom/sgsn/sgsn_rim.h
@@ -3,4 +3,4 @@
struct sgsn_mme_ctx;
int sgsn_rim_rx_from_gb(struct osmo_bssgp_prim *bp, struct msgb *msg);
-int sgsn_rim_rx_from_gtp(struct bssgp_ran_information_pdu *pdu, struct sgsn_mme_ctx *mme);
+int sgsn_rim_rx_from_gtp(struct bssgp_ran_information_pdu *pdu);
diff --git a/src/sgsn/sgsn_libgtp.c b/src/sgsn/sgsn_libgtp.c
index 7c08e6f..156f730 100644
--- a/src/sgsn/sgsn_libgtp.c
+++ b/src/sgsn/sgsn_libgtp.c
@@ -712,7 +712,7 @@
}
msgb_free(msg);
- return sgsn_rim_rx_from_gtp(&pdu, mme);
+ return sgsn_rim_rx_from_gtp(&pdu);
ret_error:
msgb_free(msg);
diff --git a/src/sgsn/sgsn_rim.c b/src/sgsn/sgsn_rim.c
index 4ba672e..c4a4a78 100644
--- a/src/sgsn/sgsn_rim.c
+++ b/src/sgsn/sgsn_rim.c
@@ -91,35 +91,24 @@
}
/* Receive a RIM PDU from GTPv1C (EUTRAN) */
-int sgsn_rim_rx_from_gtp(struct bssgp_ran_information_pdu *pdu, struct sgsn_mme_ctx *mme)
+int sgsn_rim_rx_from_gtp(struct bssgp_ran_information_pdu *pdu)
{
- struct sgsn_mme_ctx *mme_tmp;
if (pdu->routing_info_src.discr != BSSGP_RIM_ROUTING_INFO_EUTRAN) {
- LOGMME(mme, DRIM, LOGL_ERROR, "Rx GTP RAN Information Relay: Expected src %s, got %s\n",
- bssgp_rim_routing_info_discr_str(BSSGP_RIM_ROUTING_INFO_EUTRAN),
- bssgp_rim_routing_info_discr_str(pdu->routing_info_src.discr));
+ LOGP(DRIM, LOGL_ERROR, "Rx GTP RAN Information Relay: Expected src %s, got %s\n",
+ bssgp_rim_routing_info_discr_str(BSSGP_RIM_ROUTING_INFO_EUTRAN),
+ bssgp_rim_routing_info_discr_str(pdu->routing_info_src.discr));
return -EINVAL;
}
if (pdu->routing_info_dest.discr != BSSGP_RIM_ROUTING_INFO_GERAN) {
- LOGMME(mme, DRIM, LOGL_ERROR, "Rx GTP RAN Information Relay: Expected dst %s, got %s\n",
- bssgp_rim_routing_info_discr_str(BSSGP_RIM_ROUTING_INFO_GERAN),
- bssgp_rim_routing_info_discr_str(pdu->routing_info_dest.discr));
+ LOGP(DRIM, LOGL_ERROR, "Rx GTP RAN Information Relay: Expected dst %s, got %s\n",
+ bssgp_rim_routing_info_discr_str(BSSGP_RIM_ROUTING_INFO_GERAN),
+ bssgp_rim_routing_info_discr_str(pdu->routing_info_dest.discr));
return -EINVAL;
}
- mme_tmp = sgsn_mme_ctx_by_route(sgsn, &pdu->routing_info_src.eutran.tai);
- if (!mme_tmp)/* See if we have a default route configured */
- mme_tmp = sgsn_mme_ctx_by_default_route(sgsn);
- if (mme != mme_tmp) {
- LOGP(DRIM, LOGL_ERROR, "Rx GTP RAN Information Relay: "
- "Source MME doesn't have RIM routing configured for TAI: %s\n",
- bssgp_rim_ri_name(&pdu->routing_info_src));
- return -EINVAL;
- }
-
- LOGMME(mme, DRIM, LOGL_INFO, "Rx GTP RAN Information Relay for dest cell %s\n",
- bssgp_rim_ri_name(&pdu->routing_info_dest));
+ LOGP(DRIM, LOGL_INFO, "Rx GTP RAN Information Relay for dest cell %s\n",
+ bssgp_rim_ri_name(&pdu->routing_info_dest));
return sgsn_bssgp_fwd_rim_to_geran(pdu);
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/34120
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I97c89aeb11537ae54d1fbea48c75619d8a92af61
Gerrit-Change-Number: 34120
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34117 )
Change subject: gprs_bssgp_rim: allow sending of encoded RIM messages
......................................................................
gprs_bssgp_rim: allow sending of encoded RIM messages
The API function bssgp_tx_rim() accepts decoded RIM PDU structs, encodes
them and eventually sends them. However, there may be cases where the
RIM PCU already exists in its encoded form. (This is in particular the
case when the RIM PDU is forwarded from GTP to BSSGP)
Lets add an API function bssgp_tx_rim_encoded to allow sending of
already encoded RIM PDUs
Related: OS#6095
Change-Id: Id4a793bbaf32d7b9d894dcc5be3faaf2f2d91d82
---
M include/osmocom/gprs/gprs_bssgp_rim.h
M src/gb/gprs_bssgp_rim.c
M src/gb/libosmogb.map
3 files changed, 39 insertions(+), 0 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/include/osmocom/gprs/gprs_bssgp_rim.h b/include/osmocom/gprs/gprs_bssgp_rim.h
index 5f397c9..4c0a57b 100644
--- a/include/osmocom/gprs/gprs_bssgp_rim.h
+++ b/include/osmocom/gprs/gprs_bssgp_rim.h
@@ -270,3 +270,4 @@
struct msgb *bssgp_encode_rim_pdu(const struct bssgp_ran_information_pdu *pdu);
int bssgp_tx_rim(const struct bssgp_ran_information_pdu *pdu, uint16_t nsei);
+int bssgp_tx_rim_encoded(struct msgb *msg, uint16_t nsei);
diff --git a/src/gb/gprs_bssgp_rim.c b/src/gb/gprs_bssgp_rim.c
index 55609ed..d7b19e7 100644
--- a/src/gb/gprs_bssgp_rim.c
+++ b/src/gb/gprs_bssgp_rim.c
@@ -1179,6 +1179,25 @@
return bssgp_ns_send(bssgp_ns_send_data, msg);
}
+/*! Send encoded RAN TRANSPARENT CONTAINER via BSSGP (3GPP TS 29.060, section 7.7.43).
+ * \param[in] msg user provided memory for the encoded RAN TRANSPARENT CONTAINER to be sent.
+ * (this function will take ownership of msg).
+ * \param[in] nsei BSSGP network service entity identifier (NSEI).
+ * \returns 0 on sccess, -EINVAL on error. */
+int bssgp_tx_rim_encoded(struct msgb *msg, uint16_t nsei)
+{
+ struct bssgp_normal_hdr *bgph;
+
+ msgb_nsei(msg) = nsei;
+ msgb_bvci(msg) = 0; /* Signalling */
+
+ bgph = (struct bssgp_normal_hdr *)msgb_bssgph(msg);
+ DEBUGP(DLBSSGP, "BSSGP BVCI=0 NSEI=%u Tx RIM-PDU:%s\n",
+ nsei, bssgp_pdu_str(bgph->pdu_type));
+
+ return bssgp_ns_send(bssgp_ns_send_data, msg);
+}
+
/* For internal use only (called from gprs_bssgp.c) */
int bssgp_rx_rim(struct msgb *msg, struct tlv_parsed *tp, uint16_t bvci)
{
diff --git a/src/gb/libosmogb.map b/src/gb/libosmogb.map
index e02273d..7dc427b 100644
--- a/src/gb/libosmogb.map
+++ b/src/gb/libosmogb.map
@@ -56,6 +56,7 @@
bssgp_tx_resume_ack;
bssgp_tx_resume_nack;
bssgp_tx_rim;
+bssgp_tx_rim_encoded;
bssgp_tx_simple_bvci;
bssgp_tx_status;
bssgp_tx_suspend;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34117
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id4a793bbaf32d7b9d894dcc5be3faaf2f2d91d82
Gerrit-Change-Number: 34117
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: pespin, dexter.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/34121 )
Change subject: sgsn_rim: do not check the origin of a RIM message
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
Patchset:
PS1:
> Yes, by looking at the src+dst address of the GTP message, one can know which peer it is (we hold th […]
I don't think the GGSN is involved.
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/34121
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Iea8176dcfe64c25d207bafc0ef61ca9d9ad415be
Gerrit-Change-Number: 34121
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 11 Aug 2023 06:23:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: dexter.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/34120 )
Change subject: sgsn_rim: get rid of MME check in sgsn_rim_rx_from_gtp:
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/34120
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I97c89aeb11537ae54d1fbea48c75619d8a92af61
Gerrit-Change-Number: 34120
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 11 Aug 2023 06:22:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: neels, pespin, msuraev.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273 )
Change subject: add static SS7 routing example to cs7-config.adoc
......................................................................
Patch Set 3:
(1 comment)
File common/chapters/cs7-config.adoc:
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273/comment/39d0eefe_cc48…
PS1, Line 365: Every component has a distinct M3UA port. For
> would be good to get feedback on whether I'm correct...
I don't immediately see a reason why the other side (BSC) would have to use a "distinct" port. To me, this reads like it must be "globally uniqe" within that setup.
It could just as well use the same port (e'g' M3UA standard port number) on all of the "sides" / "elements", right?
Like "asp mybsc-0 2905 2905 m3ua"?
I'm not saying you must change it, I am just confused by the implied assertion (at least the way I read it).
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I44afddf7004f5bf37eec706ca3da12c04f83f8fa
Gerrit-Change-Number: 32273
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: msuraev <msuraev(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 11 Aug 2023 06:21:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34132 )
Change subject: lapdm: Append RSL_IE_OSMO_ABS_FRAME_NUMBER to RSLms msgs towards upper layers
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
I'm not sure we want to introdcue more "TV" (instad of TLV) IEs. I think they used TV in the original specs only to conserve bandwidth - clearly not a concern these days (at this scale / usage). Especially non-standard IEs should be TLV so that a parser can skip them without knowing that this is a TV special case instead of the TLV normal case.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34132
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id62c18f49f270449067b25b7104eb8b47f1955ec
Gerrit-Change-Number: 34132
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 11 Aug 2023 06:14:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment