Attention is currently required from: neels.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sccp/+/32361
to look at the new patch set (#2).
Change subject: SCCP: implement variable limit on Optional Data (CR,CC,CREF,RLSD)
......................................................................
SCCP: implement variable limit on Optional Data (CR,CC,CREF,RLSD)
When the Optional Data surpasses 130 bytes, it is not sent as part of
SCCP CR, CC, CREF or RLSD messages, but gets sent separately in a Data
Form 1.
Make this 130 user configurable. This is specified to be 130 bytes
exactly, but to interop with non-conforming peers, make this limit
adjustable per cs7 instance, via osmo_sccp_vty_init().
Add and test new VTY config:
cs7 instance N
sccp max-optional-data (<0-999999>|standard)
Related: ITU-T Q.713 4.2 to 4.5
Related: Ia68dad973ef18513b52f5accb5264c557c7295ea osmo-ttcn3-hacks
Related: SYS#6423
Change-Id: If35697234796af8943691b2de62218e7dc93a08c
---
M src/sccp_internal.h
M src/sccp_scoc.c
M src/sccp_user.c
M src/sccp_vty.c
M tests/vty/ss7_asp_test.vty
5 files changed, 112 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/61/32361/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/32361
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: If35697234796af8943691b2de62218e7dc93a08c
Gerrit-Change-Number: 32361
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/32361 )
Change subject: SCCP: implement variable limit on Optional Data (CR,CC,CREF,RLSD)
......................................................................
Patch Set 1:
(1 comment)
File src/sccp_vty.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-6047):
https://gerrit.osmocom.org/c/libosmo-sccp/+/32361/comment/d28be419_7d720dca
PS1, Line 177: "Set a non-standard maxium allowed number of bytes\n"
'maxium' may be misspelled - perhaps 'maximum'?
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/32361
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: If35697234796af8943691b2de62218e7dc93a08c
Gerrit-Change-Number: 32361
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Tue, 18 Apr 2023 23:48:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/32361 )
Change subject: SCCP: implement variable limit on Optional Data (CR,CC,CREF,RLSD)
......................................................................
SCCP: implement variable limit on Optional Data (CR,CC,CREF,RLSD)
When the Optional Data surpasses 130 bytes, it is not sent as part of
SCCP CR, CC, CREF or RLSD messages, but gets sent separately in a Data
Form 1.
Make this 130 user configurable. This is specified to be 130 bytes
exactly, but to interop with non-conforming peers, make this limit
adjustable per cs7 instance, via osmo_sccp_vty_init().
Add and test new VTY config:
cs7 instance N
sccp max-optional-data (<0-999999>|standard)
Related: ITU-T Q.713 4.2 to 4.5
Related: Ia68dad973ef18513b52f5accb5264c557c7295ea osmo-ttcn3-hacks
Related: SYS#6423
Change-Id: If35697234796af8943691b2de62218e7dc93a08c
---
M src/sccp_internal.h
M src/sccp_scoc.c
M src/sccp_user.c
M src/sccp_vty.c
M tests/vty/ss7_asp_test.vty
5 files changed, 111 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/61/32361/1
diff --git a/src/sccp_internal.h b/src/sccp_internal.h
index bfdca34..3027ae6 100644
--- a/src/sccp_internal.h
+++ b/src/sccp_internal.h
@@ -58,6 +58,8 @@
struct osmo_ss7_user ss7_user;
struct osmo_sccp_timer_val timers[OSMO_SCCP_TIMERS_COUNT];
+
+ uint32_t max_optional_data;
};
struct osmo_sccp_user {
diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c
index c929ed6..1838615 100644
--- a/src/sccp_scoc.c
+++ b/src/sccp_scoc.c
@@ -676,11 +676,12 @@
static bool xua_opt_data_cache_keep(struct sccp_connection *conn, const struct osmo_scu_prim *prim, int msg_type)
{
uint8_t *buf;
+ uint32_t max_optional_data = conn->inst->max_optional_data;
if (xua_drop_data_check_drop(prim, SCCP_MAX_DATA, "cache overrun"))
return false;
- if (msgb_l2len(prim->oph.msg) > SCCP_MAX_OPTIONAL_DATA) {
+ if (msgb_l2len(prim->oph.msg) > max_optional_data) {
if (conn->opt_data_cache) {
/* Caching optional data, but there already is optional data occupying the cache: */
LOGP(DLSCCP, LOGL_ERROR, "replacing unsent %u bytes of optional data cache with %s optional data\n",
@@ -703,6 +704,8 @@
/* Check optional Data size limit, cache if necessary, return indication whether original opt data should be sent */
static bool xua_opt_data_length_lim(struct sccp_connection *conn, const struct osmo_scu_prim *prim, int msg_type)
{
+ uint32_t max_optional_data = conn->inst->max_optional_data;
+
if (!(prim && msgb_l2(prim->oph.msg) && msgb_l2len(prim->oph.msg)))
return false;
@@ -711,7 +714,7 @@
case SUA_CO_COAK: /* §4.3 Connection confirm (CC) */
return xua_opt_data_cache_keep(conn, prim, msg_type);
case SUA_CO_COREF: /* §4.4 Connection refused (CREF) */
- if (xua_drop_data_check_drop(prim, SCCP_MAX_OPTIONAL_DATA, "over ITU-T Rec. Q.713 §4.4 limit")) {
+ if (xua_drop_data_check_drop(prim, max_optional_data, "over ITU-T Rec. Q.713 §4.4 limit")) {
/* From the state diagrams in ITU-T Rec Q.714, there's no way to send DT1 neither before nor after CREF
* at this point, so the only option we have is to drop optional data:
* see Figure C.3 / Q.714 (sheet 2 of 6) */
@@ -719,7 +722,7 @@
}
break;
case SUA_CO_RELRE: /* §4.5 Released (RLSD) */
- if (msgb_l2len(prim->oph.msg) > SCCP_MAX_OPTIONAL_DATA) {
+ if (msgb_l2len(prim->oph.msg) > max_optional_data) {
if (xua_drop_data_check_drop(prim, SCCP_MAX_DATA, "protocol error"))
return false;
/* There's no need to cache the optional data since the connection is still active at this point:
diff --git a/src/sccp_user.c b/src/sccp_user.c
index e619c90..34c663d 100644
--- a/src/sccp_user.c
+++ b/src/sccp_user.c
@@ -35,6 +35,7 @@
#include <osmocom/sigtran/mtp_sap.h>
#include <osmocom/sigtran/protocol/mtp.h>
#include <osmocom/sigtran/sccp_helpers.h>
+#include <osmocom/sccp/sccp_types.h>
#include "sccp_internal.h"
#include "xua_internal.h"
@@ -235,6 +236,7 @@
inst->ss7_user.name = "SCCP";
inst->ss7_user.prim_cb = mtp_user_prim_cb;
inst->ss7_user.priv = inst;
+ inst->max_optional_data = SCCP_MAX_OPTIONAL_DATA;
rc = sccp_scmg_init(inst);
if (rc < 0) {
diff --git a/src/sccp_vty.c b/src/sccp_vty.c
index 13fe402..1aa3e51 100644
--- a/src/sccp_vty.c
+++ b/src/sccp_vty.c
@@ -37,6 +37,8 @@
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/protocol/mtp.h>
+#include <osmocom/sccp/sccp_types.h>
+
#include "xua_internal.h"
#include "sccp_internal.h"
@@ -165,6 +167,35 @@
return CMD_SUCCESS;
}
+DEFUN_ATTR(sccp_max_optional_data, sccp_max_optional_data_cmd,
+ "sccp max-optional-data (<0-999999>|standard)",
+ "Configure SCCP behavior\n"
+ "Set an upper bound for the optional data length (the payload) for CR, CC, CREF and RLSD messages."
+ " RANAP payload larger than this value (octets), send an SCCP CR without data, followed by an SCCP DT."
+ " ITU-T Q.713 4.2 to 4.5 define a limit of 130 bytes for the 'Data' parameter. This limit can be"
+ " adjusted here. May be useful for interop with nonstandard peers.\n"
+ "Set a non-standard maxium allowed number of bytes\n"
+ "Use the ITU-T Q.713 4.2 to 4.5 standard value of 130\n",
+ CMD_ATTR_IMMEDIATE)
+{
+ struct osmo_ss7_instance *ss7 = vty->index;
+ int val;
+
+ if (!strcmp(argv[0], "standard"))
+ val = SCCP_MAX_OPTIONAL_DATA;
+ else
+ val = atoi(argv[0]);
+
+ osmo_ss7_ensure_sccp(ss7);
+ if (!ss7->sccp) {
+ vty_out(vty, "%% Error: cannot instantiate SCCP instance%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ ss7->sccp->max_optional_data = val;
+ return CMD_SUCCESS;
+}
+
static const char *osmo_sccp_timer_val_name(const struct osmo_sccp_timer_val *val)
{
static char buf[16];
@@ -227,6 +258,8 @@
void osmo_sccp_vty_write_cs7_node(struct vty *vty, const char *indent, struct osmo_sccp_instance *inst)
{
write_sccp_timers(vty, indent, inst, false);
+ if (inst->max_optional_data != SCCP_MAX_OPTIONAL_DATA)
+ vty_out(vty, "%ssccp max-optional-data %u%s", indent, inst->max_optional_data, VTY_NEWLINE);
}
DEFUN(show_sccp_timers, show_sccp_timers_cmd,
@@ -262,4 +295,5 @@
install_lib_element_ve(&show_sccp_timers_cmd);
gen_sccp_timer_cmd_strs(&sccp_timer_cmd);
install_lib_element(L_CS7_NODE, &sccp_timer_cmd);
+ install_lib_element(L_CS7_NODE, &sccp_max_optional_data_cmd);
}
diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty
index 09be45b..4922f82 100644
--- a/tests/vty/ss7_asp_test.vty
+++ b/tests/vty/ss7_asp_test.vty
@@ -89,6 +89,7 @@
sccp-address NAME
no sccp-address NAME
sccp-timer (conn_est|ias|iar|rel|repeat_rel|int|guard|reset|reassembly) <1-999999>
+ sccp max-optional-data (<0-999999>|standard)
ss7_asp_vty_test(config-cs7)# ?
...
@@ -101,6 +102,7 @@
as Configure an Application Server
sccp-address Create/Modify an SCCP addressbook entry
sccp-timer Configure SCCP timer values, see ITU-T Q.714
+ sccp Configure SCCP behavior
ss7_asp_vty_test(config-cs7)# description ?
TEXT Text until the end of the line
@@ -427,3 +429,43 @@
ss7_asp_vty_test(config-cs7)# sccp-timer conn_est ?
<1-999999> Timer value, in seconds
+
+ss7_asp_vty_test(config-cs7)# sccp ?
+ max-optional-data Set an upper bound for the optional data length (the payload) for CR, CC, CREF and RLSD messages. RANAP payload larger than this value (octets), send an SCCP CR without data, followed by an SCCP DT. ITU-T Q.713 4.2 to 4.5 define a limit of 130 bytes for the 'Data' parameter. This limit can be adjusted here. May be useful for interop with nonstandard peers.
+
+ss7_asp_vty_test(config-cs7)# sccp max-optional-data ?
+ <0-999999> Set a non-standard maxium allowed number of bytes
+ standard Use the ITU-T Q.713 4.2 to 4.5 standard value of 130
+
+ss7_asp_vty_test(config-cs7)# show running-config
+... !sccp max-optional-data
+
+ss7_asp_vty_test(config-cs7)# sccp max-optional-data 0
+ss7_asp_vty_test(config-cs7)# show running-config
+...
+ sccp max-optional-data 0
+...
+
+ss7_asp_vty_test(config-cs7)# sccp max-optional-data 123
+ss7_asp_vty_test(config-cs7)# show running-config
+...
+ sccp max-optional-data 123
+...
+
+ss7_asp_vty_test(config-cs7)# sccp max-optional-data 999999
+ss7_asp_vty_test(config-cs7)# show running-config
+...
+cs7 instance 0
+...
+ sccp max-optional-data 999999
+...
+cs7 instance 1
+... !sccp max-optional-data
+
+ss7_asp_vty_test(config-cs7)# sccp max-optional-data standard
+ss7_asp_vty_test(config-cs7)# show running-config
+... !sccp max-optional-data
+
+ss7_asp_vty_test(config-cs7)# sccp max-optional-data 130
+ss7_asp_vty_test(config-cs7)# show running-config
+... !sccp max-optional-data
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/32361
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: If35697234796af8943691b2de62218e7dc93a08c
Gerrit-Change-Number: 32361
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
arehbein has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32355 )
Change subject: common: Fix NACK message for unknown TRX
......................................................................
Abandoned
Fix worked into function changes
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32355
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I12a1132079e66df7e8b59a212cd8ceecbdfc63e8
Gerrit-Change-Number: 32355
Gerrit-PatchSet: 1
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: abandon
Attention is currently required from: arehbein.
Hello Jenkins Builder, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/32075
to look at the new patch set (#6).
Change subject: gsm_objclass2mo(): Change signature/set NACK cause
......................................................................
gsm_objclass2mo(): Change signature/set NACK cause
- Add out-parameter to enable returning a NACK cause (ignored if NULL)
- Return appropriate NACK cause if TRX number is unknown (part of fix
for OS#5967)
Related: OS#5961
Related: OS#5967
Change-Id: I37e6b23ed95260a8188910cf9754faffcba519c5
---
M include/osmo-bts/oml.h
M src/common/oml.c
2 files changed, 49 insertions(+), 20 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/75/32075/6
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32075
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I37e6b23ed95260a8188910cf9754faffcba519c5
Gerrit-Change-Number: 32075
Gerrit-PatchSet: 6
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin.
Hello Jenkins Builder, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/32354
to look at the new patch set (#2).
Change subject: gsm_objclass2obj(): Change signature/set NACK cause
......................................................................
gsm_objclass2obj(): Change signature/set NACK cause
- Add out-parameter to enable returning a NACK cause (ignored if NULL)
- Return appropriate NACK cause if TRX number is unknown (fixes OS#5967
together with change I37e6b23ed95260a8188910cf9754faffcba519c5)
Related: OS#5961
Related: OS#5967
Change-Id: If734ea2c8cae4c1f99b02520dffa4e3862a67745
---
M include/osmo-bts/oml.h
M src/common/oml.c
M src/osmo-bts-trx/trx_provision_fsm.c
3 files changed, 43 insertions(+), 17 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/54/32354/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32354
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: If734ea2c8cae4c1f99b02520dffa4e3862a67745
Gerrit-Change-Number: 32354
Gerrit-PatchSet: 2
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin, fixeria.
arehbein has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32073 )
Change subject: gsm_objclass2mo(): First check if TRX number is valid
......................................................................
Patch Set 4:
(2 comments)
Patchset:
PS4:
I've changed the commit to just get rid of unnecessary checks mentioned in comments to other patches (which didn't introduce those checks, they were already there)
File src/common/oml.c:
https://gerrit.osmocom.org/c/osmo-bts/+/32073/comment/7474293d_cd478647
PS2, Line 1634: case NM_OC_RADIO_CARRIER:
> why are these being removed?
I moved them to the above lines in order to avoid unnecessary code duplication
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32073
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I9f21f1a0a9dab897d4fd89ab6b7341ca4aec8b22
Gerrit-Change-Number: 32073
Gerrit-PatchSet: 4
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 18 Apr 2023 23:01:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
arehbein has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32354 )
Change subject: gsm_objclass2obj(): Change signature so we can obtain a nack cause in case of error
......................................................................
Patch Set 1:
(2 comments)
File src/common/oml.c:
https://gerrit.osmocom.org/c/osmo-bts/+/32354/comment/9c46adb3_957f77e3
PS1, Line 1799: gsm_objclass2obj(enum abis_nm_nack_cause *c, struct gsm_bts *bts, uint8_t obj_class,
> same here, this should be at the end and be able to pass NULL to it.
Done
https://gerrit.osmocom.org/c/osmo-bts/+/32354/comment/072b13d5_49b3ede2
PS1, Line 1804: /* Handle finding TRX number first */
> Same here, please don't move this into a new switch.
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32354
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: If734ea2c8cae4c1f99b02520dffa4e3862a67745
Gerrit-Change-Number: 32354
Gerrit-PatchSet: 1
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 18 Apr 2023 23:00:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment