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 -----
  • November
  • 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

February 2024

  • 1 participants
  • 1748 discussions
[S] Change in osmo-bsc[master]: abis_nm: fix -Wunused-but-set-variable (bug)
by pespin 03 Feb '24

03 Feb '24
Attention is currently required from: fixeria, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35791?usp=email ) Change subject: abis_nm: fix -Wunused-but-set-variable (bug) ...................................................................... Patch Set 2: (2 comments) File src/osmo-bsc/abis_nm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/35791/comment/f17f796b_ed559ed9 PS2, Line 2168: const uint8_t *attr, int attr_len) what about converting attr_len to 0? it makes no sense to have a negative len to start with.... https://gerrit.osmocom.org/c/osmo-bsc/+/35791/comment/4706e235_c15c43f4 PS2, Line 2175: if (attr_len < 0) and using unsigned, then suddently this is not needed. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35791?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3ca8e761fdf99dd498a979ccc9d53c6c3e03e2cc Gerrit-Change-Number: 35791 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 03 Feb 2024 01:18:45 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-bsc[master]: abis_nm: misc/cosmetic changes to abis_nm_sw_act_req_ack()
by pespin 03 Feb '24

03 Feb '24
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35794?usp=email ) Change subject: abis_nm: misc/cosmetic changes to abis_nm_sw_act_req_ack() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35794?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I2849a22647805e7477d66055c18614a3a9f80748 Gerrit-Change-Number: 35794 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 03 Feb 2024 01:17:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[L] Change in libosmo-sccp[master]: Implement M3UA-over-TCP (in addition to SCTP)
by fixeria 03 Feb '24

03 Feb '24
Attention is currently required from: laforge, pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35796?usp=email ) Change subject: Implement M3UA-over-TCP (in addition to SCTP) ...................................................................... Patch Set 1: (2 comments) File src/osmo_ss7_asp.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/35796/comment/64440ba2_a564468f PS1, Line 853: ss7_asp_m3ua_tcp_srv_conn_cb This function is 90% identical to `m3ua_tcp_cli_read_cb()`. I would of course like to reduce code duplication. Suggestions are welcome! File src/xua_rkm.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/35796/comment/5572ab10_6745cc88 PS1, Line 240: M3UA-over-SCTP or M3UA-over-TCP? Can we use asp->cfg.proto maybe? @laforge@osmocom.org your feedback would be welcome here. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35796?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I8c76d271472befacbeb998a93bbdc9e8660d9b5d Gerrit-Change-Number: 35796 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 03 Feb 2024 00:01:41 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmo-sccp[master]: cosmetic: rename OSMO_SS7_ASP_PROT_M3UA[_SCTP]
by fixeria 03 Feb '24

03 Feb '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35795?usp=email ) Change subject: cosmetic: rename OSMO_SS7_ASP_PROT_M3UA[_SCTP] ...................................................................... cosmetic: rename OSMO_SS7_ASP_PROT_M3UA[_SCTP] This commit prepares for adding M3UA-over-TCP support. Make it clear on the API level that the existing protocol works over SCTP. Keep the VTY commands unchanged in order to keep it closer to the Cisco ITP syntax. Change-Id: Ife0ae7a4956980da40ee045b0b7eb5cd0ccd1aef Related: SYS#5424 --- M examples/sccp_demo_user.c M include/osmocom/sigtran/osmo_ss7.h M src/m3ua.c M src/osmo_ss7_asp.c M src/osmo_ss7_hmrt.c M src/osmo_ss7_vty.c M src/sccp_scrc.c M src/sccp_user.c M src/xua_rkm.c M src/xua_snm.c M tests/ss7/ss7_test.c 11 files changed, 43 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/95/35795/1 diff --git a/examples/sccp_demo_user.c b/examples/sccp_demo_user.c index d67bd27..a9e470d 100644 --- a/examples/sccp_demo_user.c +++ b/examples/sccp_demo_user.c @@ -185,7 +185,7 @@ int remote_port = DEFAULT_REMOTE_PORT_SERVER; int remote_pc = DEFAULT_PC_CLIENT; bool lflag = false, rflag = false, Lflag = false, Rflag = false; - enum osmo_ss7_asp_protocol protocol = OSMO_SS7_ASP_PROT_M3UA; + enum osmo_ss7_asp_protocol protocol = OSMO_SS7_ASP_PROT_M3UA_SCTP; void *tall_ctx = talloc_named_const(NULL, 1, "sccp_demo_user"); init_logging(tall_ctx); diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index a8a624f..ca7087b 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -277,11 +277,14 @@ enum osmo_ss7_asp_protocol { OSMO_SS7_ASP_PROT_NONE, OSMO_SS7_ASP_PROT_SUA, - OSMO_SS7_ASP_PROT_M3UA, + OSMO_SS7_ASP_PROT_M3UA_SCTP, OSMO_SS7_ASP_PROT_IPA, _NUM_OSMO_SS7_ASP_PROT }; +/* backwards compatibility alias */ +#define OSMO_SS7_ASP_PROT_M3UA OSMO_SS7_ASP_PROT_M3UA_SCTP + extern struct value_string osmo_ss7_asp_protocol_vals[]; static inline const char * diff --git a/src/m3ua.c b/src/m3ua.c index f4dbf76..2c2a2a5 100644 --- a/src/m3ua.c +++ b/src/m3ua.c @@ -478,7 +478,7 @@ { struct msgb *msg = m3ua_to_msg(xua); - OSMO_ASSERT(asp->cfg.proto == OSMO_SS7_ASP_PROT_M3UA); + OSMO_ASSERT(asp->cfg.proto == OSMO_SS7_ASP_PROT_M3UA_SCTP); if (!msg) return -1; @@ -495,7 +495,7 @@ struct msgb *msg; int rc; - OSMO_ASSERT(as->cfg.proto == OSMO_SS7_ASP_PROT_M3UA); + OSMO_ASSERT(as->cfg.proto == OSMO_SS7_ASP_PROT_M3UA_SCTP); /* Add RC for this AS */ if (as->cfg.routing_key.context) @@ -693,7 +693,7 @@ struct xua_msg *xua = NULL, *err = NULL; int rc = 0; - OSMO_ASSERT(asp->cfg.proto == OSMO_SS7_ASP_PROT_M3UA); + OSMO_ASSERT(asp->cfg.proto == OSMO_SS7_ASP_PROT_M3UA_SCTP); /* caller owns msg memory, we shall neither free it here nor * keep references beyond the execution of this function and its diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c index f867ce5..ac30b75 100644 --- a/src/osmo_ss7_asp.c +++ b/src/osmo_ss7_asp.c @@ -115,7 +115,7 @@ struct value_string osmo_ss7_asp_protocol_vals[] = { { OSMO_SS7_ASP_PROT_NONE, "none" }, { OSMO_SS7_ASP_PROT_SUA, "sua" }, - { OSMO_SS7_ASP_PROT_M3UA, "m3ua" }, + { OSMO_SS7_ASP_PROT_M3UA_SCTP, "m3ua" }, { OSMO_SS7_ASP_PROT_IPA, "ipa" }, { 0, NULL } }; @@ -133,7 +133,7 @@ case OSMO_SS7_ASP_PROT_IPA: return IPPROTO_TCP; case OSMO_SS7_ASP_PROT_SUA: - case OSMO_SS7_ASP_PROT_M3UA: + case OSMO_SS7_ASP_PROT_M3UA_SCTP: default: return IPPROTO_SCTP; } @@ -142,7 +142,7 @@ static const uint16_t prot2port[] = { [OSMO_SS7_ASP_PROT_NONE] = 0, [OSMO_SS7_ASP_PROT_SUA] = SUA_PORT, - [OSMO_SS7_ASP_PROT_M3UA] = M3UA_PORT, + [OSMO_SS7_ASP_PROT_M3UA_SCTP] = M3UA_PORT, [OSMO_SS7_ASP_PROT_IPA] = 5000, }; @@ -828,7 +828,7 @@ if (ppid == SUA_PPID && asp->cfg.proto == OSMO_SS7_ASP_PROT_SUA) rc = sua_rx_msg(asp, msg); - else if (ppid == M3UA_PPID && asp->cfg.proto == OSMO_SS7_ASP_PROT_M3UA) + else if (ppid == M3UA_PPID && asp->cfg.proto == OSMO_SS7_ASP_PROT_M3UA_SCTP) rc = m3ua_rx_msg(asp, msg); else rc = ss7_asp_rx_unknown(asp, ppid, msg); @@ -977,7 +977,7 @@ if (ppid == SUA_PPID && asp->cfg.proto == OSMO_SS7_ASP_PROT_SUA) rc = sua_rx_msg(asp, msg); - else if (ppid == M3UA_PPID && asp->cfg.proto == OSMO_SS7_ASP_PROT_M3UA) + else if (ppid == M3UA_PPID && asp->cfg.proto == OSMO_SS7_ASP_PROT_M3UA_SCTP) rc = m3ua_rx_msg(asp, msg); else rc = ss7_asp_rx_unknown(asp, ppid, msg); @@ -1030,7 +1030,7 @@ case OSMO_SS7_ASP_PROT_SUA: msgb_sctp_ppid(msg) = SUA_PPID; break; - case OSMO_SS7_ASP_PROT_M3UA: + case OSMO_SS7_ASP_PROT_M3UA_SCTP: msgb_sctp_ppid(msg) = M3UA_PPID; break; case OSMO_SS7_ASP_PROT_IPA: @@ -1108,7 +1108,7 @@ int osmo_ss7_asp_get_log_subsys(const struct osmo_ss7_asp *asp) { switch (asp->cfg.proto) { - case OSMO_SS7_ASP_PROT_M3UA: + case OSMO_SS7_ASP_PROT_M3UA_SCTP: return DLM3UA; case OSMO_SS7_ASP_PROT_SUA: return DLSUA; diff --git a/src/osmo_ss7_hmrt.c b/src/osmo_ss7_hmrt.c index 3ac43b8..76b174b 100644 --- a/src/osmo_ss7_hmrt.c +++ b/src/osmo_ss7_hmrt.c @@ -237,7 +237,7 @@ rate_ctr_inc2(as->ctrg, SS7_AS_CTR_TX_MSU_TOTAL); switch (as->cfg.proto) { - case OSMO_SS7_ASP_PROT_M3UA: + case OSMO_SS7_ASP_PROT_M3UA_SCTP: DEBUGP(DLSS7, "rt->dest.as proto is M3UA for dpc=%u=%s\n", dpc, osmo_ss7_pointcode_print(inst, dpc)); return m3ua_tx_xua_as(as,xua); diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 1483ac0..5b8269f 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -2011,7 +2011,7 @@ vty_out(vty, "------------ ------------ ---------- ------------- ---- ------------- --- ----- ----- -------%s", VTY_NEWLINE); llist_for_each_entry(as, &inst->as_list, list) { - if (filter && !strcmp(filter, "m3ua") && as->cfg.proto != OSMO_SS7_ASP_PROT_M3UA) + if (filter && !strcmp(filter, "m3ua") && as->cfg.proto != OSMO_SS7_ASP_PROT_M3UA_SCTP) continue; if (filter && !strcmp(filter, "sua") && as->cfg.proto != OSMO_SS7_ASP_PROT_SUA) continue; diff --git a/src/sccp_scrc.c b/src/sccp_scrc.c index be23c21..79b2857 100644 --- a/src/sccp_scrc.c +++ b/src/sccp_scrc.c @@ -151,7 +151,7 @@ switch (as->cfg.proto) { case OSMO_SS7_ASP_PROT_SUA: return sua_tx_xua_as(as, xua); - case OSMO_SS7_ASP_PROT_M3UA: + case OSMO_SS7_ASP_PROT_M3UA_SCTP: case OSMO_SS7_ASP_PROT_IPA: return sua2sccp_tx_m3ua(inst, xua); default: diff --git a/src/sccp_user.c b/src/sccp_user.c index 94b6d02..2d13a2f 100644 --- a/src/sccp_user.c +++ b/src/sccp_user.c @@ -490,7 +490,7 @@ * \param[in] ss7_id of the SS7/CS7 instance * \param[in] name human readable name * \param[in] default_pc pointcode to be used on missing VTY setting - * \param[in] prot protocol to be used (e.g OSMO_SS7_ASP_PROT_M3UA) + * \param[in] prot protocol to be used (e.g OSMO_SS7_ASP_PROT_M3UA_SCTP) * \param[in] default_local_port local port to be used on missing VTY setting * \param[in] default_local_ip local IP-address to be used on missing VTY setting (NULL: use library own defaults) * \param[in] default_remote_port remote port to be used on missing VTY setting @@ -721,7 +721,7 @@ * \param[in] ctx talloc context * \param[in] name human readable name * \param[in] default_pc pointcode to be used on missing VTY setting - * \param[in] prot protocol to be used (e.g OSMO_SS7_ASP_PROT_M3UA) + * \param[in] prot protocol to be used (e.g OSMO_SS7_ASP_PROT_M3UA_SCTP) * \param[in] default_local_port local port to be used on missing VTY setting * \param[in] default_local_ip local IP-address to be used on missing VTY setting * \param[in] default_remote_port remote port to be used on missing VTY setting diff --git a/src/xua_rkm.c b/src/xua_rkm.c index 6abd17d..aba6187 100644 --- a/src/xua_rkm.c +++ b/src/xua_rkm.c @@ -237,7 +237,7 @@ } else if (asp->inst->cfg.permit_dyn_rkm_alloc) { /* Create an AS for this routing key */ snprintf(namebuf, sizeof(namebuf), "as-rkm-%u", rctx); - as = osmo_ss7_as_find_or_create(asp->inst, namebuf, OSMO_SS7_ASP_PROT_M3UA); + as = osmo_ss7_as_find_or_create(asp->inst, namebuf, OSMO_SS7_ASP_PROT_M3UA_SCTP); if (!as) { LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: Cannot create AS %s\n", namebuf); msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_INSUFF_RESRC, 0); diff --git a/src/xua_snm.c b/src/xua_snm.c index c7d0d2e..63aaa80 100644 --- a/src/xua_snm.c +++ b/src/xua_snm.c @@ -89,7 +89,7 @@ const char *info_str, bool available) { switch (asp->cfg.proto) { - case OSMO_SS7_ASP_PROT_M3UA: + case OSMO_SS7_ASP_PROT_M3UA_SCTP: m3ua_tx_snm_available(asp, rctx, num_rctx, aff_pc, num_aff_pc, info_str, available); break; case OSMO_SS7_ASP_PROT_SUA: @@ -104,7 +104,7 @@ uint32_t dpc, uint16_t user, uint16_t cause, const char *info_str) { switch (asp->cfg.proto) { - case OSMO_SS7_ASP_PROT_M3UA: + case OSMO_SS7_ASP_PROT_M3UA_SCTP: m3ua_tx_dupu(asp, rctx, num_rctx, dpc, user, cause, info_str); break; case OSMO_SS7_ASP_PROT_SUA: @@ -121,7 +121,7 @@ const char *info_string) { switch (asp->cfg.proto) { - case OSMO_SS7_ASP_PROT_M3UA: + case OSMO_SS7_ASP_PROT_M3UA_SCTP: m3ua_tx_snm_congestion(asp, rctx, num_rctx, aff_pc, num_aff_pc, concerned_dpc, cong_level, info_string); break; @@ -435,7 +435,7 @@ return; switch (asp->cfg.proto) { - case OSMO_SS7_ASP_PROT_M3UA: + case OSMO_SS7_ASP_PROT_M3UA_SCTP: cause_user = xua_msg_get_u32(xua, M3UA_IEI_USER_CAUSE); break; case OSMO_SS7_ASP_PROT_SUA: diff --git a/tests/ss7/ss7_test.c b/tests/ss7/ss7_test.c index cf48b89..e6b4968 100644 --- a/tests/ss7/ss7_test.c +++ b/tests/ss7/ss7_test.c @@ -240,7 +240,7 @@ struct osmo_ss7_asp *asp; OSMO_ASSERT(osmo_ss7_as_find_by_name(s7i, "as1") == NULL); - as = osmo_ss7_as_find_or_create(s7i, "as1", OSMO_SS7_ASP_PROT_M3UA); + as = osmo_ss7_as_find_or_create(s7i, "as1", OSMO_SS7_ASP_PROT_M3UA_SCTP); OSMO_ASSERT(as); OSMO_ASSERT(osmo_ss7_as_find_by_name(s7i, "as1") == as); OSMO_ASSERT(osmo_ss7_as_find_by_rctx(s7i, 2342) == NULL); @@ -248,7 +248,7 @@ OSMO_ASSERT(osmo_ss7_as_find_by_rctx(s7i, 2342) == as); OSMO_ASSERT(osmo_ss7_as_add_asp(as, "asp1") == -ENODEV); - asp = osmo_ss7_asp_find_or_create(s7i, "asp1", 0, M3UA_PORT, OSMO_SS7_ASP_PROT_M3UA); + asp = osmo_ss7_asp_find_or_create(s7i, "asp1", 0, M3UA_PORT, OSMO_SS7_ASP_PROT_M3UA_SCTP); OSMO_ASSERT(asp); OSMO_ASSERT(osmo_ss7_as_has_asp(as, asp) == false); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35795?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ife0ae7a4956980da40ee045b0b7eb5cd0ccd1aef Gerrit-Change-Number: 35795 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[L] Change in libosmo-sccp[master]: Implement M3UA-over-TCP (in addition to SCTP)
by fixeria 03 Feb '24

03 Feb '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35796?usp=email ) Change subject: Implement M3UA-over-TCP (in addition to SCTP) ...................................................................... Implement M3UA-over-TCP (in addition to SCTP) RFC 4666 section 1.3.1 states that "TCP MAY be used as the underlying common transport protocol" under certain scenarios. There is even IANA-allocated TCP port 2905 for that purpose (see section 1.4.8). Since TCP is a stream oriented protocol, so we need to handle message boundaries ourselves by reading the M3UA header to know the PDU length. Change-Id: I8c76d271472befacbeb998a93bbdc9e8660d9b5d Related: SYS#5424 --- M examples/sccp_demo_user.c M include/osmocom/sigtran/osmo_ss7.h M src/m3ua.c M src/osmo_ss7_asp.c M src/osmo_ss7_hmrt.c M src/osmo_ss7_vty.c M src/osmo_ss7_xua_srv.c M src/sccp_scrc.c M src/ss7_internal.h M src/xua_rkm.c M src/xua_snm.c M tests/vty/ss7_asp_test.vty 12 files changed, 274 insertions(+), 72 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/96/35796/1 diff --git a/examples/sccp_demo_user.c b/examples/sccp_demo_user.c index a9e470d..a29cf0f 100644 --- a/examples/sccp_demo_user.c +++ b/examples/sccp_demo_user.c @@ -113,7 +113,7 @@ " [-r REMOTE_ADDRESS[:REMOTE_PORT]]\n" " [-L LOCAL_POINT_CODE] [-R REMOTE_POINT_CODE]\n" "Options:\n" - " -p: protocol to use (m3ua, sua, ipa; default is ipa)\n" + " -p: protocol to use (m3ua, m3ua-tcp, sua, ipa; default is ipa)\n" " -c: Run in client mode (default is server mode)\n" " -C filename The config file to use\n" " -l: local IP address and SCTP port (default is %s:%d in server mode,\n" diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index ca7087b..381ca1a 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -279,6 +279,7 @@ OSMO_SS7_ASP_PROT_SUA, OSMO_SS7_ASP_PROT_M3UA_SCTP, OSMO_SS7_ASP_PROT_IPA, + OSMO_SS7_ASP_PROT_M3UA_TCP, _NUM_OSMO_SS7_ASP_PROT }; diff --git a/src/m3ua.c b/src/m3ua.c index 2c2a2a5..9977994 100644 --- a/src/m3ua.c +++ b/src/m3ua.c @@ -48,6 +48,10 @@ #define M3UA_MSGB_SIZE 1500 +#define proto_is_m3ua(proto) \ + (((proto) == OSMO_SS7_ASP_PROT_M3UA_SCTP) || \ + ((proto) == OSMO_SS7_ASP_PROT_M3UA_TCP)) + /*********************************************************************** * Protocol Definition (string tables, mandatory IE checking) ***********************************************************************/ @@ -478,7 +482,7 @@ { struct msgb *msg = m3ua_to_msg(xua); - OSMO_ASSERT(asp->cfg.proto == OSMO_SS7_ASP_PROT_M3UA_SCTP); + OSMO_ASSERT(proto_is_m3ua(asp->cfg.proto)); if (!msg) return -1; @@ -495,7 +499,7 @@ struct msgb *msg; int rc; - OSMO_ASSERT(as->cfg.proto == OSMO_SS7_ASP_PROT_M3UA_SCTP); + OSMO_ASSERT(proto_is_m3ua(as->cfg.proto)); /* Add RC for this AS */ if (as->cfg.routing_key.context) @@ -693,7 +697,7 @@ struct xua_msg *xua = NULL, *err = NULL; int rc = 0; - OSMO_ASSERT(asp->cfg.proto == OSMO_SS7_ASP_PROT_M3UA_SCTP); + OSMO_ASSERT(proto_is_m3ua(asp->cfg.proto)); /* caller owns msg memory, we shall neither free it here nor * keep references beyond the execution of this function and its diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c index ac30b75..b51bc6a 100644 --- a/src/osmo_ss7_asp.c +++ b/src/osmo_ss7_asp.c @@ -116,6 +116,7 @@ { OSMO_SS7_ASP_PROT_NONE, "none" }, { OSMO_SS7_ASP_PROT_SUA, "sua" }, { OSMO_SS7_ASP_PROT_M3UA_SCTP, "m3ua" }, + { OSMO_SS7_ASP_PROT_M3UA_TCP, "m3ua-tcp" }, { OSMO_SS7_ASP_PROT_IPA, "ipa" }, { 0, NULL } }; @@ -131,6 +132,7 @@ { switch (proto) { case OSMO_SS7_ASP_PROT_IPA: + case OSMO_SS7_ASP_PROT_M3UA_TCP: return IPPROTO_TCP; case OSMO_SS7_ASP_PROT_SUA: case OSMO_SS7_ASP_PROT_M3UA_SCTP: @@ -143,6 +145,7 @@ [OSMO_SS7_ASP_PROT_NONE] = 0, [OSMO_SS7_ASP_PROT_SUA] = SUA_PORT, [OSMO_SS7_ASP_PROT_M3UA_SCTP] = M3UA_PORT, + [OSMO_SS7_ASP_PROT_M3UA_TCP] = M3UA_PORT, [OSMO_SS7_ASP_PROT_IPA] = 5000, }; @@ -566,6 +569,7 @@ static int xua_cli_read_cb(struct osmo_stream_cli *conn); static int ipa_cli_read_cb(struct osmo_stream_cli *conn); +static int m3ua_tcp_cli_read_cb(struct osmo_stream_cli *conn); static int xua_cli_connect_cb(struct osmo_stream_cli *cli); int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp) @@ -604,10 +608,17 @@ osmo_stream_cli_set_proto(asp->client, ss7_asp_proto_to_ip_proto(asp->cfg.proto)); osmo_stream_cli_set_reconnect_timeout(asp->client, 5); osmo_stream_cli_set_connect_cb(asp->client, xua_cli_connect_cb); - if (asp->cfg.proto == OSMO_SS7_ASP_PROT_IPA) + switch (asp->cfg.proto) { + case OSMO_SS7_ASP_PROT_IPA: osmo_stream_cli_set_read_cb(asp->client, ipa_cli_read_cb); - else + break; + case OSMO_SS7_ASP_PROT_M3UA_TCP: + osmo_stream_cli_set_read_cb(asp->client, m3ua_tcp_cli_read_cb); + break; + default: osmo_stream_cli_set_read_cb(asp->client, xua_cli_read_cb); + break; + } osmo_stream_cli_set_data(asp->client, asp); byte = 1; /*AUTH is needed by ASCONF. enable, don't abort socket creation if AUTH can't be enabled */ osmo_stream_cli_set_param(asp->client, OSMO_STREAM_CLI_PAR_SCTP_SOCKOPT_AUTH_SUPPORTED, &byte, sizeof(byte)); @@ -838,6 +849,78 @@ return rc; } +/* netif code tells us we can read something from the socket */ +int ss7_asp_m3ua_tcp_srv_conn_cb(struct osmo_stream_srv *conn) +{ + struct osmo_ss7_asp *asp = osmo_stream_srv_get_data(conn); + int fd = osmo_stream_srv_get_fd(conn); + struct msgb *msg = asp->pending_msg; + const struct xua_common_hdr *hdr; + size_t msg_length; + int rc; + + OSMO_ASSERT(fd >= 0); + + if (msg == NULL) { + msg = m3ua_msgb_alloc(__func__); + asp->pending_msg = msg; + } + + /* read message header first */ + if (msg->len < sizeof(*hdr)) { + errno = 0; + rc = recv(fd, msg->tail, sizeof(*hdr) - msg->len, 0); + if (rc <= 0) { + if (errno == EAGAIN || errno == EINTR) + return 0; /* need more data */ + osmo_stream_srv_destroy(conn); + asp->pending_msg = NULL; + msgb_free(msg); + return rc; + } + + msgb_put(msg, rc); + if (msg->len < sizeof(*hdr)) + return 0; /* need more data */ + } + + hdr = (const struct xua_common_hdr *)msg->data; + msg_length = ntohl(hdr->msg_length); /* includes sizeof(*hdr) */ + + /* read the rest of the message */ + if (msg->len < msg_length) { + errno = 0; + rc = recv(fd, msg->tail, msg_length - msg->len, 0); + if (rc <= 0) { + if (errno == EAGAIN || errno == EINTR) + return 0; /* need more data */ + osmo_stream_srv_destroy(conn); + asp->pending_msg = NULL; + msgb_free(msg); + return rc; + } + + msgb_put(msg, rc); + if (msg->len < msg_length) + return 0; /* need more data */ + } + + msg->dst = asp; + rate_ctr_inc2(asp->ctrg, SS7_ASP_CTR_PKT_RX_TOTAL); + + /* spoof SCTP Stream ID */ + if (hdr->msg_class == M3UA_MSGC_XFER) + msgb_sctp_stream(msg) = 1; + else + msgb_sctp_stream(msg) = 0; + + rc = m3ua_rx_msg(asp, msg); + asp->pending_msg = NULL; + msgb_free(msg); + + return rc; +} + /* client has established SCTP connection to server */ static int xua_cli_connect_cb(struct osmo_stream_cli *cli) { @@ -926,6 +1009,78 @@ return ipa_rx_msg(asp, msg, fd & 0xf); } +/* read call-back for M3UA-over-TCP socket */ +static int m3ua_tcp_cli_read_cb(struct osmo_stream_cli *conn) +{ + struct osmo_ss7_asp *asp = osmo_stream_cli_get_data(conn); + int fd = osmo_stream_cli_get_fd(conn); + struct msgb *msg = asp->pending_msg; + const struct xua_common_hdr *hdr; + size_t msg_length; + int rc; + + OSMO_ASSERT(fd >= 0); + + if (msg == NULL) { + msg = m3ua_msgb_alloc(__func__); + asp->pending_msg = msg; + } + + /* read message header first */ + if (msg->len < sizeof(*hdr)) { + errno = 0; + rc = recv(fd, msg->tail, sizeof(*hdr) - msg->len, 0); + if (rc <= 0) { + if (errno == EAGAIN || errno == EINTR) + return 0; /* need more data */ + xua_cli_close_and_reconnect(conn); + asp->pending_msg = NULL; + msgb_free(msg); + return rc; + } + + msgb_put(msg, rc); + if (msg->len < sizeof(*hdr)) + return 0; /* need more data */ + } + + hdr = (const struct xua_common_hdr *)msg->data; + msg_length = ntohl(hdr->msg_length); /* includes sizeof(*hdr) */ + + /* read the rest of the message */ + if (msg->len < msg_length) { + errno = 0; + rc = recv(fd, msg->tail, msg_length - msg->len, 0); + if (rc <= 0) { + if (errno == EAGAIN || errno == EINTR) + return 0; /* need more data */ + xua_cli_close_and_reconnect(conn); + asp->pending_msg = NULL; + msgb_free(msg); + return rc; + } + + msgb_put(msg, rc); + if (msg->len < msg_length) + return 0; /* need more data */ + } + + msg->dst = asp; + rate_ctr_inc2(asp->ctrg, SS7_ASP_CTR_PKT_RX_TOTAL); + + /* spoof SCTP Stream ID */ + if (hdr->msg_class == M3UA_MSGC_XFER) + msgb_sctp_stream(msg) = 1; + else + msgb_sctp_stream(msg) = 0; + + rc = m3ua_rx_msg(asp, msg); + asp->pending_msg = NULL; + msgb_free(msg); + + return rc; +} + static int xua_cli_read_cb(struct osmo_stream_cli *conn) { struct osmo_ss7_asp *asp = osmo_stream_cli_get_data(conn); @@ -1033,6 +1188,7 @@ case OSMO_SS7_ASP_PROT_M3UA_SCTP: msgb_sctp_ppid(msg) = M3UA_PPID; break; + case OSMO_SS7_ASP_PROT_M3UA_TCP: case OSMO_SS7_ASP_PROT_IPA: break; default: @@ -1096,6 +1252,8 @@ LOGPASP(asp, DLSS7, LOGL_NOTICE, "Rx IPA for unknown Stream ID 0x%02x: %s\n", ppid_mux, msgb_hexdump(msg)); break; + case OSMO_SS7_ASP_PROT_M3UA_TCP: + OSMO_ASSERT(0); /* shall not happen */ default: LOGPASP(asp, DLSS7, LOGL_NOTICE, "Rx SCTP chunk for unknown PPID %u: %s\n", ppid_mux, msgb_hexdump(msg)); @@ -1109,6 +1267,7 @@ { switch (asp->cfg.proto) { case OSMO_SS7_ASP_PROT_M3UA_SCTP: + case OSMO_SS7_ASP_PROT_M3UA_TCP: return DLM3UA; case OSMO_SS7_ASP_PROT_SUA: return DLSUA; diff --git a/src/osmo_ss7_hmrt.c b/src/osmo_ss7_hmrt.c index 76b174b..6c8ad73 100644 --- a/src/osmo_ss7_hmrt.c +++ b/src/osmo_ss7_hmrt.c @@ -238,6 +238,7 @@ switch (as->cfg.proto) { case OSMO_SS7_ASP_PROT_M3UA_SCTP: + case OSMO_SS7_ASP_PROT_M3UA_TCP: DEBUGP(DLSS7, "rt->dest.as proto is M3UA for dpc=%u=%s\n", dpc, osmo_ss7_pointcode_print(inst, dpc)); return m3ua_tx_xua_as(as,xua); diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 5b8269f..eed9874 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -55,11 +55,12 @@ #include <osmocom/netif/sctp.h> #endif -#define XUA_VAR_STR "(sua|m3ua|ipa)" +#define XUA_VAR_STR "(sua|m3ua|m3ua-tcp|ipa)" #define XUA_VAR_HELP_STR \ - "SCCP User Adaptation\n" \ - "MTP3 User Adaptation\n" \ + "SCCP User Adaptation\n" \ + "MTP3 User Adaptation (SCTP)\n" \ + "MTP3 User Adaptation (TCP)\n" \ "IPA Multiplex (SCCP Lite)\n" /* netinet/tcp.h */ @@ -479,7 +480,7 @@ DEFUN_ATTR(cs7_xua, cs7_xua_cmd, "listen " XUA_VAR_STR " <0-65534>", "Configure/Enable xUA Listener\n" - XUA_VAR_HELP_STR "SCTP Port number\n", + XUA_VAR_HELP_STR "SCTP/TCP Port number\n", CMD_ATTR_IMMEDIATE) { struct osmo_ss7_instance *inst = vty->index; @@ -503,8 +504,8 @@ DEFUN_ATTR(no_cs7_xua, no_cs7_xua_cmd, "no listen " XUA_VAR_STR " <0-65534>", - NO_STR "Disable xUA Listener on given SCTP Port\n" - XUA_VAR_HELP_STR "SCTP Port number\n", + NO_STR "Disable xUA Listener on given SCTP/TCP Port\n" + XUA_VAR_HELP_STR "SCTP/TCP Port number\n", CMD_ATTR_IMMEDIATE) { struct osmo_ss7_instance *inst = vty->index; @@ -665,7 +666,7 @@ DEFUN(show_cs7_xua, show_cs7_xua_cmd, "show cs7 "XUA_VAR_STR" [<0-65534>]", - SHOW_STR CS7_STR XUA_VAR_HELP_STR "Port Number") + SHOW_STR CS7_STR XUA_VAR_HELP_STR "SCTP/TCP Port Number") { struct osmo_ss7_instance *inst; struct osmo_xua_server *xs; @@ -713,8 +714,8 @@ "asp NAME <0-65535> <0-65535> " XUA_VAR_STR, "Configure Application Server Process\n" "Name of ASP\n" - "Remote SCTP port number\n" - "Local SCTP port number\n" + "Remote SCTP/TCP port number\n" + "Local SCTP/TCP port number\n" XUA_VAR_HELP_STR, CMD_ATTR_NODE_EXIT) { @@ -787,7 +788,7 @@ if (!ss7_asp_is_started(asp)) return CMD_SUCCESS; - if (asp->cfg.proto == OSMO_SS7_ASP_PROT_IPA) + if (ss7_asp_proto_to_ip_proto(asp->cfg.proto) != IPPROTO_SCTP) return CMD_SUCCESS; /* The SCTP socket is already created. */ @@ -833,7 +834,7 @@ } if (ss7_asp_is_started(asp)) { - if (asp->cfg.proto != OSMO_SS7_ASP_PROT_IPA) { + if (ss7_asp_proto_to_ip_proto(asp->cfg.proto) == IPPROTO_SCTP) { if ((rc = ss7_asp_apply_drop_local_address(asp, idx)) < 0) { vty_out(vty, "%% Failed removing local address '%s' from existing socket%s", argv[0], VTY_NEWLINE); return CMD_WARNING; @@ -869,17 +870,15 @@ if (!ss7_asp_is_started(asp)) return CMD_SUCCESS; - if (asp->cfg.proto == OSMO_SS7_ASP_PROT_IPA) + if (ss7_asp_proto_to_ip_proto(asp->cfg.proto) != IPPROTO_SCTP) return CMD_SUCCESS; /* The SCTP socket is already created, dynamically apply the new primary if it changed: */ - if (asp->cfg.proto != OSMO_SS7_ASP_PROT_IPA && ss7_asp_is_started(asp)) { - if ((rc = ss7_asp_apply_primary_address(asp)) < 0) { - /* Failed, rollback changes: */ - asp->cfg.remote.idx_primary = old_idx_primary; - vty_out(vty, "%% Failed applying primary on host '%s'%s", argv[0], VTY_NEWLINE); - return CMD_WARNING; - } + if ((rc = ss7_asp_apply_primary_address(asp)) < 0) { + /* Failed, rollback changes: */ + asp->cfg.remote.idx_primary = old_idx_primary; + vty_out(vty, "%% Failed applying primary on host '%s'%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; } return CMD_SUCCESS; } @@ -1202,7 +1201,7 @@ osmo_ss7_asp_peer_snprintf(buf_rem, sizeof(buf_rem), &asp->cfg.remote); } - vty_out(vty, "%-12s %-12s %-13s %-4s %-4s %-9s %-23s %-23s%s", + vty_out(vty, "%-12s %-12s %-13s %-8s %-4s %-9s %-23s %-23s%s", asp->cfg.name, as_list_for_asp(asp, as_buf, sizeof(as_buf)), asp->fi ? osmo_fsm_inst_state_name(asp->fi) : "uninitialized", @@ -1232,8 +1231,8 @@ } } - vty_out(vty, "ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses%s", VTY_NEWLINE); - vty_out(vty, "------------ ------------ ------------- ---- ---- --------- ----------------------- -----------------------%s", VTY_NEWLINE); + vty_out(vty, "ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses%s", VTY_NEWLINE); + vty_out(vty, "------------ ------------ ------------- -------- ---- --------- ----------------------- -----------------------%s", VTY_NEWLINE); if (asp) { show_one_asp(vty, asp); @@ -1992,7 +1991,7 @@ SHOW_STR CS7_STR INST_STR INST_STR "Application Server (AS)\n" "Display all active ASs\n" "Display all ASs (default)\n" - "Display all m3ua ASs\n" + "Display all M3UA (SCTP and TCP) ASs\n" "Display all SUA ASs\n") { struct osmo_ss7_instance *inst; @@ -2011,8 +2010,11 @@ vty_out(vty, "------------ ------------ ---------- ------------- ---- ------------- --- ----- ----- -------%s", VTY_NEWLINE); llist_for_each_entry(as, &inst->as_list, list) { - if (filter && !strcmp(filter, "m3ua") && as->cfg.proto != OSMO_SS7_ASP_PROT_M3UA_SCTP) - continue; + if (filter && !strcmp(filter, "m3ua")) { + if (as->cfg.proto != OSMO_SS7_ASP_PROT_M3UA_SCTP && + as->cfg.proto != OSMO_SS7_ASP_PROT_M3UA_TCP) + continue; + } if (filter && !strcmp(filter, "sua") && as->cfg.proto != OSMO_SS7_ASP_PROT_SUA) continue; if (filter && !strcmp(filter, "active") && !osmo_ss7_as_active(as)) diff --git a/src/osmo_ss7_xua_srv.c b/src/osmo_ss7_xua_srv.c index 32266ff..365b955 100644 --- a/src/osmo_ss7_xua_srv.c +++ b/src/osmo_ss7_xua_srv.c @@ -71,14 +71,22 @@ LOGP(DLSS7, LOGL_INFO, "%s: New %s connection accepted\n", sock_name, proto_name); - if (oxs->cfg.proto == OSMO_SS7_ASP_PROT_IPA) { + switch (oxs->cfg.proto) { + case OSMO_SS7_ASP_PROT_IPA: srv = osmo_stream_srv_create(oxs, link, fd, ss7_asp_ipa_srv_conn_cb, ss7_asp_xua_srv_conn_closed_cb, NULL); - } else { + break; + case OSMO_SS7_ASP_PROT_M3UA_TCP: + srv = osmo_stream_srv_create(oxs, link, fd, + ss7_asp_m3ua_tcp_srv_conn_cb, + ss7_asp_xua_srv_conn_closed_cb, NULL); + break; + default: srv = osmo_stream_srv_create(oxs, link, fd, ss7_asp_xua_srv_conn_cb, ss7_asp_xua_srv_conn_closed_cb, NULL); + break; } if (!srv) { LOGP(DLSS7, LOGL_ERROR, "%s: Unable to create stream server " @@ -157,7 +165,7 @@ * data */ osmo_stream_srv_set_data(srv, asp); - if (oxs->cfg.proto != OSMO_SS7_ASP_PROT_IPA) { + if (ss7_asp_proto_to_ip_proto(asp->cfg.proto) == IPPROTO_SCTP) { rc = ss7_asp_apply_peer_primary_address(asp); rc = ss7_asp_apply_primary_address(asp); } diff --git a/src/sccp_scrc.c b/src/sccp_scrc.c index 79b2857..ac9f63e 100644 --- a/src/sccp_scrc.c +++ b/src/sccp_scrc.c @@ -152,6 +152,7 @@ case OSMO_SS7_ASP_PROT_SUA: return sua_tx_xua_as(as, xua); case OSMO_SS7_ASP_PROT_M3UA_SCTP: + case OSMO_SS7_ASP_PROT_M3UA_TCP: case OSMO_SS7_ASP_PROT_IPA: return sua2sccp_tx_m3ua(inst, xua); default: diff --git a/src/ss7_internal.h b/src/ss7_internal.h index fd01ca4..f6e73d6 100644 --- a/src/ss7_internal.h +++ b/src/ss7_internal.h @@ -25,6 +25,7 @@ int ss7_asp_proto_to_ip_proto(enum osmo_ss7_asp_protocol proto); int ss7_asp_ipa_srv_conn_cb(struct osmo_stream_srv *conn); int ss7_asp_xua_srv_conn_cb(struct osmo_stream_srv *conn); +int ss7_asp_m3ua_tcp_srv_conn_cb(struct osmo_stream_srv *conn); int ss7_asp_xua_srv_conn_closed_cb(struct osmo_stream_srv *srv); int ss7_asp_apply_peer_primary_address(const struct osmo_ss7_asp *asp); int ss7_asp_apply_primary_address(const struct osmo_ss7_asp *asp); diff --git a/src/xua_rkm.c b/src/xua_rkm.c index aba6187..bb8bc0f 100644 --- a/src/xua_rkm.c +++ b/src/xua_rkm.c @@ -237,6 +237,7 @@ } else if (asp->inst->cfg.permit_dyn_rkm_alloc) { /* Create an AS for this routing key */ snprintf(namebuf, sizeof(namebuf), "as-rkm-%u", rctx); + /* XXX: M3UA-over-SCTP or M3UA-over-TCP? Can we use asp->cfg.proto maybe? */ as = osmo_ss7_as_find_or_create(asp->inst, namebuf, OSMO_SS7_ASP_PROT_M3UA_SCTP); if (!as) { LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: Cannot create AS %s\n", namebuf); diff --git a/src/xua_snm.c b/src/xua_snm.c index 63aaa80..9eee07d 100644 --- a/src/xua_snm.c +++ b/src/xua_snm.c @@ -90,6 +90,7 @@ { switch (asp->cfg.proto) { case OSMO_SS7_ASP_PROT_M3UA_SCTP: + case OSMO_SS7_ASP_PROT_M3UA_TCP: m3ua_tx_snm_available(asp, rctx, num_rctx, aff_pc, num_aff_pc, info_str, available); break; case OSMO_SS7_ASP_PROT_SUA: @@ -105,6 +106,7 @@ { switch (asp->cfg.proto) { case OSMO_SS7_ASP_PROT_M3UA_SCTP: + case OSMO_SS7_ASP_PROT_M3UA_TCP: m3ua_tx_dupu(asp, rctx, num_rctx, dpc, user, cause, info_str); break; case OSMO_SS7_ASP_PROT_SUA: @@ -122,6 +124,7 @@ { switch (asp->cfg.proto) { case OSMO_SS7_ASP_PROT_M3UA_SCTP: + case OSMO_SS7_ASP_PROT_M3UA_TCP: m3ua_tx_snm_congestion(asp, rctx, num_rctx, aff_pc, num_aff_pc, concerned_dpc, cong_level, info_string); break; @@ -436,6 +439,7 @@ switch (asp->cfg.proto) { case OSMO_SS7_ASP_PROT_M3UA_SCTP: + case OSMO_SS7_ASP_PROT_M3UA_TCP: cause_user = xua_msg_get_u32(xua, M3UA_IEI_USER_CAUSE); break; case OSMO_SS7_ASP_PROT_SUA: diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty index 914d8d4..36187b1 100644 --- a/tests/vty/ss7_asp_test.vty +++ b/tests/vty/ss7_asp_test.vty @@ -1,7 +1,7 @@ ss7_asp_vty_test> list ... !show cs7 show cs7 instance <0-15> users - show cs7 (sua|m3ua|ipa) [<0-65534>] + show cs7 (sua|m3ua|m3ua-tcp|ipa) [<0-65534>] show cs7 config show cs7 instance <0-15> asp show cs7 instance <0-15> asp name ASP_NAME @@ -22,7 +22,7 @@ ss7_asp_vty_test# list ... !show cs7 show cs7 instance <0-15> users - show cs7 (sua|m3ua|ipa) [<0-65534>] + show cs7 (sua|m3ua|m3ua-tcp|ipa) [<0-65534>] show cs7 config show cs7 instance <0-15> asp show cs7 instance <0-15> asp name ASP_NAME @@ -47,12 +47,13 @@ ss7_asp_vty_test# show cs7 ? instance An instance of the SS7 stack sua SCCP User Adaptation - m3ua MTP3 User Adaptation + m3ua MTP3 User Adaptation (SCTP) + m3ua-tcp MTP3 User Adaptation (TCP) ipa IPA Multiplex (SCCP Lite) config Currently running cs7 configuration ss7_asp_vty_test# show cs7 m3ua ? - [<0-65534>] Port Number + [<0-65534>] SCTP/TCP Port Number ss7_asp_vty_test# show cs7 instance ? <0-15> An instance of the SS7 stack @@ -69,7 +70,7 @@ ss7_asp_vty_test# show cs7 instance 0 as ? active Display all active ASs all Display all ASs (default) - m3ua Display all m3ua ASs + m3ua Display all M3UA (SCTP and TCP) ASs sua Display all SUA ASs ss7_asp_vty_test# show cs7 instance 0 sccp ? @@ -94,9 +95,9 @@ point-code format default point-code delimiter (default|dash) xua rkm routing-key-allocation (static-only|dynamic-permitted) - asp NAME <0-65535> <0-65535> (sua|m3ua|ipa) + asp NAME <0-65535> <0-65535> (sua|m3ua|m3ua-tcp|ipa) no asp NAME - as NAME (sua|m3ua|ipa) + as NAME (sua|m3ua|m3ua-tcp|ipa) no as NAME sccp-address NAME no sccp-address NAME @@ -153,20 +154,22 @@ ss7_asp_vty_test(config-cs7)# asp ? NAME Name of ASP ss7_asp_vty_test(config-cs7)# asp foo ? - <0-65535> Remote SCTP port number + <0-65535> Remote SCTP/TCP port number ss7_asp_vty_test(config-cs7)# asp foo 0 ? - <0-65535> Local SCTP port number + <0-65535> Local SCTP/TCP port number ss7_asp_vty_test(config-cs7)# asp foo 0 0 ? - sua SCCP User Adaptation - m3ua MTP3 User Adaptation - ipa IPA Multiplex (SCCP Lite) + sua SCCP User Adaptation + m3ua MTP3 User Adaptation (SCTP) + m3ua-tcp MTP3 User Adaptation (TCP) + ipa IPA Multiplex (SCCP Lite) ss7_asp_vty_test(config-cs7)# as ? NAME Name of the Application Server ss7_asp_vty_test(config-cs7)# as foo ? - sua SCCP User Adaptation - m3ua MTP3 User Adaptation - ipa IPA Multiplex (SCCP Lite) + sua SCCP User Adaptation + m3ua MTP3 User Adaptation (SCTP) + m3ua-tcp MTP3 User Adaptation (TCP) + ipa IPA Multiplex (SCCP Lite) ss7_asp_vty_test(config-cs7)# sccp-address ? NAME Name of the SCCP Address @@ -268,24 +271,24 @@ ss7_asp_vty_test(config-cs7-asp)# remote-ip 127.0.0.200 ss7_asp_vty_test(config-cs7-asp)# local-ip 127.0.0.100 ss7_asp_vty_test(config-cs7-asp)# do show cs7 instance 0 asp -ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses ------------- ------------ ------------- ---- ---- --------- ----------------------- ----------------------- -my-asp ? uninitialized m3ua sg server 127.0.0.100:54321 127.0.0.200:12345 +ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses +------------ ------------ ------------- -------- ---- --------- ----------------------- ----------------------- +my-asp ? uninitialized m3ua sg server 127.0.0.100:54321 127.0.0.200:12345 ss7_asp_vty_test(config-cs7-asp)# remote-ip 127.0.0.201 ss7_asp_vty_test(config-cs7-asp)# local-ip 127.0.0.101 ss7_asp_vty_test(config-cs7-asp)# do show cs7 instance 0 asp -ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses ------------- ------------ ------------- ---- ---- --------- ----------------------- ----------------------- -my-asp ? uninitialized m3ua sg server (127.0.0.100|127.0.0.101):54321 (127.0.0.200|127.0.0.201):12345 +ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses +------------ ------------ ------------- -------- ---- --------- ----------------------- ----------------------- +my-asp ? uninitialized m3ua sg server (127.0.0.100|127.0.0.101):54321 (127.0.0.200|127.0.0.201):12345 ss7_asp_vty_test(config-cs7-asp)# ! Mark as primary: ss7_asp_vty_test(config-cs7-asp)# remote-ip 127.0.0.201 primary ss7_asp_vty_test(config-cs7-asp)# ! 'local-ip 127.0.0.101 primary' cannot be tested here since output may be different based on sysctl available ss7_asp_vty_test(config-cs7-asp)# local-ip 127.0.0.101 ... ss7_asp_vty_test(config-cs7-asp)# do show cs7 instance 0 asp -ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses ------------- ------------ ------------- ---- ---- --------- ----------------------- ----------------------- -my-asp ? uninitialized m3ua sg server (127.0.0.100|127.0.0.101):54321 (127.0.0.200|127.0.0.201*):12345 +ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses +------------ ------------ ------------- -------- ---- --------- ----------------------- ----------------------- +my-asp ? uninitialized m3ua sg server (127.0.0.100|127.0.0.101):54321 (127.0.0.200|127.0.0.201*):12345 ss7_asp_vty_test(config-cs7-asp)# show running-config ... local-ip 127.0.0.100 @@ -298,9 +301,9 @@ ss7_asp_vty_test(config-cs7-asp)# remote-ip 127.0.0.201 ss7_asp_vty_test(config-cs7-asp)# local-ip 127.0.0.101 ss7_asp_vty_test(config-cs7-asp)# do show cs7 instance 0 asp -ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses ------------- ------------ ------------- ---- ---- --------- ----------------------- ----------------------- -my-asp ? uninitialized m3ua sg server (127.0.0.100|127.0.0.101):54321 (127.0.0.200|127.0.0.201):12345 +ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses +------------ ------------ ------------- -------- ---- --------- ----------------------- ----------------------- +my-asp ? uninitialized m3ua sg server (127.0.0.100|127.0.0.101):54321 (127.0.0.200|127.0.0.201):12345 ss7_asp_vty_test(config-cs7-asp)# show running-config ... local-ip 127.0.0.100 @@ -369,23 +372,23 @@ ss7_asp_vty_test(config-cs7-as)# routing-key 0 3.2.1 ss7_asp_vty_test(config-cs7-as)# do show cs7 instance 0 asp -ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses ------------- ------------ ------------- ---- ---- --------- ----------------------- ----------------------- -my-asp my-ass ASP_DOWN m3ua sg server (127.0.0.100|127.0.0.101):54321 (127.0.0.200|127.0.0.201):12345 +ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses +------------ ------------ ------------- -------- ---- --------- ----------------------- ----------------------- +my-asp my-ass ASP_DOWN m3ua sg server (127.0.0.100|127.0.0.101):54321 (127.0.0.200|127.0.0.201):12345 ss7_asp_vty_test(config-cs7-as)# exit ss7_asp_vty_test(config-cs7)# do show cs7 instance 0 asp -ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses ------------- ------------ ------------- ---- ---- --------- ----------------------- ----------------------- -my-asp my-ass ASP_DOWN m3ua sg server (127.0.0.100|127.0.0.101):54321 (127.0.0.200|127.0.0.201):12345 +ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses +------------ ------------ ------------- -------- ---- --------- ----------------------- ----------------------- +my-asp my-ass ASP_DOWN m3ua sg server (127.0.0.100|127.0.0.101):54321 (127.0.0.200|127.0.0.201):12345 ss7_asp_vty_test(config-cs7)# exit ss7_asp_vty_test(config)# do show cs7 instance 0 asp -ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses ------------- ------------ ------------- ---- ---- --------- ----------------------- ----------------------- -my-asp my-ass ASP_DOWN m3ua sg server (127.0.0.100|127.0.0.101):54321 (127.0.0.200|127.0.0.201):12345 +ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses +------------ ------------ ------------- -------- ---- --------- ----------------------- ----------------------- +my-asp my-ass ASP_DOWN m3ua sg server (127.0.0.100|127.0.0.101):54321 (127.0.0.200|127.0.0.201):12345 ss7_asp_vty_test(config)# do show cs7 instance 0 as all Routing Routing Key Cic Cic Traffic @@ -428,8 +431,8 @@ ss7_asp_vty_test(config-cs7)# no asp my-asp ss7_asp_vty_test(config-cs7)# do show cs7 instance 0 asp -ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses ------------- ------------ ------------- ---- ---- --------- ----------------------- ----------------------- +ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses +------------ ------------ ------------- -------- ---- --------- ----------------------- ----------------------- ss7_asp_vty_test(config-cs7)# do show cs7 instance 0 as all Routing Routing Key Cic Cic Traffic -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35796?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I8c76d271472befacbeb998a93bbdc9e8660d9b5d Gerrit-Change-Number: 35796 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-bsc[master]: abis_nm: fix -Wunused-but-set-variable (bug)
by fixeria 03 Feb '24

03 Feb '24
Attention is currently required from: laforge. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35791?usp=email ) Change subject: abis_nm: fix -Wunused-but-set-variable (bug) ...................................................................... Patch Set 1: (2 comments) File include/osmocom/bsc/abis_nm.h: https://gerrit.osmocom.org/c/osmo-bsc/+/35791/comment/a3ca5e67_86151765 PS1, Line 89: uint8_t i2, uint8_t i3, int nack, > unrelated cosmetic change Moved to https://gerrit.osmocom.org/c/osmo-bsc/+/35794. File src/osmo-bsc/abis_nm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/35791/comment/467c3fd6_eb82955d PS1, Line 2168: const uint8_t *attr, int attr_len) > unrelated cosmetic change Moved to https://gerrit.osmocom.org/c/osmo-bsc/+/35794. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35791?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3ca8e761fdf99dd498a979ccc9d53c6c3e03e2cc Gerrit-Change-Number: 35791 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Fri, 02 Feb 2024 23:40:43 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-bsc[master]: abis_nm: misc/cosmetic changes to abis_nm_sw_act_req_ack()
by fixeria 03 Feb '24

03 Feb '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35794?usp=email ) Change subject: abis_nm: misc/cosmetic changes to abis_nm_sw_act_req_ack() ...................................................................... abis_nm: misc/cosmetic changes to abis_nm_sw_act_req_ack() Change-Id: I2849a22647805e7477d66055c18614a3a9f80748 --- M include/osmocom/bsc/abis_nm.h M src/osmo-bsc/abis_nm.c 2 files changed, 17 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/94/35794/1 diff --git a/include/osmocom/bsc/abis_nm.h b/include/osmocom/bsc/abis_nm.h index 7f1ec74..59a6dc9 100644 --- a/include/osmocom/bsc/abis_nm.h +++ b/include/osmocom/bsc/abis_nm.h @@ -86,7 +86,8 @@ int abis_nm_set_radio_attr(struct gsm_bts_trx *trx, uint8_t *attr, int attr_len); int abis_nm_set_channel_attr(struct gsm_bts_trx_ts *ts, uint8_t chan_comb); int abis_nm_sw_act_req_ack(struct gsm_bts *bts, uint8_t obj_class, uint8_t i1, - uint8_t i2, uint8_t i3, int nack, uint8_t *attr, int att_len); + uint8_t i2, uint8_t i3, int nack, + const uint8_t *attr, int attr_len); int abis_nm_raw_msg(struct gsm_bts *bts, int len, uint8_t *msg); int abis_nm_event_reports(struct gsm_bts *bts, int on); int abis_nm_reset_resource(struct gsm_bts *bts); diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index 81a0272..e8327dd 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -2164,12 +2164,13 @@ } int abis_nm_sw_act_req_ack(struct gsm_bts *bts, uint8_t obj_class, uint8_t i1, - uint8_t i2, uint8_t i3, int nack, uint8_t *attr, int att_len) + uint8_t i2, uint8_t i3, int nack, + const uint8_t *attr, int attr_len) { struct abis_om_hdr *oh; struct msgb *msg = nm_msgb_alloc(); uint8_t msgtype = NM_MT_SW_ACT_REQ_ACK; - uint8_t len = att_len; + uint8_t len = attr_len; if (nack) { len += 2; @@ -2177,12 +2178,10 @@ } oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE); - fill_om_fom_hdr(oh, att_len, msgtype, obj_class, i1, i2, i3); + fill_om_fom_hdr(oh, attr_len, msgtype, obj_class, i1, i2, i3); - if (attr) { - uint8_t *ptr = msgb_put(msg, att_len); - memcpy(ptr, attr, att_len); - } + if (attr != NULL && attr_len > 0) + memcpy(msgb_put(msg, attr_len), attr, attr_len); if (nack) msgb_tv_put(msg, NM_ATT_NACK_CAUSES, NM_NACK_OBJCLASS_NOTSUPP); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35794?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I2849a22647805e7477d66055c18614a3a9f80748 Gerrit-Change-Number: 35794 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-bsc[master]: abis_nm: fix -Wunused-but-set-variable (bug)
by fixeria 03 Feb '24

03 Feb '24
Attention is currently required from: fixeria. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/35791?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: abis_nm: fix -Wunused-but-set-variable (bug) ...................................................................... abis_nm: fix -Wunused-but-set-variable (bug) clang warns us about 'len' being set, but not used: And this is abis_nm.c:2172:10: warning: variable 'len' set but not used [-Wunused-but-set-variable] uint8_t len = attr_len; ^ This is actually a bug, because in the case of NACK we append 2 more bytes {NM_ATT_NACK_CAUSES, NM_NACK_OBJCLASS_NOTSUPP}, and we need to pass the final length to fill_om_fom_hdr(), including those optional two bytes. Passing 'attr_len' (length of 'attr') is wrong. Change-Id: I3ca8e761fdf99dd498a979ccc9d53c6c3e03e2cc --- M src/osmo-bsc/abis_nm.c 1 file changed, 26 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/91/35791/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35791?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3ca8e761fdf99dd498a979ccc9d53c6c3e03e2cc Gerrit-Change-Number: 35791 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in libosmo-gprs[master]: rlcmac: tbf_ul: Fix wrong parenthesis around macro
by pespin 02 Feb '24

02 Feb '24
Attention is currently required from: pespin. Hello Jenkins Builder, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-gprs/+/35787?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: rlcmac: tbf_ul: Fix wrong parenthesis around macro ...................................................................... rlcmac: tbf_ul: Fix wrong parenthesis around macro The logic doesn't seem to be affected by the fact that the parenthesis were wrong. Change-Id: I3f4aeff45c3fd5a007b050bd78283baaca2a18d7 --- M src/rlcmac/tbf_ul.c 1 file changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/87/35787/3 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/35787?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I3f4aeff45c3fd5a007b050bd78283baaca2a18d7 Gerrit-Change-Number: 35787 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in libosmo-gprs[master]: rlcmac: Add new structure to allow passing FN+TN to TBF handling func...
by pespin 02 Feb '24

02 Feb '24
Attention is currently required from: fixeria. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-gprs/+/35782?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: rlcmac: Add new structure to allow passing FN+TN to TBF handling functions ...................................................................... rlcmac: Add new structure to allow passing FN+TN to TBF handling functions The different paths will be updated as required as needed in the future. Until now it was difficult while still valuable to have access to current FN+TS, even if only for logging. Follow up patch will use this info to be able to calculate poll FN from RRBP more deep in the stack (ul_tbf_fsm). Change-Id: Ifa09cd70c915aa3a2b799412cb02315aaebc0503 --- M include/osmocom/gprs/rlcmac/rlcmac_private.h M include/osmocom/gprs/rlcmac/tbf_ul.h M src/rlcmac/rlcmac.c M src/rlcmac/tbf_ul.c 4 files changed, 64 insertions(+), 49 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/82/35782/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/35782?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ifa09cd70c915aa3a2b799412cb02315aaebc0503 Gerrit-Change-Number: 35782 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • ...
  • 175
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.