Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230
to look at the new patch set (#4).
Change subject: add option to send SCCP CR without payload
......................................................................
add option to send SCCP CR without payload
It is reported that a third-party SGSN is rejecting SCCP CR when the
SCCP message part exceeds a certain length. The solution is to first
send an SCCP CR without payload, and send the payload in a DT later.
Add config option
hnbgw
sccp cr max-payload-len <0-999999>
If the RANAP payload surpasses the given length, osmo-hnbgw will first
send an SCCP CR without payload, cache the RANAP payload, and put that
in an SCCP DT once the SCCP CC is received.
The original idea was to limit the size of the entire SCCP part of the
message, but I'm currently not sure how to determine that without
copying much of the osmo_sccp code. I figured using a limit on the RANAP
payload is sufficient. To avoid the error with above third-party SGSN,
the easy solution is to set max-payload-len to 0, so that we always get
a separate SCCP CR without payload.
Related: SYS#5968
Related: I827e081eaacfb8e76684ed1560603e6c8f896c38 (osmo-ttcn3-hacks)
Change-Id: If0c5c0a76e5230bf22871f527dcb2dbdf34d7328
---
M include/osmocom/hnbgw/context_map.h
M include/osmocom/hnbgw/hnbgw.h
M include/osmocom/hnbgw/hnbgw_rua.h
M src/osmo-hnbgw/context_map.c
M src/osmo-hnbgw/hnbgw.c
M src/osmo-hnbgw/hnbgw_cn.c
M src/osmo-hnbgw/hnbgw_rua.c
M src/osmo-hnbgw/hnbgw_vty.c
8 files changed, 122 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/30/28230/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: If0c5c0a76e5230bf22871f527dcb2dbdf34d7328
Gerrit-Change-Number: 28230
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230 )
Change subject: add option to send SCCP CR without payload
......................................................................
Patch Set 3:
(1 comment)
File src/osmo-hnbgw/hnbgw_rua.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230/comment/41e863c1_79f7b23a
PS1, Line 274: if (data && len && map && !map->is_ps && !release_context_map) {
> So data is already checked above in line 267, which means this should have already been in place bef […]
Before this patch, we never called rua_to_scu() with NULL data.
So i don't really agree but it's ok, i can separate.
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: If0c5c0a76e5230bf22871f527dcb2dbdf34d7328
Gerrit-Change-Number: 28230
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Jun 2022 20:32:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230 )
Change subject: add option to send SCCP CR without payload
......................................................................
Patch Set 3:
(1 comment)
File src/osmo-hnbgw/hnbgw_rua.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230/comment/677c0f84_7260cada
PS1, Line 274: if (data && len && map && !map->is_ps && !release_context_map) {
> Because ranap_cn_rx_co_decode() crashes when there is no payload data.
So data is already checked above in line 267, which means this should have already been in place before your current patch. Please submit a different patch for this fix, agree?
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: If0c5c0a76e5230bf22871f527dcb2dbdf34d7328
Gerrit-Change-Number: 28230
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Jun 2022 16:50:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230
to look at the new patch set (#3).
Change subject: add option to send SCCP CR without payload
......................................................................
add option to send SCCP CR without payload
It is reported that a third-party SGSN is rejecting SCCP CR when the
SCCP message part exceeds a certain length. The solution is to first
send an SCCP CR without payload, and send the payload in a DT later.
Add config option
hnbgw
sccp cr max-payload-len <0-999999>
If the RANAP payload surpasses the given length, osmo-hnbgw will first
send an SCCP CR without payload, cache the RANAP payload, and put that
in an SCCP DT once the SCCP CC is received.
The original idea was to limit the size of the entire SCCP part of the
message, but I'm currently not sure how to determine that without
copying much of the osmo_sccp code. I figured using a limit on the RANAP
payload is sufficient. To avoid the error with above third-party SGSN,
the easy solution is to set max-payload-len to 0, so that we always get
a separate SCCP CR without payload.
Related: SYS#5968
Related: I827e081eaacfb8e76684ed1560603e6c8f896c38 (osmo-ttcn3-hacks)
Change-Id: If0c5c0a76e5230bf22871f527dcb2dbdf34d7328
---
M include/osmocom/hnbgw/context_map.h
M include/osmocom/hnbgw/hnbgw.h
M include/osmocom/hnbgw/hnbgw_rua.h
M src/osmo-hnbgw/context_map.c
M src/osmo-hnbgw/hnbgw.c
M src/osmo-hnbgw/hnbgw_cn.c
M src/osmo-hnbgw/hnbgw_rua.c
M src/osmo-hnbgw/hnbgw_vty.c
8 files changed, 123 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/30/28230/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: If0c5c0a76e5230bf22871f527dcb2dbdf34d7328
Gerrit-Change-Number: 28230
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230 )
Change subject: add option to send SCCP CR without payload
......................................................................
Patch Set 2:
(4 comments)
Commit Message:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230/comment/3ca86ce9_9abe04d1
PS1, Line 27: a separate SCCP CR without payload.
> Not sure if it really makes sense to use any value != 0 here,so it probably makes more sense to have […]
Sure.
With a RANAP payload size, a user can still experiment with a bound below which to still avoid the additional CR->CC roundtrip, so I thought this is more interesting than a boolean...
Would be trivial to change this to a boolean flag, basically shows only in the cfg.
Opinions anyone else?
File include/osmocom/hnbgw/context_map.h:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230/comment/0d4d8db2_dbf030b4
PS1, Line 42: RUA_CN_DomainIndicator_t cached_domain_indicator;
> isn't this the same as is_ps?
I guess so.
rua_to_scu() wants a RUA_CN_ComainIndicator_t arg, so I just added it ...
Ok, so indeed it seems a hnbgw_context_map is always separate for CS and PS, so can replace with
(is_ps ? RUA_CN_DomainIndicator_ps_domain : RUA_CN_DomainIndicator_cs_domain)
File src/osmo-hnbgw/hnbgw.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230/comment/ecca58f7_a2c6dd66
PS1, Line 93: gw->config.max_sccp_cr_payload_len = 999999;
> this really looks like a hack. Use -1 value and a "no sccp..." VTY command. […]
on the VTY, we often use max values like 99999, that's the only reason.
Given a usual MTU is like 1500, I assume 999k is sufficiently close to infinity.
File src/osmo-hnbgw/hnbgw_rua.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230/comment/1d4d6c04_b1995421
PS1, Line 274: if (data && len && map && !map->is_ps && !release_context_map) {
> This new check looks non related? why did you add it?
Because ranap_cn_rx_co_decode() crashes when there is no payload data.
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: If0c5c0a76e5230bf22871f527dcb2dbdf34d7328
Gerrit-Change-Number: 28230
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Jun 2022 16:40:59 +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: neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230 )
Change subject: add option to send SCCP CR without payload
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
> now that I'm done implementing, I'm thinking, maybe we should add this feature to our SCCP library i […]
May make sense indeed.
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: If0c5c0a76e5230bf22871f527dcb2dbdf34d7328
Gerrit-Change-Number: 28230
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Jun 2022 16:22:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: comment
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230 )
Change subject: add option to send SCCP CR without payload
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
now that I'm done implementing, I'm thinking, maybe we should add this feature to our SCCP library instead of osmo-hnbgw?
Then all of our applications using SCCP could trivially impose a limit on the SCCP CR message...
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: If0c5c0a76e5230bf22871f527dcb2dbdf34d7328
Gerrit-Change-Number: 28230
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Jun 2022 16:21:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/28229 )
Change subject: use osmo_select_main_ctx(), tweak log in handle_cn_conn_conf()
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/28229
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I1e0ea0a883e8cf65e6cfb45ed9b6f3d8fb7c59eb
Gerrit-Change-Number: 28229
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Jun 2022 16:14:35 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230 )
Change subject: add option to send SCCP CR without payload
......................................................................
Patch Set 2:
(6 comments)
Commit Message:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230/comment/a7c7c2e8_3a6f3f86
PS1, Line 27: a separate SCCP CR without payload.
Not sure if it really makes sense to use any value != 0 here,so it probably makes more sense to have a VTY config option which actually defines whether a SCCP CR is decoupled from the RANAP message?
File include/osmocom/hnbgw/context_map.h:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230/comment/03f890cf_72f69335
PS1, Line 42: RUA_CN_DomainIndicator_t cached_domain_indicator;
isn't this the same as is_ps?
File src/osmo-hnbgw/context_map.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230/comment/0f559f07_86e7368f
PS1, Line 139: rc = rua_to_scu(map->hnb_ctx, map->cached_domain_indicator, OSMO_SCU_PRIM_N_DATA,
you can probably use map->is_ps here instead of adding map->cached_domain_indicator
File src/osmo-hnbgw/hnbgw.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230/comment/eb050eae_42e69692
PS1, Line 93: gw->config.max_sccp_cr_payload_len = 999999;
this really looks like a hack. Use -1 value and a "no sccp..." VTY command. Or rather simply change the VTY command to be a boolean.
File src/osmo-hnbgw/hnbgw_rua.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230/comment/45f577fb_681f7d16
PS1, Line 274: if (data && len && map && !map->is_ps && !release_context_map) {
This new check looks non related? why did you add it?
https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230/comment/17cb745e_9e7573b2
PS1, Line 417: map->cached_domain_indicator = ies.cN_DomainIndicator;
as mentioned, this is not needed, the info is in "is_ps".
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/28230
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: If0c5c0a76e5230bf22871f527dcb2dbdf34d7328
Gerrit-Change-Number: 28230
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 07 Jun 2022 16:13:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment