neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/37282?usp=email )
Change subject: do not FAIL on CRCX in sendrecv mode
......................................................................
do not FAIL on CRCX in sendrecv mode
Currently, a CRCX in sendrecv mode results in:
DLMGCP ERROR endpoint:rtpbridge/2@mgw CI:7F4C8EDD CRCX: selected connection mode type requires an opposite end! (mgcp_protocol.c:1090)
But it is not actually practical, nor logical to require another conn
for the 'sendrecv' ConnectionMode.
Impractical: If I want to create two conns on an endpoint that both are
in 'sendrecv' mode, I have to send two CRCX, one for each conn. At the
time of the first CRCX, there cannot be any other conn, so I am
currently forced to send a different ConnectionMode in the CRCX,
followed by another MDCX later, just to change the first conn to
sendrecv.
Illogical: In a situation where two conns are currently in sendrecv
mode, if I now DLCX one of them, I can legally reach a state with a
single conn in sendrecv mode, just as currently forbidden for CRCX.
In general, MGCP is not forcing any particular number of connections.
Simply start forwarding RTP as soon as there is a remote conn, and not
require another explicit MDCX.
Related: SYS#6974 SYS#6907
Related: osmo-ttcn3-hacks I00fd854f058f7f53e2f579e8481ca2b9253f08e3
Change-Id: Ic089485543c5c97a35c7ae24fe0f622bf57d1976
---
M src/libosmo-mgcp/mgcp_protocol.c
M tests/mgcp/mgcp_test.c
M tests/mgcp/mgcp_test.ok
3 files changed, 46 insertions(+), 25 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index ac5c682..16dee03 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -1083,17 +1083,6 @@
mgcp_rtp_end_config(endp, 0, &conn->end);
- /* check connection mode setting */
- if (conn->conn->mode != MGCP_CONN_LOOPBACK
- && conn->conn->mode != MGCP_CONN_RECV_ONLY
- && osmo_sockaddr_port(&conn->end.addr.u.sa) == 0) {
- LOGPCONN(_conn, DLMGCP, LOGL_ERROR,
- "CRCX: selected connection mode type requires an opposite end!\n");
- error_code = 527;
- rate_ctr_inc(rate_ctr_group_get_ctr(rate_ctrs, MGCP_CRCX_FAIL_NO_REMOTE_CONN_DESC));
- goto error2;
- }
-
/* Find a local address for conn based on policy and initial SDP remote
information, then find a free port for it */
if (mgcp_get_local_addr(conn->end.local_addr, conn) < 0) {
@@ -1295,17 +1284,6 @@
if (conn->type == MGCP_RTP_DEFAULT && strcmp(conn->end.codec->subtype_name, "VND.3GPP.IUFP") == 0)
rc = mgcp_conn_iuup_init(conn);
- /* check connection mode setting */
- if (conn->conn->mode != MGCP_CONN_LOOPBACK
- && conn->conn->mode != MGCP_CONN_RECV_ONLY
- && !mgcp_rtp_end_remote_addr_available(&conn->end)) {
- LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR,
- "MDCX: selected connection mode type requires an opposite end!\n");
- error_code = 527;
- rate_ctr_inc(rate_ctr_group_get_ctr(rate_ctrs, MGCP_MDCX_FAIL_NO_REMOTE_CONN_DESC));
- goto error3;
- }
-
if (mgcp_conn_rtp_is_osmux(conn)) {
OSMO_ASSERT(conn->osmux.local_cid_allocated);
if (remote_osmux_cid < -1) {
diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c
index 2e06639..21be037 100644
--- a/tests/mgcp/mgcp_test.c
+++ b/tests/mgcp/mgcp_test.c
@@ -145,7 +145,16 @@
"a=ptime:20\r\n"
#define MDCX4_ADDR0000_RET \
- "527 18983216 FAIL\r\n"
+ "200 18983216 OK\r\n" \
+ "\r\n" \
+ "v=0\r\n" \
+ "o=- %s 23 IN IP4 0.0.0.0\r\n" \
+ "s=-\r\n" \
+ "c=IN IP4 0.0.0.0\r\n" \
+ "t=0 0\r\n" \
+ "m=audio 16002 RTP/AVP 99\r\n" \
+ "a=rtpmap:99 AMR/8000\r\n" \
+ "a=ptime:20\r\n"
#define MDCX4 \
"MDCX 18983217 1@mgw MGCP 1.0\r\n" \
diff --git a/tests/mgcp/mgcp_test.ok b/tests/mgcp/mgcp_test.ok
index 5dc00cd..4e72145 100644
--- a/tests/mgcp/mgcp_test.ok
+++ b/tests/mgcp/mgcp_test.ok
@@ -116,9 +116,9 @@
---------8<---------
checking response:
-using message as statically defined for comparison
+using message with patched conn_id for comparison
Response matches our expectations.
-(response does not contain a connection id)
+(response contains a connection id)
================================================
Testing MDCX4
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/37282?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ic089485543c5c97a35c7ae24fe0f622bf57d1976
Gerrit-Change-Number: 37282
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37317?usp=email )
Change subject: erab_fsm: E-RAB FSM implementation
......................................................................
Patch Set 1:
(2 comments)
File src/erab_fsm.erl:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-16895):
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37317/comment/2b61d079_e483…
PS1, Line 85: %% @param TEID TEID choosen by the eNB.
'choosen' may be misspelled - perhaps 'chosen'?
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-16895):
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37317/comment/2cf240b5_78bb…
PS1, Line 96: %% @param TEID TEID choosen by the core.
'choosen' may be misspelled - perhaps 'chosen'?
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37317?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: Ic57e14675339b7cadb0cdd7cbc5d3a56288d7297
Gerrit-Change-Number: 37317
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Mon, 01 Jul 2024 21:59:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: falconia.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/37311?usp=email )
Change subject: fix E1 TS output when used with osmo-e1d
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-mgw/+/37311/comment/a937735b_e4490875
PS1, Line 16: correctly.
This commit log could just say:
"Use proper API e1inp_ts_send_raw() to enqueue messages in ts->raw.tx_queue, so that e1inp driver notification works properly."
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/37311?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I6ce9a1dea6834632faf75059e85ca9a0c25d57c2
Gerrit-Change-Number: 37311
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Comment-Date: Tue, 02 Jul 2024 02:18:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1d/+/37321?usp=email )
Change subject: mux from not-started raw TS: fill with 0xFF
......................................................................
mux from not-started raw TS: fill with 0xFF
When the channelized mux reads from a raw TS, but that raw TS is
not in tx_started state yet, the read function returns "fake" data.
However, it was actually returning uninitialized memory content,
rather than 0xFF filler used everywhere else, thereby transmitting
uninit-memory garbage to whatever is connected to the E1 line.
Change it to fill with 0xFF, same as the filler used in other cases
such as inactive timeslots.
Change-Id: I42849a6d19b020bab789853c3b60af6a1c09f92f
---
M src/mux_demux.c
1 file changed, 20 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/21/37321/1
diff --git a/src/mux_demux.c b/src/mux_demux.c
index a0ae717..72379fe 100644
--- a/src/mux_demux.c
+++ b/src/mux_demux.c
@@ -55,8 +55,10 @@
/* If we're not started yet, we 'fake' data until the other side
* send something */
- if (l < 0 && errno == EAGAIN && !ts->raw.tx_started)
+ if (l < 0 && errno == EAGAIN && !ts->raw.tx_started) {
+ memset(buf, 0xFF, len);
return len;
+ }
ts->raw.tx_started = true;
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/37321?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I42849a6d19b020bab789853c3b60af6a1c09f92f
Gerrit-Change-Number: 37321
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-MessageType: newchange