falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37180?usp=email )
Change subject: rtp2trau_hr16: set CRC bits correctly
......................................................................
rtp2trau_hr16: set CRC bits correctly
The code previously failed to set the CRC bits in the TRAU frame
output, containing a misleading comment that this operation is done
by the TRAU frame encoding function (it isn't). Set these bits
correctly in the rtp2trau step, like we do for EFR.
Change-Id: I5c8aa5891e3862f978f14093bff46bd00b6702a5
---
M src/trau/trau_rtp_conv.c
1 file changed, 17 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c
index 21322fc..b8f554c 100644
--- a/src/trau/trau_rtp_conv.c
+++ b/src/trau/trau_rtp_conv.c
@@ -47,7 +47,7 @@
/*
- * EFR TRAU parity
+ * EFR TRAU parity (also used for HR)
*
* g(x) = x^3 + x^1 + 1
*/
@@ -461,11 +461,12 @@
tf->ufi = 0;
else
tf->ufi = 1;
- /* CRC is computed by TRAU frame encoder */
if (data_len)
osmo_pbit2ubit(tf->d_bits, data, GSM_HR_BYTES * 8);
else
memset(tf->d_bits, 0, GSM_HR_BYTES * 8);
+ /* CRC is *not* computed by TRAU frame encoder - we have to do it */
+ osmo_crc8gen_set_bits(&gsm0860_efr_crc3, tf->d_bits, 44, tf->crc_bits);
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37180?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I5c8aa5891e3862f978f14093bff46bd00b6702a5
Gerrit-Change-Number: 37180
Gerrit-PatchSet: 2
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37181?usp=email )
Change subject: trau2rtp_hr16: check CRC bits in the TRAU frame
......................................................................
trau2rtp_hr16: check CRC bits in the TRAU frame
If CRC bits in the received TRAU frame are bad, the implication is
that this frame must have got corrupted in E1 transport. In this
case all other bits cannot be trusted, and we should deliver
BFI-no-data to RTP.
Change-Id: I4f97b67884ff7540be631298e5252d28f765fce9
---
M src/trau/trau_rtp_conv.c
1 file changed, 21 insertions(+), 0 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c
index d3d1cae..15d5a08 100644
--- a/src/trau/trau_rtp_conv.c
+++ b/src/trau/trau_rtp_conv.c
@@ -186,6 +186,7 @@
static int trau2rtp_hr16(uint8_t *out, size_t out_len, const struct osmo_trau_frame *tf, bool emit_twts002)
{
enum osmo_gsm631_sid_class sidc;
+ int rc;
if (tf->type != OSMO_TRAU16_FT_HR)
return -EINVAL;
@@ -195,6 +196,12 @@
/* HR Data Bits according to TS 48.061 Section 5.1.4.1.1 */
+ /* bad CRC means bad frame, no matter what else is going on */
+ rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, tf->d_bits, 44,
+ tf->crc_bits);
+ if (rc)
+ goto bad_frame;
+
sidc = (tf->c_bits[12] << 1) | tf->c_bits[13];
/* both C13 and C14 being set is invalid combination */
if (sidc > OSMO_GSM631_SID_CLASS_VALID)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37181?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I4f97b67884ff7540be631298e5252d28f765fce9
Gerrit-Change-Number: 37181
Gerrit-PatchSet: 3
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: laforge, neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273?usp=email )
Change subject: add static SS7 routing example to cs7-config.adoc
......................................................................
Patch Set 6: Code-Review+1
(1 comment)
File common/chapters/cs7-config.adoc:
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273/comment/cd8e1da8_1425…
PS5, Line 375: For static routing, the M3UA port numbers must be fixed, i.e. there must be no `0` for a client's local port as in
: `asp foo 2905 0 m3ua`. Instead, you may use `asp foo 2905 2905 m3ua`.
> sorry for not noticing the response... […]
With current state of things in libosmo-sccp (I think better management of IP addresses during socket creation also regarding primarys and so on) it should not be a problem, because you are using specific local-ip addresses, so the socket should not be announcing other IPs not listed there.
So let's merge as is I guess.
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273?usp=email
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: 6
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: msuraev <msuraev(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 11 Jun 2024 15:55:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37122?usp=email )
Change subject: sctp_proxy: add a safe wrapper for s1ap_proxy:handle_pdu/1
......................................................................
sctp_proxy: add a safe wrapper for s1ap_proxy:handle_pdu/1
We want to keep the SCTP connection alive even if we hit a bug in
s1ap_proxy:handle_pdu/1. Otherwise, all the PDN contexts of all
the subscribers served by the respective eNB will be killed.
Change-Id: Ie6a7c9ff40789695e37be11344f5ea97fbcb8cfa
---
M src/sctp_proxy.erl
1 file changed, 27 insertions(+), 4 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/src/sctp_proxy.erl b/src/sctp_proxy.erl
index 9f9072b..29cc425 100644
--- a/src/sctp_proxy.erl
+++ b/src/sctp_proxy.erl
@@ -155,8 +155,7 @@
{[#sctp_sndrcvinfo{assoc_id = Aid}], Data}}, S) ->
logger:debug("MME connection (id=~p, ~p:~p) -> eNB: ~p",
[Aid, MmeAddr, MmePort, Data]),
- sctp_server:send_data(maps:get(enb_aid, S),
- s1ap_proxy:handle_pdu(Data)),
+ sctp_server:send_data(maps:get(enb_aid, S), handle_pdu(Data)),
{keep_state, S};
%% Catch-all for other kinds of SCTP events
@@ -193,10 +192,21 @@
%% private API
%% ------------------------------------------------------------------
+%% A safe wrapper for s1ap_proxy:handle_pdu/1
+-spec handle_pdu(binary()) -> binary().
+handle_pdu(Data) when is_binary(Data) ->
+ try s1ap_proxy:handle_pdu(Data) of
+ NewData -> NewData
+ catch
+ Exception:Reason ->
+ logger:error("An exception occurred: ~p, ~p", [Exception, Reason]),
+ Data %% proxy as-is
+ end.
+
+
%% Send a single message to the MME
sctp_send(#{sock := Sock, mme_aid := Aid}, Data) ->
- sctp_client:send_data({Sock, Aid},
- s1ap_proxy:handle_pdu(Data)).
+ sctp_client:send_data({Sock, Aid}, handle_pdu(Data)).
%% Send pending messages to the MME
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37122?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: Ie6a7c9ff40789695e37be11344f5ea97fbcb8cfa
Gerrit-Change-Number: 37122
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged