aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-01-07debug funeels/sccpliteNeels Hofmeyr2-27/+42
Change-Id: I97190e5f8d4ab2f4b4ae8ff8d9359ddae39b9645
2020-01-07ipa: if there are PCs in the msg, use them for routingNeels Hofmeyr1-8/+16
patch_sccp_with_pc() overwrites the SCCP addresses' point-codes only if there are none yet in the message. ipa_rx_msg_sccp() feeds opc and dpc to patch into the message, and so far uses these opc and dpc in the xua_msg_hdr even if there are different PCs in the SCCP message already, and these opc and dpc were never patched into the msg. Change the opc and dpc args of patch_sccp_with_pc() as in+out params, and if not patched into the message, return the opc and dpc actually found in the message. Hence in ipa_rx_msg_sccp() compose the m3ua_data_hdr with the point-codes found in the message, instead of those that would have been but were not actually patched into the message and potentially mismatch it. Testing with an SCCPlite MSC actually gives me complete SCCP addresses with point-codes, so it is not set in stone to receive no point-codes over IPA. If the cs7 vty config matches the point-codes received, there is no problem, but I faced a weird situation when the config is wrong: osmo-bsc logs the PCs received in the message while it confusingly uses the config ones for routing. Change-Id: I157c43a5dc12f6e24828efef1dceac246497e313
2020-01-02Bump version: 1.1.0.71-bb75-dirty → 1.2.01.2.0Pau Espin Pedrol7-16/+101
Change-Id: Ibab643b971f80e3774c393ff3988a765dc081196
2020-01-02debian: Drop patches directory containing old patch not longer requiredPau Espin Pedrol2-30/+0
Change-Id: I8e518a28cc54f42ff3e7e9205eefbce3a1d67d9d
2019-12-17ASP: Stop re-transmitting un-acknowledged messages on SCTP down eventHarald Welte1-0/+2
We don't want to attempt to re-transmit if we lost the connection: DLSS7 <000c> xua_asp_fsm.c:251 XUA_ASP(asp-client0){ASP_DOWN}: T(ack) callback: re-transmitting event ASPSM-ASP_UP DLSS7 <000c> osmo_ss7.c:1833 0: asp-asp-client0: Cannot transmit, asp->client not connected DLSS7 <000c> xua_asp_fsm.c:251 XUA_ASP(asp-client0){ASP_DOWN}: T(ack) callback: re-transmitting event ASPSM-ASP_UP DLSS7 <000c> osmo_ss7.c:1833 0: asp-asp-client0: Cannot transmit, asp->client not connected DLSS7 <000c> xua_asp_fsm.c:251 XUA_ASP(asp-client0){ASP_DOWN}: T(ack) callback: re-transmitting event ASPSM-ASP_UP DLSS7 <000c> osmo_ss7.c:1833 0: asp-asp-client0: Cannot transmit, asp->client not connected DLSS7 <000c> xua_asp_fsm.c:251 XUA_ASP(asp-client0){ASP_DOWN}: T(ack) callback: re-transmitting event ASPSM-ASP_UP DLSS7 <000c> osmo_ss7.c:1833 0: asp-asp-client0: Cannot transmit, asp->client not connected DLSS7 <000c> xua_asp_fsm.c:251 XUA_ASP(asp-client0){ASP_DOWN}: T(ack) callback: re-transmitting event ASPSM-ASP_UP Change-Id: Ic8da646d22d3120121d9af43a890762a879f9d74
2019-12-17ASP FSM: Permit DOWN -> DOWN "transition"Harald Welte1-1/+2
let's avoid messages like DLSS7 <000c> xua_asp_fsm.c:600 XUA_ASP(asp-client0){ASP_DOWN}: transition to state ASP_DOWN not permitted! Change-Id: Iabbcf92e3022a4c3f165ce19be929915f92b455c
2019-12-17stp: exit(2) on unsupported positional arguments on command lineHarald Welte1-0/+5
Change-Id: I70390948943fe42469b8c6d63babc232e857e60c
2019-12-12osmoappdesc.py, tests: switch to python 3Oliver Smith2-17/+17
Make build and external tests work with python3, so we can drop the python2 dependency. This should be merged shortly after osmo-python-tests was migrated to python3, and the jenkins build slaves were (automatically) updated to have the new osmo-python-tests installed. Related: OS#2819 Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7 Change-Id: I344c49001fba23bdcfdef06ab174c52b60edd01c
2019-12-11gitignore: add various generated doc filesOliver Smith1-0/+3
Change-Id: I14eac5a1e7bc5ff202fc57d76c1b84d4e0050ca8
2019-12-02xua_asp_fsm: Ensure xUA client includes routing contexts in ASPAC/ASPIAHarald Welte1-0/+26
If we are running in ASP (client) role, and we are about to transmit an ASPAC or ASPIA to the SG, we must make sure to include any applicable routing contexts. Change-Id: Iee4f0d553d6845a9ae08cb5e4f57fdec443e4ef9 Related: OS#4285
2019-12-02xua_asp_fsm: Ensure xUA client includes traffic-mode if configuredHarald Welte1-0/+31
When a client (ASP) sends an ASPAC to the server (SG), it should include the traffic-mode configured for it's ASs, if any. Change-Id: Ia850df22df529dab74959e8666f85976002c482c Related: OS#4285
2019-12-01check for osmo_fsm_register() failures and propagate errorHarald Welte5-9/+22
Change-Id: Id8861144e4880383a173b7e6ae7860beebac09d9
2019-11-28Skip dynamic ASPs when writing the list of ASPs in an ASHarald Welte1-0/+3
we handle this correctly in not writing the actual "asp" configuration, but we have a bug when writing the list of asps within one "as". Let's make sure to skip the dynamically-created ASPs there, too. Change-Id: I1a184f3ddec2e91ced8c95ada224da8b490407a8 Closes: OS#4284
2019-11-20xua: Implement traffic mode broadcastPau Espin Pedrol1-3/+21
Change-Id: I4358965f0ff0aa05c5082a2745159da766e9a4e7
2019-11-19fix generating asp-role that can be parsed when re-opening config fileHarald Welte1-1/+1
The ASP role must be saved in lowercas as the parser during config file reading only understands it in lowercase. Change-Id: I38b8e4d73121f8bf001037fdd2dd164113544d94 Closes: OS#4270
2019-11-19asp: Don't override ASP and SCTP role when re-entering asp nodeHarald Welte1-5/+8
The code to set the default role (SG) and default SCTP role (server) must only be executed when the ASP node is first created. Subsequent times entering the pre-existing ASP node should not overwrite those role settings [or any other configuration for that matter] Change-Id: I068996a5e0d870043b652fb69a3c300adc6fda7c Closes: OS#4271
2019-11-19osmo_ss7: Add osmo_ss7_asp_find()Harald Welte2-0/+22
This is like osmo_ss7_asp_find_and_create(), i.e. it's doing a full match for an ASP within the specified SS7 instance, of the specified port numbers. It just doesn't create it if it is missing. Change-Id: I1ed3cf2b69ee622d6f9d8b50487f392fe913ae90 Related: OS#4271
2019-11-19Don't forget to store the sctp-role during writing config fileHarald Welte1-0/+2
Related to Change-Id I7452a862d45da35dcd58654ca17222eb52d26f1f Related: OS#2005 Change-Id: I14835a7cf137e9d1fe9757a4ec57358dc578446e
2019-11-14osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmdVadim Yanitskiy6-9/+20
Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934
2019-11-12xua: Avoid multiline log in xua_msg_dump()Pau Espin Pedrol2-54/+15
In general we want to avoid multiline log messages since they make parsing more difficult. Also output in VTY over telnet looks strange (indentation incremented at each new line). Change-Id: Id9084d0e0f976bb374186db93d6ff8062b99e238
2019-11-12ss7: Set correct local addr and port during dynamic ASP creationPau Espin Pedrol1-2/+5
Change-Id: I54aada351d5fb74f5015fdfe691d0b237354743c
2019-11-12ss7: Improve log formatting during ASP restartPau Espin Pedrol1-2/+2
Since it may act sometimes as a server and sometimes as a client, let's better use one more neutral (2-side arrow) connector, and mark which address is the local and which is the remote. We already use same formatting in other osmocom code. Change-Id: I42feaa16790f02b98bcda65281de8cd9295ddcb6
2019-11-12xua: ipa_asp_fsm: Allow receiving IPA ID ACK before IPA ID RESPPau Espin Pedrol1-1/+16
Since there's no official spec for IPA and some implementations seem to like sending the IPA ID ACK before the IPA ID RESP, let's catch it and feed it after we receive the IPA ID RESP and we are in correct state. Otherwise the connection would deadlock during the initial handshake. That's the case with our TTCN3 IPA implementation running STP_Tests suite. Change-Id: I99f5346a3854ca07979020245897334197f3cd3b
2019-11-12xua: ipa_asp_fsm: Allow moving ASP to inactive statePau Espin Pedrol1-1/+26
If AS is configured with Traffic Mode Override, then if a new ASP becomes active, all previous ASPs are considered to be inactive and new data is sent to the newly activated ASP. Remark: It's still unclear which methodology/implementation will follow when the last activated ASP becomes inactive/shutdown. Then probably another one should be activated at that time, but that logic is not there implemented as far as I know. Change-Id: I4ff246b2f899aaa3cf63bbdb3f3d317dc89b3d15
2019-11-08xua: Don't send NOTIFY messages to IPA ASPsPau Espin Pedrol1-2/+4
Change-Id: Ice3d948e4d2f57a8f52cfb93792d5f4d23284b96
2019-11-08ss7: Set ASP default remote addr to 127.0.0.1 if none set in VTYPau Espin Pedrol1-0/+5
Similar to what we do with local address. Should fix creating the stream when no remote address is provided on an ASP configured through VTY. Related: OS#4260 Change-Id: I33672e76a51a5d5a483906749d30e4c4e08b66ce
2019-11-07tests/sccp/Makefile.am: use sccp.o from $(top_builddir)Vadim Yanitskiy1-2/+5
This change suspends the warnings about option 'subdir-objects', by using the existing object file from the build directory. Change-Id: I4dc2abb19c58fce0a12cc9799019878194c667d1
2019-11-06xua: On new ASPAC, set and notify other ASPs as inactivePau Espin Pedrol1-1/+35
RFC4666 sec 4.3.4.3. ASP Active Procedures: """ In the case of an Override mode AS, receipt of an ASP Active message at an SGP causes the (re)direction of all traffic for the AS to the ASP that sent the ASP Active message. Any previously active ASP in the AS is now considered to be in the state ASP-INACTIVE and SHOULD no longer receive traffic from the SGP within the AS. The SGP or IPSP then MUST send a Notify message ("Alternate ASP_Active") to the previously active ASP in the AS and SHOULD stop traffic to/from that ASP. The ASP receiving this Notify MUST consider itself now in the ASP-INACTIVE state, if it is not already aware of this via inter-ASP communication with the Overriding ASP. """ Change-Id: I474f5cc1f6cbab72d010d1f8ac7ed2285e4c1c45
2019-11-06xua: Select only active ASPs during tx in Override traffic modePau Espin Pedrol1-3/+1
Change-Id: I7eb049011b81c5141fd3edf6f0ae0202ffb2c6c9
2019-11-06osmo_ss7.c: fix xua_accept_cb(): properly assign roleVadim Yanitskiy1-0/+1
Most likely, we want all dynamically allocated ASPs to play the SG role by default. Otherwise when using the following configuration: cs7 instance 0 xua rkm routing-key-allocation dynamic-permitted listen m3ua 2905 accept-asp-connections dynamic-permitted both OsmoMSC and OsmoBSC fail to establish connections. Change-Id: Ib904ecf0e5d192a1024863f6f0fdf79301055655 Fixes: I2df9cd9747ad5c9a05d567d9a71bab6184c53674 Related: OS#4247
2019-11-06xua: Reset AS traffic mode set by peer during shutdownPau Espin Pedrol1-0/+12
This way the AS can be configured to use different traffic modes over time as long as they don't overlap in time. That is in this case where no specific traffic mode is specified in AS local configuration (VTY). Some RFC4666 state similar behvor of deleting data set by ASPs during AS shutdown. For instance: """ Other ASPs may continue to be associated with the Application Server, in which case the Routing Key data SHOULD NOT be deleted. If a Deregistration results in no more ASPs in an Application Server, an SG MAY delete the Routing Key data. """ This allows for tests to easily re-use same AS to test different traffic modes as long as they wait for the recovery timeout (2 secs by default, configurable via VTY). Related: OS#4220 Change-Id: I370aa3b5ddfc456c1be5b2585f2f470d5aa8d289
2019-11-06osmo_ss7.c: fix copy-paste error in xua_accept_cb()Vadim Yanitskiy1-1/+1
Change-Id: I3d991849459378b35a5b4f248cc208f956e494be
2019-11-06osmo_ss7.c: cosmetic: fix typo in xua_accept_cb()Vadim Yanitskiy1-1/+1
Change-Id: Id925d09b9232b5e0124b977fa482e8cdc3c8b835
2019-11-06xua: loadshare: select ASP for tx only if activePau Espin Pedrol3-1/+9
Change-Id: I4f1d1aa9395698e5b6b930a5092a4b914dd15fb3
2019-11-06xua: Fix private function namePau Espin Pedrol1-2/+2
The function clearly does stuff the other way as its name used to describe. Change-Id: Ib65a0f2706e2eefe2446d3c9a6bdd19cf9cb81f2
2019-11-05vty: Permit configuration of ASPs in SCTP client modeHarald Welte3-0/+25
The M3UA specification states that either of the two roles should be the SCTP client and the other the server. It also states that the default for the SGP is to operate as server. However, it permits other configurations. Let's allow this to be configured by the VTY. We need to ensure that while in ASP role, we don't send any NOTIFY messages to the peer SG. Change-Id: I7452a862d45da35dcd58654ca17222eb52d26f1f Closes: OS#2005
2019-11-05Allow ASP role to be configuredHarald Welte5-6/+36
So far, we had a static role model: * SCTP servers (listening, such as OsmoSTP) are role SGW * SCTP clients (connecting, such as OsmoMSC) are role ASP While this is customary, it is not actually required by the specification. The SGW can establish the SCTP connection to an ASP but still remain "SG" role. Let's make things more flexible by having the role configurable. Related: OS#2005 Change-Id: I2df9cd9747ad5c9a05d567d9a71bab6184c53674
2019-11-05introduce public enum osmo_ss7_asp_role for ASP/SG/IPSPHarald Welte4-30/+32
This supersedes the library-internal enum xua_asp_role. Change-Id: I28b0888b8f8206e9dd67ef64ce0f71ba9a7105ce
2019-11-05M3UA: Reject ASP activation + RKM registration for incompatible traffic-modeHarald Welte4-8/+30
If the AS is e.g. configured as broadcast, then individual ASPs cannot be activated in loadshare or override. Everyone must agree. Change-Id: Ic73410fbc88d50710202453f759fa132ce14db4c
2019-11-05xua: Allow traffic mode set by peer if not set by VTYPau Espin Pedrol3-7/+53
Change-Id: I8ca17439b4dd023625f8f22689c0432341986099
2019-11-05xua_asp_fsm: Don't send M3UA ERR and then send ASPAC_ACKHarald Welte1-2/+2
IF we cannot activate the ASP in response to an ASPAC, we should return just the error and not an error + ASPACK_ACK. Change-Id: I681021a13af9b91d8b2b849bd7149d6b1f783865
2019-10-24ss7: Set Traffic mode and Route Ctx in ASPAC ACK msg if knownPau Espin Pedrol1-4/+7
Change-Id: Ic99131489efaef87f882312a042f5feb6a60bb86 Related: OS#4220
2019-10-24xua: Verify all route ctxs received in ASPAC msgPau Espin Pedrol1-5/+10
Change-Id: I16ad0847d671522c8942b441db7e4c460f4f142b
2019-10-24ss7: Only override traffic mode from recv REG REQ if not set by VTYPau Espin Pedrol5-6/+10
RFC 4666 (SS7/MTP3/M3UA) states in isection 4.3.4.3 ASP Active Procedures: """ 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. """ In section 3.6.1 Registration Request (REG REQ), no related information is provided on how to handle it, but still makes sense to apply same behavior as in 4.3.4.3. Related: OS#4220 Change-Id: Iaebe3a93ad8d2d84ae01e41b02674f8ece9dfc95
2019-10-24ss7: Set configured AS traffic mode when sending Routing Key Register msgPau Espin Pedrol1-0/+1
Otherwise default OSMO_SS7_AS_TMOD_OVERRIDE=0 value is always set regardless of the VTY config "traffic-mode" under AS node. Related: OS#4220 Change-Id: I5d24772f07e77cc3ba6edfa819bb9bc0266a1064
2019-10-24ss7: Implement AS traffic mode loadshare using round robin ASP selectionPau Espin Pedrol3-4/+46
Related: OS#4220 Change-Id: I98144dde237672df2e78c7c92923e6f4cb77a271
2019-10-24ss7: Set default traffic-mode to overridePau Espin Pedrol3-7/+7
Change-Id: I8570ed6634eb20c0f9e4b712de6592b6c3b77227
2019-10-23vty: Print traffic mode during show cs7 instance asPau Espin Pedrol2-28/+29
Change-Id: Ief6b03f50751b8d8f4021e94d54f079681b64d51
2019-10-23xua_rkm: Don't permit de-registration of rctx with ASP activeHarald Welte1-1/+6
Change-Id: Ie47eb205b397f3d2ce94c4ec3531664ed290a819 Closes: OS#4238
2019-10-23xua_rkm: Print NOTICE log message if registration for wrong rctxHarald Welte1-0/+2
Change-Id: Ifb70940e9edfad8c99473ec724dc52f5885561de