lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

October 2026

  • 1 participants
  • 1301 discussions
[S] Change in osmo-gsm-manuals[master]: sigtran.adoc: Rename 'SCTP role' to 'Transport layer role'
by fixeria 02 Oct '26

02 Oct '26
Attention is currently required from: jolly, pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/43756?usp=email ) Change subject: sigtran.adoc: Rename 'SCTP role' to 'Transport layer role' ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/43756?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: I961552d00fde06154489b091d7d742b5ee86d206 Gerrit-Change-Number: 43756 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 02 Oct 2026 10:59:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in osmo-gsm-manuals[master]: Add description for IP DSCP (QoS) support of libosmo-signtran
by pespin 02 Oct '26

02 Oct '26
Attention is currently required from: jolly. pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/43757?usp=email ) Change subject: Add description for IP DSCP (QoS) support of libosmo-signtran ...................................................................... Patch Set 1: (6 comments) Commit Message: https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/43757/comment/09f181a3_e2da… : PS1, Line 7: Add description for IP DSCP (QoS) support of libosmo-signtran libosmo-sigtran File common/chapters/sigtran-osmocom.adoc: https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/43757/comment/36647659_e088… : PS1, Line 289: |QoS DSCP|(config-cs7-qos-class)# qos-ip-dscp DSCP|DSCP value of QoS class This is not an attribute of an SS7 Instance, but an attribute of a QoS Class. File common/chapters/sigtran.adoc: https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/43757/comment/34b71fbf_d636… : PS1, Line 535: a QoS class can optionally be assigned to individual xUA listeners (`listen` s/xUA listeners/xUA servers/ https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/43757/comment/7ab237a7_719b… : PS1, Line 538: A QoS class that is assigned to an xUA listener applies to IP packets sent xUA server https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/43757/comment/44dd1a36_e23e… : PS1, Line 539: during negotiation with the socket server. This QoS class also applies to IP Not really. What is inherited is the IP DSCP value of the socket, not the QoS class. I'd wrote something like: "The IP DSCP value of the QoS class applied to the listening socket of the xUA server is inherited by default on child ASP sockets when no QoS class is assigned to them." https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/43757/comment/99f01ee4_699f… : PS1, Line 554: asp asp-srv-m3ua 2906 2905 m3ua We usually put ASPs before the "listen" node in config files iirc. -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/43757?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: I57e1fa47f811132116deefe769ed6b7e90d11e49 Gerrit-Change-Number: 43757 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Fri, 02 Oct 2026 10:58:05 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[M] Change in libosmo-sigtran[master]: vty: Implement '[no] shutdown' in 'listen' node
by fixeria 02 Oct '26

02 Oct '26
Attention is currently required from: jolly, pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43755?usp=email ) Change subject: vty: Implement '[no] shutdown' in 'listen' node ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43755?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I18bae91fdf5b820138bc54e6f4751c3d0b8eee28 Gerrit-Change-Number: 43755 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 02 Oct 2026 10:57:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-sigtran[master]: xua_srv: Introduce log macro LOGPOXS()
by fixeria 02 Oct '26

02 Oct '26
Attention is currently required from: jolly, pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43754?usp=email ) Change subject: xua_srv: Introduce log macro LOGPOXS() ...................................................................... Patch Set 1: (1 comment) File src/ss7_xua_srv.c: https://gerrit.osmocom.org/c/libosmo-sigtran/+/43754/comment/c0f28eba_feede… : PS1, Line 119: sock_name, proto_name Use the opposite order here, like you do above? ```suggestion proto_name, sock_name); ``` -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43754?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: Ibd24de79048161450c868dc28987307f25365704 Gerrit-Change-Number: 43754 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 02 Oct 2026 10:50:08 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[S] Change in libosmo-sigtran[master]: ss7_asp_peer: Improvements in ss7_asp_peer_snprintf()
by fixeria 02 Oct '26

02 Oct '26
Attention is currently required from: jolly, pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43753?usp=email ) Change subject: ss7_asp_peer: Improvements in ss7_asp_peer_snprintf() ...................................................................... Patch Set 1: (1 comment) File src/ss7_asp_peer.c: https://gerrit.osmocom.org/c/libosmo-sigtran/+/43753/comment/65afdb01_c061e… : PS1, Line 68: peer->host[0], What if `peer->host[0]` is an IPv4 address, but `peer->host[N]` (N > 0) is an IPv6?Also, I see below you're not adding the closing `]` if `peer->host_cnt > 1`. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43753?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I115951627adb0c6778a9a36159237c3eea130300 Gerrit-Change-Number: 43753 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 02 Oct 2026 10:43:41 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[S] Change in osmo-gsm-manuals[master]: Add description for IP DSCP (QoS) support of libosmo-signtran
by jolly 02 Oct '26

02 Oct '26
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/43757?usp=email ) Change subject: Add description for IP DSCP (QoS) support of libosmo-signtran ...................................................................... Add description for IP DSCP (QoS) support of libosmo-signtran Related: OS#6753 Change-Id: I57e1fa47f811132116deefe769ed6b7e90d11e49 --- M common/chapters/sigtran-osmocom.adoc M common/chapters/sigtran.adoc 2 files changed, 43 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/57/43757/1 diff --git a/common/chapters/sigtran-osmocom.adoc b/common/chapters/sigtran-osmocom.adoc index 32d03cf..1e064bd 100644 --- a/common/chapters/sigtran-osmocom.adoc +++ b/common/chapters/sigtran-osmocom.adoc @@ -285,6 +285,8 @@ |Network Indicator|(config-cs7)# network-indicator|Network Indicator used in MTP3 Routing Label |Point Code Format|(config-cs7)# point-code format|Point Code Format (Default: 3.8.3) |Point Code Delimiter|(config-cs7)# point-code delimiter|Point Code Delimiter: . or - +|QoS Class Definition|(config-cs7)# qos class ID|Definition of a QoS class +|QoS DSCP|(config-cs7-qos-class)# qos-ip-dscp DSCP|DSCP value of QoS class |==== [[xua-server]] @@ -306,6 +308,7 @@ |Local Port|Local IP Address to which the server shall bind/listen |Protocol|Protocol (M3UA, SUA, IPA) to be operated by this server |Accept Dynamic ASPs|Should we accept connections from ASPs that are not explicitly pre-configured with their source IP and port? +|QoS Class|QoS Class the server will apply to incoming connections |==== @@ -377,6 +380,7 @@ |Remote Port|Port Number of the remote end of the connection |Remote IP|IP Address of the remote end of the connection |State|ASP State (Down, Inactive, Active) +|QoS Class|QoS Class to apply to this connection |==== === Osmocom SS7 Routes diff --git a/common/chapters/sigtran.adoc b/common/chapters/sigtran.adoc index 308f157..bd9ffa3 100644 --- a/common/chapters/sigtran.adoc +++ b/common/chapters/sigtran.adoc @@ -523,3 +523,42 @@ _all_ the ASPs in broadcast traffic mode. Osmocom (libosmo-sigtran) implements all above-mentioned traffic modes. + +==== Quality of Service (QoS) / IP DSCP + +Osmocom SIGTRAN support allows mapping abstract Quality of Service (QoS) +classes to specific IP Differentiated Services Code Point (DSCP) values. This +enables network operators to prioritize SIGTRAN signaling traffic (such as M3UA +or SUA) across underlying IP transport networks. + +QoS classes are defined centrally under the `cs7 instance` node. Once defined, +a QoS class can optionally be assigned to individual xUA listeners (`listen` +node) or Application Server Processes (`asp` node). + +A QoS class that is assigned to an xUA listener applies to IP packets sent +during negotiation with the socket server. This QoS class also applies to IP +packets sent by the Application Server Process, if no class is assigned to it. + +---- +cs7 instance 0 + qos class 5 <1> + qos-ip-dscp 23 + qos class 6 + qos-ip-dscp 42 + qos class 7 + qos-ip-dscp 8 + ... + listen m3ua 2905 + qos-class 5 <2> + ... + asp asp-srv-m3ua 2906 2905 m3ua + qos-class 7 <3> + ... + asp asp-clnt-m3ua 2905 2906 m3ua + qos-class 6 <4> + ... +---- +<1> Define QoS class `5` and assign it IP DSCP value `23`. +<2> Apply QoS class `5` to the M3UA listener socket. +<3> Apply QoS class `7` (DSCP 8) to the server-role ASP. +<4> Apply QoS class `6` (DSCP 42) to the client-role ASP. -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/43757?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: I57e1fa47f811132116deefe769ed6b7e90d11e49 Gerrit-Change-Number: 43757 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1 0
0 0
[S] Change in osmo-gsm-manuals[master]: sigtran.adoc: Rename 'SCTP role' to 'Transport layer role'
by pespin 02 Oct '26

02 Oct '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/43756?usp=email ) Change subject: sigtran.adoc: Rename 'SCTP role' to 'Transport layer role' ...................................................................... sigtran.adoc: Rename 'SCTP role' to 'Transport layer role' The client/server behavior applies to both SCTP and TCP, hence this concept was already renamed to "transport-role (client|server)" a while ago in libosmo-sigtran.git. Do the same here. Change-Id: I961552d00fde06154489b091d7d742b5ee86d206 --- M common/chapters/sigtran.adoc 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/56/43756/1 diff --git a/common/chapters/sigtran.adoc b/common/chapters/sigtran.adoc index 308f157..085c1da 100644 --- a/common/chapters/sigtran.adoc +++ b/common/chapters/sigtran.adoc @@ -449,7 +449,7 @@ to the Linux Kernel SCTP stack and used whenever an association is being established. -On the client side (see <<sctp_role>>), the parameters are configured in the `asp` node: +On the client side (see <<transport_layer_role>>), the parameters are configured in the `asp` node: ---- cs7 instance 0 asp my-asp 2905 0 m3ua @@ -468,7 +468,7 @@ connection failed. <4> Retransmit an SCTP INIT message after 10000 ms if no answer is received. -On the server side (see <<sctp_role>>), the parameters are configured in the `listen` node: +On the server side (see <<transport_layer_role>>), the parameters are configured in the `listen` node: ---- cs7 instance 0 asp my-asp 2905 0 m3ua @@ -485,14 +485,14 @@ <2> Announce to the server that a maximum of up to 300 inbound SCTP streams are supported. This value is transmitted during SCTP INIT ACK packet. -[[sctp_role]] -==== SCTP role +[[transport_layer_role]] +==== Transport layer role -The _SCTP role_ defines which of the two L4 protocol roles SCTP assumes: +The _Transport layer role_ defines which of the two L4 protocol roles TCP/SCTP assumes: -* The _SCTP server_ role binds to a local port and handles incoming - connections from clients -* The _SCTP client_ role connects to a remote SCTP sever. +* The _server_ role binds to a local port and handles incoming + connections from TCP/SCTP clients. +* The _client_ role connects to a remote TCP/SCTP sever. ==== M3UA/SUA role -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/43756?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: I961552d00fde06154489b091d7d742b5ee86d206 Gerrit-Change-Number: 43756 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in libosmo-sigtran[master]: vty: Implement '[no] shutdown' in 'listen' node
by pespin 02 Oct '26

02 Oct '26
Attention is currently required from: fixeria, jolly. pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43755?usp=email ) Change subject: vty: Implement '[no] shutdown' in 'listen' node ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: This is basically the same logic we have for "asp" node, applied to "listen" node. I validated it through vty tests and also did some manual tests to make sure indeed the listening socket is closed and reopened when required by administrative state. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43755?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I18bae91fdf5b820138bc54e6f4751c3d0b8eee28 Gerrit-Change-Number: 43755 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 02 Oct 2026 10:14:13 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[S] Change in libosmo-sigtran[master]: xua_srv: Introduce log macro LOGPOXS()
by pespin 02 Oct '26

02 Oct '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43754?usp=email ) Change subject: xua_srv: Introduce log macro LOGPOXS() ...................................................................... xua_srv: Introduce log macro LOGPOXS() Use the macro in multiple places, improve logging around it. Change-Id: Ibd24de79048161450c868dc28987307f25365704 --- M src/ss7_xua_srv.c M src/ss7_xua_srv.h 2 files changed, 19 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/54/43754/1 diff --git a/src/ss7_xua_srv.c b/src/ss7_xua_srv.c index 4fd1067..1a4c8e5 100644 --- a/src/ss7_xua_srv.c +++ b/src/ss7_xua_srv.c @@ -74,11 +74,11 @@ const char *proto_name = get_value_string(osmo_ss7_asp_protocol_vals, oxs->cfg.proto); int rc = 0; - LOGP(DLSS7, LOGL_INFO, "%s: New %s connection accepted\n", sock_name, proto_name); + LOGPOXS(oxs, DLSS7, LOGL_INFO, "New %s connection accepted: %s\n", proto_name, sock_name); asp = ss7_asp_find_by_socket_addr(fd, oxs->cfg.trans_proto); if (asp) { - LOGP(DLSS7, LOGL_INFO, "%s: matched connection to ASP %s\n", sock_name, asp->cfg.name); + LOGPOXS(oxs, DLSS7, LOGL_INFO, "Matched %s connection %s to ASP %s\n", proto_name, sock_name, asp->cfg.name); if (!asp->cfg.is_server) { LOGPASP(asp, DLSS7, LOGL_NOTICE, "Reject incoming new connection from %s for ASP configured as 'transport-role client'\n", @@ -114,7 +114,7 @@ } if (!asp && !oxs->cfg.accept_dyn_reg) { - LOGP(DLSS7, LOGL_NOTICE, "%s: %s connection without matching " + LOGPOXS(oxs, DLSS7, LOGL_NOTICE, "%s connection %s without matching " "ASP definition and no dynamic registration enabled, terminating\n", sock_name, proto_name); close(fd); @@ -124,8 +124,8 @@ srv = osmo_stream_srv_create2(oxs, link, fd, NULL); if (!srv) { - LOGP(DLSS7, LOGL_ERROR, "%s: Unable to create stream server " - "for connection\n", sock_name); + LOGPOXS(oxs, DLSS7, LOGL_ERROR, "Unable to create stream server " + "for %s connection %s\n", proto_name, sock_name); close(fd); talloc_free(sock_name); return -1; @@ -173,7 +173,8 @@ } osmo_sock_get_ip_and_port(fd, hostbuf, sizeof(hostbuf), portbuf, sizeof(portbuf), false); - LOGP(DLSS7, LOGL_INFO, "%s: created dynamic ASP %s\n", sock_name, asp->cfg.name); + LOGPOXS(oxs, DLSS7, LOGL_INFO, "Created dynamic ASP %s from %s connection %s\n", + asp->cfg.name, proto_name, sock_name); asp->cfg.is_server = true; asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; asp->cfg.local.port = oxs->cfg.local.port; @@ -254,7 +255,7 @@ return NULL; LOGP(DLSS7, LOGL_INFO, "Creating %s Server %s:%u\n", - get_value_string(osmo_ss7_asp_protocol_vals, proto), local_host, local_port); + get_value_string(osmo_ss7_asp_protocol_vals, proto), local_host ? : "NULL", local_port); INIT_LLIST_HEAD(&oxs->asp_list); @@ -274,7 +275,7 @@ ss7_xua_server_set_local_host(oxs, local_host); LOGP(DLSS7, LOGL_INFO, "Created %s server on %s:%" PRIu16 "\n", - get_value_string(osmo_ss7_asp_protocol_vals, proto), local_host, local_port); + get_value_string(osmo_ss7_asp_protocol_vals, proto), local_host ? : "NULL", local_port); oxs->inst = inst; llist_add_tail(&oxs->list, &inst->xua_servers); @@ -339,16 +340,16 @@ rc = ss7_asp_peer_snprintf(buf, sizeof(buf), &xs->cfg.local); if (rc < 0) { - LOGP(DLSS7, LOGL_INFO, "Failed parsing %s Server osmo_ss7_asp_peer\n", proto); + LOGPOXS(xs, DLSS7, LOGL_INFO, "Failed parsing %s Server osmo_ss7_asp_peer\n", proto); } else { - LOGP(DLSS7, LOGL_INFO, "(Re)binding %s Server to %s\n", - proto, buf); + LOGPOXS(xs, DLSS7, LOGL_INFO, "(Re)binding %s Server to %s\n", + proto, buf); } /* Applying xUA Server config which may have changed through VTY on the srv_link before opening it: */ if (xs->cfg.trans_proto == IPPROTO_SCTP) { if ((rc = ss7_xua_srv_apply_sctp_init_pars(xs)) < 0) - LOGP(DLSS7, LOGL_NOTICE, "Failed applying %s Server SCTP INIT parameters\n", proto); + LOGPOXS(xs, DLSS7, LOGL_NOTICE, "Failed applying %s Server SCTP INIT parameters\n", proto); } return osmo_stream_srv_link_open(xs->server); diff --git a/src/ss7_xua_srv.h b/src/ss7_xua_srv.h index 7e93b4e..58ff1e8 100644 --- a/src/ss7_xua_srv.h +++ b/src/ss7_xua_srv.h @@ -76,3 +76,9 @@ void ss7_xua_server_destroy(struct osmo_xua_server *xs); bool ss7_xua_server_set_default_local_hosts(struct osmo_xua_server *oxs); + +#define LOGPOXS(oxs, subsys, level, fmt, args ...) \ + _LOGSS7((oxs)->inst, subsys, level, "XUA_SRV(%s,%s) " fmt, \ + osmo_stream_srv_link_get_name(oxs->server), \ + osmo_stream_srv_link_get_sockname(oxs->server) ? : "NULL", \ + ## args) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43754?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: Ibd24de79048161450c868dc28987307f25365704 Gerrit-Change-Number: 43754 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in libosmo-sigtran[master]: vty: Implement '[no] shutdown' in 'listen' node
by pespin 02 Oct '26

02 Oct '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43755?usp=email ) Change subject: vty: Implement '[no] shutdown' in 'listen' node ...................................................................... vty: Implement '[no] shutdown' in 'listen' node Prior to this patch, there was no way to stop the listening socket and resume it without erasing it from configuration with "no listen" VTY command. It is sometimes useful to pause it to avoid serving clients for a while for administrative purposes. Related: OS#7039 Change-Id: I18bae91fdf5b820138bc54e6f4751c3d0b8eee28 --- M contrib/test/osmo-stp.cfg M doc/examples/osmo-stp-multihome.cfg M doc/examples/osmo-stp.cfg M src/sccp_instance.c M src/ss7_xua_srv.c M src/ss7_xua_srv.h M src/ss7_xua_srv_vty.c M tests/vty/osmo_stp_route_prio.vty M tests/vty/osmo_stp_test.vty M tests/vty/vty_test_runner.py 10 files changed, 119 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/55/43755/1 diff --git a/contrib/test/osmo-stp.cfg b/contrib/test/osmo-stp.cfg index 9003131..1ff5118 100644 --- a/contrib/test/osmo-stp.cfg +++ b/contrib/test/osmo-stp.cfg @@ -44,5 +44,7 @@ update route 0.3.0 0.3.0 linkset as-s-0 listen m3ua 2905 local-ip 172.18.0.200 + no shutdown listen sua 14001 local-ip 172.18.0.200 + no shutdown diff --git a/doc/examples/osmo-stp-multihome.cfg b/doc/examples/osmo-stp-multihome.cfg index 64874da..1d04cad 100644 --- a/doc/examples/osmo-stp-multihome.cfg +++ b/doc/examples/osmo-stp-multihome.cfg @@ -21,3 +21,4 @@ local-ip 127.0.0.2 local-ip 127.0.0.1 local-ip ::1 + no shutdown diff --git a/doc/examples/osmo-stp.cfg b/doc/examples/osmo-stp.cfg index 602a9ce..11c969e 100644 --- a/doc/examples/osmo-stp.cfg +++ b/doc/examples/osmo-stp.cfg @@ -15,3 +15,4 @@ xua rkm routing-key-allocation dynamic-permitted listen m3ua 2905 accept-asp-connections dynamic-permitted + no shutdown diff --git a/src/sccp_instance.c b/src/sccp_instance.c index d6937d6..fc7edaf 100644 --- a/src/sccp_instance.c +++ b/src/sccp_instance.c @@ -850,7 +850,7 @@ if (!xs) goto out_ss7; - rc = ss7_xua_server_bind(xs); + rc = ss7_xua_server_restart(xs); if (rc < 0) goto out_xs; diff --git a/src/ss7_xua_srv.c b/src/ss7_xua_srv.c index 1a4c8e5..c742016 100644 --- a/src/ss7_xua_srv.c +++ b/src/ss7_xua_srv.c @@ -331,7 +331,7 @@ * \param[in] xs xUA server to operate * \returns 0 on success, negative value on error. */ -int +static int ss7_xua_server_bind(struct osmo_xua_server *xs) { char buf[512]; @@ -340,9 +340,9 @@ rc = ss7_asp_peer_snprintf(buf, sizeof(buf), &xs->cfg.local); if (rc < 0) { - LOGPOXS(xs, DLSS7, LOGL_INFO, "Failed parsing %s Server osmo_ss7_asp_peer\n", proto); + LOGPOXS(xs, DLSS7, LOGL_ERROR, "Failed parsing %s Server osmo_ss7_asp_peer\n", proto); } else { - LOGPOXS(xs, DLSS7, LOGL_INFO, "(Re)binding %s Server to %s\n", + LOGPOXS(xs, DLSS7, LOGL_NOTICE, "(Re)binding %s Server to %s\n", proto, buf); } @@ -420,6 +420,34 @@ return true; } +int ss7_xua_server_restart(struct osmo_xua_server *oxs) +{ + int rc; + + if (oxs->cfg.adm_state.shutdown) { + if (osmo_stream_srv_link_is_opened(oxs->server)) { + LOGPOXS(oxs, DLSS7, LOGL_NOTICE, "Stop listening (Adm State 'shutdown')\n"); + osmo_stream_srv_link_close(oxs->server); + } + return 0; + } + + /* ss7_xua_server_bind() through osmo_stream_srv_link_open() takes care of + * closing and re-opening the old listening socket if needed: */ + rc = ss7_xua_server_bind(oxs); + return rc; +} + +/* Apply sane configs for unconfigured options and restart the xUA Server. */ +int ss7_xua_server_restart_after_reconfigure(struct osmo_xua_server *oxs) +{ + int rc; + /* If no local addr was set, or erased after _create(): */ + ss7_xua_server_set_default_local_hosts(oxs); + rc = ss7_xua_server_restart(oxs); + return rc; +} + void ss7_xua_server_destroy(struct osmo_xua_server *xs) { struct osmo_ss7_asp *asp, *asp2; diff --git a/src/ss7_xua_srv.h b/src/ss7_xua_srv.h index 58ff1e8..b3e5148 100644 --- a/src/ss7_xua_srv.h +++ b/src/ss7_xua_srv.h @@ -31,12 +31,23 @@ uint8_t ip_dscp; enum osmo_ss7_asp_protocol proto; struct { + /*! no listening transport (SCTP, TCP) socket */ + bool shutdown:1; + } adm_state; + struct { bool num_ostreams_present; bool max_instreams_present; uint16_t num_ostreams_value; uint16_t max_instreams_value; } sctp_init; + /* Used internally by "listen" VTY node to figure out if "no shutdown" + * was done explicitly, in order to avoid automatic xUA Server + * reconfiguring/restart at go_parent(). + * Can be dropped in the future once we make sure everybody uses + * "[no] shutdown" explicitly in cfg files. */ + bool explicit_shutdown_state_by_vty_since_node_enter; + /*! The underlaying transport protocol (one of IPPROTO_*) */ int trans_proto; } cfg; @@ -64,7 +75,9 @@ uint16_t local_port, const char *local_host); int -ss7_xua_server_bind(struct osmo_xua_server *xs); +ss7_xua_server_restart(struct osmo_xua_server *oxs); +int +ss7_xua_server_restart_after_reconfigure(struct osmo_xua_server *oxs); int ss7_xua_server_set_local_host(struct osmo_xua_server *xs, const char *local_host); diff --git a/src/ss7_xua_srv_vty.c b/src/ss7_xua_srv_vty.c index 37a9212..8e4ba48 100644 --- a/src/ss7_xua_srv_vty.c +++ b/src/ss7_xua_srv_vty.c @@ -84,6 +84,9 @@ ss7_xua_server_set_local_hosts(xs, NULL, 0); } + /* Reset value, will be checked at osmo_ss7_vty_go_parent() */ + xs->cfg.explicit_shutdown_state_by_vty_since_node_enter = false; + vty->node = L_CS7_XUA_NODE; vty->index = xs; return CMD_SUCCESS; @@ -274,6 +277,38 @@ return CMD_SUCCESS; } +DEFUN_ATTR(xua_shutdown, xua_shutdown_cmd, + "shutdown", + "Terminates transport (SCTP, TCP) listening socket\n", + CMD_ATTR_NODE_EXIT) +{ + struct osmo_xua_server *oxs = vty->index; + + LOGPOXS(oxs, DLSS7, LOGL_NOTICE, "Applying Adm State change: '%sshutdown' -> 'shutdown'\n", + oxs->cfg.adm_state.shutdown ? "" : "no "); + + oxs->cfg.explicit_shutdown_state_by_vty_since_node_enter = true; + oxs->cfg.adm_state.shutdown = true; + ss7_xua_server_restart_after_reconfigure(oxs); + return CMD_SUCCESS; +} + +DEFUN_ATTR(xua_no_shutdown, xua_no_shutdown_cmd, + "no shutdown", + NO_STR "Terminates transport (SCTP, TCP) listening socket\n", + CMD_ATTR_NODE_EXIT) +{ + struct osmo_xua_server *oxs = vty->index; + + LOGPOXS(oxs, DLSS7, LOGL_NOTICE, "Applying Adm State change: '%sshutdown' -> 'no shutdown'\n", + oxs->cfg.adm_state.shutdown ? "" : "no "); + + oxs->cfg.explicit_shutdown_state_by_vty_since_node_enter = true; + oxs->cfg.adm_state.shutdown = false; + ss7_xua_server_restart_after_reconfigure(oxs); + return CMD_SUCCESS; +} + void ss7_vty_write_one_oxs(struct vty *vty, struct osmo_xua_server *xs) { int i; @@ -299,6 +334,8 @@ vty_out(vty, " sctp-param init num-ostreams %u%s", xs->cfg.sctp_init.num_ostreams_value, VTY_NEWLINE); if (xs->cfg.sctp_init.max_instreams_present) vty_out(vty, " sctp-param init max-instreams %u%s", xs->cfg.sctp_init.max_instreams_value, VTY_NEWLINE); + + vty_out(vty, " %sshutdown%s", xs->cfg.adm_state.shutdown ? "" : "no ", VTY_NEWLINE); } static void vty_dump_xua_server(struct vty *vty, struct osmo_xua_server *xs) @@ -386,10 +423,29 @@ { struct osmo_xua_server *oxs = vty->index; - /* If no local addr was set, or erased after _create(): */ - ss7_xua_server_set_default_local_hosts(oxs); - if (ss7_xua_server_bind(oxs) < 0) - vty_out(vty, "%% Unable to bind xUA server to IP(s)%s", VTY_NEWLINE); + if (oxs->cfg.explicit_shutdown_state_by_vty_since_node_enter) { + /* Interactive VTY, inform of new behavior upon use of new '[no] shutdown' commands: */ + if (vty->type != VTY_FILE) + vty_out(vty, "%% NOTE: Skipping automatic restart of VTY node 'listen' " + "since an explicit '[no] shutdown' command was entered%s", + VTY_NEWLINE); + oxs->cfg.explicit_shutdown_state_by_vty_since_node_enter = false; + } else if (vty->type == VTY_FILE) { + /* Make sure config reading is backward compatible by starting the xUA server if no explicit 'no shutdown' is read: */ + vty_out(vty, + "%% VTY node 'listen' without a '[no] shutdown' command at the end is deprecated, " + "please make sure you update your cfg file for future compatibility.%s", + VTY_NEWLINE); + if (ss7_xua_server_restart_after_reconfigure(oxs) < 0) + vty_out(vty, "%% Unable to bind xUA server to IP(s)%s", VTY_NEWLINE); + } else { + /* Interactive VTY without '[no] shutdown' explicit cmd, remind the user that we are no + * longer automatically restarting the xUA server when going out of the "asp" node: */ + vty_out(vty, + "%% NOTE: Make sure to use '[no] shutdown' command in 'listen' node " + "in order to restart the ASP for new configs to be applied.%s", + VTY_NEWLINE); + } vty->node = L_CS7_NODE; vty->index = oxs->inst; @@ -416,4 +472,6 @@ install_lib_element(L_CS7_XUA_NODE, &xua_accept_dyn_asp_cmd); install_lib_element(L_CS7_XUA_NODE, &xua_sctp_param_init_cmd); install_lib_element(L_CS7_XUA_NODE, &xua_no_sctp_param_init_cmd); + install_lib_element(L_CS7_XUA_NODE, &xua_shutdown_cmd); + install_lib_element(L_CS7_XUA_NODE, &xua_no_shutdown_cmd); } diff --git a/tests/vty/osmo_stp_route_prio.vty b/tests/vty/osmo_stp_route_prio.vty index 6a4ac08..54c9475 100644 --- a/tests/vty/osmo_stp_route_prio.vty +++ b/tests/vty/osmo_stp_route_prio.vty @@ -71,6 +71,7 @@ local-ip 127.0.0.1 local-ip ::1 accept-asp-connections dynamic-permitted + no shutdown end OsmoSTP(config-cs7)# route-table system diff --git a/tests/vty/osmo_stp_test.vty b/tests/vty/osmo_stp_test.vty index 167a1a0..fdcdc26 100644 --- a/tests/vty/osmo_stp_test.vty +++ b/tests/vty/osmo_stp_test.vty @@ -435,6 +435,8 @@ accept-asp-connections (pre-configured|dynamic-permitted) sctp-param init (num-ostreams|max-instreams) <0-65535> no sctp-param init (num-ostreams|max-instreams) + shutdown + no shutdown ... OsmoSTP(config-cs7-listen)# ? @@ -454,6 +456,7 @@ ... OsmoSTP(config-cs7-listen)# exit +% NOTE: Make sure to use '[no] shutdown' command in 'listen' node in order to restart the ASP for new configs to be applied. OsmoSTP(config-cs7)# as my-ass m3ua OsmoSTP(config-cs7-as)# list ... @@ -711,6 +714,7 @@ local-ip 127.0.0.1 local-ip ::1 accept-asp-connections dynamic-permitted + no shutdown sccp-address foo routing-indicator PC point-code 1.2.3 diff --git a/tests/vty/vty_test_runner.py b/tests/vty/vty_test_runner.py index bad989e..3f25439 100755 --- a/tests/vty/vty_test_runner.py +++ b/tests/vty/vty_test_runner.py @@ -257,7 +257,8 @@ self.assertTrue(self.vty.verify("qos-class 5",[''])) else: self.assertTrue(self.vty.verify("init-ip-dscp 23",["% 'init-ip-dscp' command is deprecated, use 'qos-class' instead"])) - self.assertTrue(self.vty.verify("exit",[''])) + self.assertTrue(self.vty.verify("no shutdown",[''])) + self.assertTrue(self.vty.verify("exit",["% NOTE: Skipping automatic restart of VTY node 'listen' since an explicit '[no] shutdown' command was entered"])) self.assertTrue(self.vty.verify("asp asp-srv-m3ua 2906 2905 m3ua",[''])) self.assertTrue(self.vty.verify("local-ip 127.0.0.1",[''])) self.assertTrue(self.vty.verify("remote-ip 127.0.0.2",[''])) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43755?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I18bae91fdf5b820138bc54e6f4751c3d0b8eee28 Gerrit-Change-Number: 43755 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.