Change in libosmo-sccp[master]: M3UA: Reject ASP activation + RKM registration for incompatible traff...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Oct 29 10:38:41 UTC 2019


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 )

Change subject: M3UA: Reject ASP activation + RKM registration for incompatible traffic-mode
......................................................................


Patch Set 2:

(4 comments)

https://gerrit.osmocom.org/c/libosmo-sccp/+/15885/2/src/xua_asp_fsm.c 
File src/xua_asp_fsm.c:

https://gerrit.osmocom.org/c/libosmo-sccp/+/15885/2/src/xua_asp_fsm.c@459 
PS2, Line 459: 				break;
This one should also be a return?


https://gerrit.osmocom.org/c/libosmo-sccp/+/15885/2/src/xua_asp_fsm.c@468 
PS2, Line 468: 					break;
This one should be a return, otherwise you send an error and later you send an ACK. But it's not really related to this commit, the error was already there as far as I can see.


https://gerrit.osmocom.org/c/libosmo-sccp/+/15885/2/src/xua_asp_fsm.c@473 
PS2, Line 473: 					if (!osmo_ss7_tmode_compatible_xua(as->cfg.mode, traf_mode)) {
I'd rather have an API passing AS as the first parameter. Because from what I understand from RFC4666, if the mode of the AS is not set by local config, then the one requested by ASPAC is used:
"""
  If the SGP determines that the mode indicated in an ASP
   Active message is unsupported or incompatible with the mode currently
   configured for the AS, the SGP responds with an Error message
   ("Unsupported / Invalid Traffic Handling Mode").  If the traffic
   handling mode of the Application Server is not already known via
   configuration data, then the traffic handling mode indicated in the
   first ASP Active message causing the transition of the Application
   Server state to AS-ACTIVE MAY be used to set the mode.
"""

So basically I think there should be a check like I do in other places:
osmo_as_tmode_compatible_xua(as, traf_mode) {
if (as->cfg.mode_set_by_vty) { ...then check if as->cfg.mode is compatible with tmode... } else { return true }
}

Actually, the best would be adding a new flag as->cfg.mode_set_by_req set to true in the next file where as->cfg.mode is set from the request, and in here we should do the following check:
if (as->cfg.mode_set_by_vty || as->cfg.mode_set_by_req) { ...then check if as->cfg.mode is compatible with tmode... } else { return true }


https://gerrit.osmocom.org/c/libosmo-sccp/+/15885/2/src/xua_rkm.c 
File src/xua_rkm.c:

https://gerrit.osmocom.org/c/libosmo-sccp/+/15885/2/src/xua_rkm.c@221 
PS2, Line 221: 			as->cfg.mode = osmo_ss7_tmode_from_xua(_tmode);
here: as->cfg.mode_set_by_req = true;



-- 
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15885
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ic73410fbc88d50710202453f759fa132ce14db4c
Gerrit-Change-Number: 15885
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Tue, 29 Oct 2019 10:38:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191029/0f561f6f/attachment.htm>


More information about the gerrit-log mailing list