manawyrm has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/34975?usp=email )
Change subject: logging: ensure ANSI color escape is sent in same line/before newline
......................................................................
logging: ensure ANSI color escape is sent in same line/before newline
This fixes multi-line color clobbering in logging daemons like
systemd-journald, which work with single-lines only.
Change-Id: Ia7de9d88aa5ac48ec0d5c1a931a89d21c02c5433
---
M src/core/logging.c
1 file changed, 21 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/75/34975/1
diff --git a/src/core/logging.c b/src/core/logging.c
index c6774f5..87654ac 100644
--- a/src/core/logging.c
+++ b/src/core/logging.c
@@ -616,7 +616,15 @@
}
if (target->use_color && c_subsys) {
- ret = snprintf(buf + offset, rem, OSMO_LOGCOLOR_END);
+ /* Ensure the last color escape is sent before the newline
+ * (to not clobber journald, which works on single-lines only) */
+ if (offset > 0 && buf[offset - 1] == '\n') {
+ offset--; rem++;
+ ret = snprintf(buf + offset, rem, "%s\n", OSMO_LOGCOLOR_END);
+ } else {
+ ret = snprintf(buf + offset, rem, OSMO_LOGCOLOR_END);
+ }
+
if (ret < 0)
goto err;
OSMO_SNPRINTF_RET(ret, rem, offset, len);
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34975?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia7de9d88aa5ac48ec0d5c1a931a89d21c02c5433
Gerrit-Change-Number: 34975
Gerrit-PatchSet: 1
Gerrit-Owner: manawyrm <osmocom.account(a)tbspace.de>
Gerrit-MessageType: newchange
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email )
Change subject: allow (second) CS RAB Assignment Request without RTP info
......................................................................
Patch Set 4:
(1 comment)
File src/osmo-hnbgw/mgw_fsm.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974/comment/6f2e7d39_73a803b2
PS3, Line 768: if (map->mgw_fi && is_rab_ass_without_tli(map, message)) {
> hmm i guess we don't need the 'map->mgw_fi' condition -- when a RAB Assignment has no RTP address, t […]
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I25bf19981cd75a87a7ceb3382dae1ec626ae475c
Gerrit-Change-Number: 34974
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Nov 2023 03:38:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: comment
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: allow (second) CS RAB Assignment Request without RTP info
......................................................................
allow (second) CS RAB Assignment Request without RTP info
In the field, we've encountered a so far unsupported scenario: after a
RAB Assignment Request and Response have successfully set up an RTP
stream, the CN sends *another* RAB Assignment Request to modify some SDU
parameters, omitting the transportLayerInformation IE (not modifying the
RTP address).
Directly forward all RAB Assignment Requests that have no RTP
information. This covers above use case, and also generally applies: no
RTP info means nothing to tell the MGW about.
Do not (yet?) support modifying the RTP address/port.
Related: osmo-ttcn3-hacks Iadaba0e5e82ad6d163ad509904ede213e2462d5c
Related: SYS#6624
Change-Id: I25bf19981cd75a87a7ceb3382dae1ec626ae475c
---
M src/osmo-hnbgw/mgw_fsm.c
1 file changed, 80 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/74/34974/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I25bf19981cd75a87a7ceb3382dae1ec626ae475c
Gerrit-Change-Number: 34974
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email )
Change subject: allow second CS RAB Assignment Request
......................................................................
Patch Set 3:
(1 comment)
File src/osmo-hnbgw/mgw_fsm.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974/comment/51bfab18_35e55f31
PS3, Line 768: if (map->mgw_fi && is_rab_ass_without_tli(map, message)) {
hmm i guess we don't need the 'map->mgw_fi' condition -- when a RAB Assignment has no RTP address, then there is by definition nothing to do with it in osmo-hnbgw, so we can just forward those without requiring that a working RAB is already set up.
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I25bf19981cd75a87a7ceb3382dae1ec626ae475c
Gerrit-Change-Number: 34974
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Nov 2023 03:31:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: neels.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: allow second CS RAB Assignment Request
......................................................................
allow second CS RAB Assignment Request
In the field, we've encountered a so far unsupported scenario: after a
RAB Assignment Request and Response have successfully set up an RTP
stream, the CN sends *another* RAB Assignment Request to modify some SDU
parameters, omitting the transportLayerInformation IE (not modifying the
RTP address).
Detect a secondary RAB Assignment Request, and just forward it as-is:
the hNodeB is interested in the RAB configuration, osmo-hnbgw just needs
the RTP info, which is not even present in this use case.
Do not (yet?) support modifying the RTP address/port.
Related: osmo-ttcn3-hacks Iadaba0e5e82ad6d163ad509904ede213e2462d5c
Related: SYS#6624
Change-Id: I25bf19981cd75a87a7ceb3382dae1ec626ae475c
---
M src/osmo-hnbgw/mgw_fsm.c
1 file changed, 79 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/74/34974/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I25bf19981cd75a87a7ceb3382dae1ec626ae475c
Gerrit-Change-Number: 34974
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newpatchset
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34973?usp=email )
Change subject: add HNBGW_Tests.TC_second_rab_assignment
......................................................................
Patch Set 3:
This change is ready for review.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34973?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iadaba0e5e82ad6d163ad509904ede213e2462d5c
Gerrit-Change-Number: 34973
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Nov 2023 03:23:23 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: neels.
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email )
Change subject: allow second CS RAB Assignment Request
......................................................................
Patch Set 2:
(1 comment)
File src/osmo-hnbgw/mgw_fsm.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-12307):
https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974/comment/1bcedfcb_86f42812
PS2, Line 765: /* After a normal RAB Assignment, another RAB Assigment may follow, modifying some RAB parameters. This second
'Assigment' may be misspelled - perhaps 'Assignment'?
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I25bf19981cd75a87a7ceb3382dae1ec626ae475c
Gerrit-Change-Number: 34974
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Nov 2023 03:14:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email )
Change subject: allow second CS RAB Assignment Request
......................................................................
Patch Set 1:
(1 comment)
File src/osmo-hnbgw/mgw_fsm.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-12305):
https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974/comment/8d4016f4_cf67729d
PS1, Line 765: /* After a normal RAB Assignment, another RAB Assigment may follow, modifying some RAB parameters. This second
'Assigment' may be misspelled - perhaps 'Assignment'?
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I25bf19981cd75a87a7ceb3382dae1ec626ae475c
Gerrit-Change-Number: 34974
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Nov 2023 03:03:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email )
Change subject: allow second CS RAB Assignment Request
......................................................................
allow second CS RAB Assignment Request
In the field, we've encountered a so far unsupported scenario: after a
RAB Assignment Request and Response have successfully set up an RTP
stream, the CN sends *another* RAB Assignment Request to modify some SDU
parameters, omitting the transportLayerInformation IE (not modifying the
RTP address).
Detect a secondary RAB Assignment Request, and just forward it as-is:
the hNodeB is interested in the RAB configuration, osmo-hnbgw just needs
the RTP info, which is not even present in this use case.
Do not (yet?) support modifying the RTP address/port.
Related: osmo-ttcn3-hacks Iadaba0e5e82ad6d163ad509904ede213e2462d5c
Related: SYS#6624
Change-Id: I25bf19981cd75a87a7ceb3382dae1ec626ae475c
---
M src/osmo-hnbgw/mgw_fsm.c
1 file changed, 79 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/74/34974/1
diff --git a/src/osmo-hnbgw/mgw_fsm.c b/src/osmo-hnbgw/mgw_fsm.c
index ddab0b5..3bbd8c6 100644
--- a/src/osmo-hnbgw/mgw_fsm.c
+++ b/src/osmo-hnbgw/mgw_fsm.c
@@ -683,6 +683,47 @@
return 0;
}
+static bool is_rab_ass_without_tli(struct hnbgw_context_map *map, ranap_message *message)
+{
+ RANAP_RAB_AssignmentRequestIEs_t *ies;
+ RANAP_ProtocolIE_ContainerPair_t *protocol_ie_container_pair;
+ RANAP_ProtocolIE_FieldPair_t *protocol_ie_field_pair;
+ RANAP_RAB_SetupOrModifyItemFirst_t _rab_setup_or_modify_item_first = { 0 };
+ RANAP_RAB_SetupOrModifyItemFirst_t *rab_setup_or_modify_item_first = &_rab_setup_or_modify_item_first;
+ int rc;
+ bool ret;
+
+ ies = &message->msg.raB_AssignmentRequestIEs;
+
+ if (!(ies->presenceMask & RAB_ASSIGNMENTREQUESTIES_RANAP_RAB_SETUPORMODIFYLIST_PRESENT))
+ return false;
+
+ /* Detect the end of the list */
+ if (ies->raB_SetupOrModifyList.list.count < 1)
+ return false;
+
+ protocol_ie_container_pair = ies->raB_SetupOrModifyList.list.array[0];
+ protocol_ie_field_pair = protocol_ie_container_pair->list.array[0];
+
+ if (!protocol_ie_field_pair)
+ return false;
+
+ if (protocol_ie_field_pair->id != RANAP_ProtocolIE_ID_id_RAB_SetupOrModifyItem) {
+ RANAP_DEBUG
+ ("Decoding failed, the protocol IE field-pair is not of type RANAP RAB setup-or-modify-item!\n");
+ return false;
+ }
+
+ rc = ranap_decode_rab_setupormodifyitemfirst(rab_setup_or_modify_item_first,
+ &protocol_ie_field_pair->firstValue);
+ if (rc < 0)
+ return false;
+
+ ret = rab_setup_or_modify_item_first->transportLayerInformation == NULL;
+ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_SetupOrModifyItemFirst, rab_setup_or_modify_item_first);
+ return ret;
+}
+
/* Check if the message contains a RAB-ReleaseItem that matches the RAB-ID that is managed by the given context map */
static bool is_our_rab_release(struct hnbgw_context_map *map, ranap_message *message)
{
@@ -721,6 +762,14 @@
initialized = true;
}
+ /* After a normal RAB Assignment, another RAB Assigment may follow, modifying some RAB parameters. This second
+ * RAB Assignment may omit transportLayerInformation (remains unchanged). Simply forward this to RUA, without
+ * the need to adjust anything here. Allow this only when there already is an mgw_fsm with proper address. */
+ if (map->mgw_fi && is_rab_ass_without_tli(map, message)) {
+ LOG_MAP(map, DCN, LOGL_INFO, "Rx secondary RAB Assignment Request, forwarding as-is\n");
+ return map_rua_dispatch(map, MAP_RUA_EV_TX_DIRECT_TRANSFER, ranap_msg);
+ }
+
/* The RTP stream negotiation usually begins with a RAB-AssignmentRequest and ends with an IU-Release, however
* it may also be that the MSC decides to release the RAB with a dedicated RAB-AssignmentRequest that contains
* a ReleaseList. In this case an FSM will already be present. */
@@ -791,6 +840,13 @@
return -1;
}
+ if (map->mgw_fi->state == MGW_ST_ESTABLISHED) {
+ /* This is a response to a second RAB Assignment Request, which only modified some RAB config on top of
+ * an earlier RAB Assignment. Just forward the response as-is, we already have our MGW set up and need
+ * no info from it. (i.e. we don't support modifying the RTP address.) */
+ return map_sccp_dispatch(map, MAP_SCCP_EV_TX_DATA_REQUEST, ranap_msg);
+ }
+
mgw_fsm_priv = map->mgw_fi->priv;
talloc_steal(mgw_fsm_priv, ranap_msg);
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I25bf19981cd75a87a7ceb3382dae1ec626ae475c
Gerrit-Change-Number: 34974
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange