aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
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
2019-10-23Log correct protocol during xua_accept_cb()Harald Welte1-4/+4
This function is used for both actual SIGTRAN (M3UA, SUA over SCTP) as well as for IPA/SCCPLITE (over TCP). Having a static "SCTP" string in the log lines is confusing. Change-Id: Ic34ddbcd528cd871d9772665e1d0863896f33203
2019-10-23vty: ss7: Make sure ASP has at least INET_ANY addr set if not configured in VTYPau Espin Pedrol1-0/+5
Several parts of the code expect an operative ASP to always have at least one local ip addr, be it INET_ANY (NULL, 0.0.0.0) or any specific IP address. This allows osmo_ss7_asp_find_by_socket_addr() matching incoming connectiongs against ASPs defined through VTY "asp" node with no "local-ip" cmd option specified. In that case, we assume the user wants it to bind/match against INET_ANY. Related: OS#3608 Fixes: 80b135581909fef595d48436ab04dbcb147e3895 Change-Id: Id4da0c778890c90cf5bfcf0fd3a7ecf165f2a6df
2019-10-23ss7: Fix finding asp by socket addr if it has no remote hosts configuredPau Espin Pedrol1-5/+8
Fixes: 80b135581909fef595d48436ab04dbcb147e3895 Change-Id: I14a0132a4667cea75fc212dfeeef76d8509b991d
2019-10-23ss7: Fix finding asp by socket addr if local ip addr is 0.0.0.0Pau Espin Pedrol1-1/+2
Fixes: 80b135581909fef595d48436ab04dbcb147e3895 Change-Id: I319e4983b35f63846ed7e8bfa8e8e3688c5d16e6
2019-10-23ss7: Fix osmo_ss7_asp_peer_snprintf() output if peer has zero IP addr assignedPau Espin Pedrol1-1/+1
If no IP addr is assigned yet, until know it'd print "(:3456". Let's print ":34456" in that scenario. Change-Id: Iae85d231093b6f3ce6b969324699858e525c14ea
2019-10-23cosmetic: Fix trailing whitespacePau Espin Pedrol1-3/+3
Change-Id: Ic5bae0b69dcf24da8069709692b5687ad76239dc
2019-10-23vty: Fix write-config of local-ip and remote-ip commandsPau Espin Pedrol1-3/+3
Fixes: CID#205338 Fixes: CID#205337 Change-Id: I7b01e53aa4bfd714467cbd729cfcf4dc12a64bd4
2019-10-22cosmetic: ss7: Fix trailing whitespacePau Espin Pedrol3-3/+3
Change-Id: Ifd947c51067842b83ea43ce25ba0d652baff259b
2019-10-22tests: Introduce test for multi-homing STP featuresPau Espin Pedrol5-5/+211
Config file sets omo-stp instance to bind on 2 IP addresses, and then the test verfies through linux /proc/net/sctp/* that binding is done correctly and that it can be reached from another remote address to one of the configured addresses. Change-Id: Ifa11b1fc882dff415405f62024e94bed67228866
2019-10-22ss7: Log local and remote address set upon ASP restartPau Espin Pedrol1-3/+7
Change-Id: I35c2581923ed3e1f7aff6c137ddf356882bac621
2019-10-22ss7: Support multiple addresses in SCTP connectionsPau Espin Pedrol6-52/+184
After this patch, Several "local-ip" and "remote-ip" lines are accepted under "listen" and "asp" VTY nodes, allowing to configure an SCTP connection with multiple connections, hence allowing control of SCTP multi-homing features. libosmo-sccp clients such as osmo-bsc and osmo-msc also gain support for this feature with this commit. Related: OS#3608 Depends: libosmocore.git Ic8681d9e093216c99c6bca4be81c31ef83688ed1 Depends: libosmo-netif.git I0fe62f518e195db4e34f3b0ad1762bb57ba9d92a Change-Id: Ibd15de7a4e00dbec78ff2e2dd6a686b0f3af22de
2019-10-22Defer xua server binding until exit of VTY nodePau Espin Pedrol4-44/+3
Commit 10d4815bb1b4b548ec0bc97611b2e7ac45e0ebc5 already fixed the issue where binding was done during L_CS7_XUA_NODE (listen) done, meaning local-ip inside it had no effect. In that comment, binding was moved to happen during "local-ip" VTY cmd. Furthermore, that commit added a new osmo_ss7_bind_all_instances() and related APIs to allow osmo-stp to have all xua servers bound if no "local-ip" was provided. These APIs have only been used so far by osmo-stp (which lays in the same git repo that libosmo-sccp) since it's the only program using the xua server features. In the present commit, let's drop the APIs added by commit described above, and instead let libosmo-sccp code to internally bind the xua server upon exit of the VTY node. As a result, the previously introduced APIs can be dropped (not used by anyone anymore) and it will provide ways to support multiple "local-ip" commands in the future, hence supporting SCTP multi-home features. It's recommended to require libosmocore.git Ia6d88c0e63d94ba99e950da6efbc4c1871070012 since it fixes a bug where go_parent_cb was not called for nodes at the end of the file. Related: OS#3608 Change-Id: I2cff17b5e2e2fbfd4591e23a416e510e94e173d6
2019-10-22m3ua: Log incorrect selected ASPau Espin Pedrol1-2/+2
Change-Id: Idfdf6279de1fed453b5f83a5329c50716a79aca9
2019-10-22Fix typo in log message of recent commitPau Espin Pedrol1-1/+1
Change-Id: I53e6395ea564a7f6f5f8c9e1dd3372ba37bdfb39
2019-10-20cosmetic: Document why IPA uses hard-coded routing-context 0Harald Welte1-0/+2
Change-Id: Ibfae10a1e9385079db4b353e48a262bc8ab5230a
2019-10-20Don't permit routing-context != 0 for IPA peersHarald Welte1-0/+6
The IPA protocol doesn't have the context of routing-keys. We are only permitting routing key '0' (as the default routing key) when configuring via VTY. Change-Id: I3f166f44903d0b93963cc5d0cca73d277d2b7215 Fixes: OS#4234, OS#4233
2019-10-19ipa: VTY config option to explicitly enable/disable SCCP patchingHarald Welte4-4/+41
When receiving SCCP messages from an IPA peer/ASP, osmo-stp so far unconditionally inserted origin/destination point codes int the SCCP called / calling party addresses. This behaviro is now made optional with the introduction of the following per-AS configuration: "point-code override patch-sccp (disabled|both)" The default behavior is switched from 'both' to 'disabled' at the same time. Change-Id: I535e2170adadfe755d2bcbf5bbf4556bebb77737 Closes: OS#4219
2019-10-19ipa: Fix crash when parsing of received IPA SCCP message failsHarald Welte1-0/+6
If an IPA ASP is sending us a SCCP message that cannot be parsed, we shouldn't crash but handle this gracefully. Change-Id: Ib7a8c2a36dd1b82ca8ed472760c1682ede50cb90 Fixes: OS#4236
2019-10-19ipa: Don't send non-SCCP data over IPA/SCCPliteHarald Welte1-0/+8
The IPA/SCCPlite stacking is - as the name implies - constrained to the transport of SCCP messages. We have to reject any non-SCCP payload. Change-Id: I5e5a2879013ee8cf08aa4199b4bee498dcb61446 Fixes: OS#4235
2019-10-19Use LOGPAS / LOGPASP in favor of generic LOGSS7 where applicableHarald Welte1-11/+9
Change-Id: If3a88863d18941c10d34361b323412ad7e517334
2019-10-19Move definition of LOGSS7() to header file; add LOGPAS() like LOGPASP()Harald Welte2-4/+7
Change-Id: Ic85fc460cc1f31d0fb407095afe417ceaa60e7bd
2019-09-16sccp_user: correct comment for osmo_sccp_simple_clientAlexander Couzens1-1/+1
Fixes: 3884eb68d932 ("osmo_sccp_simple_client(): use sccp instance index 0 instead of 1") Change-Id: Iaac59222df84eacf813825c2ef660281381e6b14
2019-09-04ss7: Do not queue messages if stream is not connectedPau Espin Pedrol1-0/+5
Consider them as lost by the lower layer, otherwise lots of old messages and retransmissions can end up queued in there until stream becomes connected, and then will flood the peer with all those messages. Depends: libosmo-netif.git 962bf9a48eed418354685dc733b8271d2dd62c27 Related: OS#4188 Change-Id: Ic7d3571848faf28221dcfa8eb8b33b42964d988e
2019-08-29osmo_sccp_simple_client(): use sccp instance index 0 instead of 1Alexander Couzens1-1/+1
When using osmo_sccp_simple_client(), it will create an sccp instance if none exists. The sccp instance identifier starts with 0. The implicit created instance should use sccp instance 0 (the first connection). Change-Id: I9d9f65555b9cdc1e3c697c8b834528d51878e1ae
2019-08-12systemd: This patch adds Documentation field to the systemd service fileKira Obrezkova1-0/+1
Change-Id: Ia112dec6b61853cbfe1222cf4b7aecfe305ddb99
2019-08-07Bump version: 1.0.0.26-2728-dirty → 1.1.01.1.0Pau Espin Pedrol3-3/+51
Change-Id: I3fe741cb70fa75fb911d40dc8f9eb50e1a85238b
2019-08-05Remove undefined param passed to {logging,osmo_stats}_vty_add_cmdsPau Espin Pedrol2-2/+2
Since March 15th 2017, libosmocore API logging_vty_add_cmds() had its parameter removed (c65c5b4ea075ef6cef11fff9442ae0b15c1d6af7). However, definition in C file doesn't contain "(void)", which means number of parameters is undefined and thus compiler doesn't complain. Let's remove parameters from all callers before enforcing "(void)" on it. Related: OS#4138 Change-Id: Iedd11f816002b686f0ddb54c0cf7ba4e229e21e3
2019-07-17This patch fixes typos on which Lintian complainsKira Obrezkova2-2/+2
Change-Id: I657c694a9a7474182a97f90aa8424403ca9c58db
2019-07-11contrib/jenkins.sh: "maintainer-clean" after "publish"Oliver Smith1-1/+1
Run "make maintainer-clean" after publishing manuals, not the other way around. Otherwise jenkins.sh fails when running for the master branch, because docs/manuals/Makefile gets deleted although it is still needed to publish the manuals. Related: OS#3047 Fixes: 55f03b898a3113f7b73a3abd1c2dfe2edd6135ac ("contrib/jenkins.sh: run "make maintainer-clean"") Change-Id: I8bcee9069743b76966a78e1c13d0be9ba62d992c
2019-07-10contrib/jenkins.sh: run "make maintainer-clean"Oliver Smith1-0/+1
Related: OS#3047 Change-Id: Ia6ebe5add2c1ce6891d596fb2987e46f8ff8a6d6
2019-06-19manuals: Update vty documentationDaniel Willmann1-5/+246
Related: OS#1700 Change-Id: I2061d7883f5457ec8c53358dc6089daaf60c67c3
2019-06-19manuals: Add script to regenerate vty/counter documentationDaniel Willmann2-0/+18
Related: OS#1700 Change-Id: I9978d04fec68d6a8e17caa3c88c1020cf3a348ac
2019-05-29debian: create -doc subpackage with pdf manualsOliver Smith4-2/+18
I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I1f412953e60c10e6146327a90edbd18d738e1365
2019-05-11osmo-stp: expose root talloc context to the VTY codeVadim Yanitskiy1-0/+2
In Id0789c4946929b783c54220de439958001f94992 I introduced the VTY commands for talloc-context introspection, but forgot to expose the root talloc-context. Change-Id: Id2bf6cdae112f9791c93411c1837de488cab9ee3
2019-05-10osmo-stp: register VTY commands for talloc context introspectionVadim Yanitskiy1-0/+1
Change-Id: Id0789c4946929b783c54220de439958001f94992
2019-05-09stp: Ensure telnet uses STP talloc context, not NULL contextHarald Welte1-1/+1
Change-Id: I38a9538dc93cdcecbeb236f0eadc3d675cf20b5d
2019-05-02udts/xudts: Attempt to implement unitdata service parsingHolger Hans Peter Freyther1-0/+30
Use the new offset based parsing to extract GT and data from the UDTS/XUDTS message as well. Test vectors are missing right now. Change-Id: Id0a3a291d8bad3f8c9621e6c97d4ea0b8bbe6035
2019-05-01xudt: Implement address and data extractionHolger Hans Peter Freyther3-14/+142
The cellmgr-ng unfortunately looks at the data being sent and can't handle the presence of XUDT at all. Add the structure definition and refactor extraction code to work on offsets. Add a unit test. Change-Id: I45a7447cc1be432fff34849e0e35abc0410cf153
2019-04-12add osmo_sccp_addr_cmp(), osmo_sccp_addr_ri_cmp()Neels Hofmeyr4-0/+392
osmo-msc identifies its BSC and RNC peers by SCCP address, and compares those by memcmp(), which is not really accurate. Rather provide a meaningful osmo_sccp_addr_cmp() API to determine whether SCCP addresses are identical. Go for a full cmp that would also allow sorting. Change-Id: Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5
2019-04-12add caller-owns-msgb variant osmo_sccp_user_sap_down_nofree()Neels Hofmeyr4-23/+38
Add osmo_sccp_user_sap_down_nofree(), which is identical to osmo_sccp_user_sap_down(), but doesn't imply a msgb_free(). To implement that, sccp_sclc_user_sap_down_nofree() with the same msgb semantics is required. Rationale: Avoiding msgb leaks is easiest if the caller retains ownership of the msgb. Take this hypothetical chain where leaks are obviously avoided: void send() { msg = msgb_alloc(); dispatch(msg); msgb_free(msg); } void dispatch(msg) { osmo_fsm_inst_dispatch(fi, msg); } void fi_on_event(fi, data) { if (socket_is_ok) socket_write((struct msgb*)data); } void socket_write(msgb) { if (!ok1) return; if (ok2) { if (!ok3) return; write(sock, msg->data); } } However, if the caller passes ownership down to the msgb consumer, things become nightmarishly complex: void send() { msg = msgb_alloc(); rc = dispatch(msg); /* dispatching event failed? */ if (rc) msgb_free(msg); } int dispatch(msg) { if (osmo_fsm_inst_dispatch(fi, msg)) return -1; if (something_else()) return -1; // <-- double free! } void fi_on_event(fi, data) { if (socket_is_ok) { socket_write((struct msgb*)data); else /* socket didn't consume? */ msgb_free(data); } int socket_write(msgb) { if (!ok1) return -1; // <-- leak! if (ok2) { if (!ok3) goto out; write(sock, msg->data); } out: msgb_free(msg); return -2; } If any link in this call chain fails to be aware of the importance to return a failed RC or to free a msgb if the chain is broken, or to not return a failed RC if the msgb is consumed, we have a hidden msgb leak or double free. This is the case with osmo_sccp_user_sap_down(). In new osmo-msc, passing data through various FSM instances, there is high potential for leak/double-free bugs. A very large brain is required to track down every msgb path. osmo_sccp_user_sap_down_nofree() makes this problem trivial to solve even for humans. Change-Id: Ic818efa78b90f727e1a94c18b60d9a306644f340
2019-04-04sccp_scoc: conn_create{,_id}() user arg, not instOliver Smith1-13/+11
Accept the osmo_sccp_user instead of calling conn_create() and setting conn->user afterwards. Prepare for generating a local_ref inside conn_create_id() in the future. Related: OS#3871 Change-Id: I2fb47c8ba6c0ce7cd92c9ac31f15c67eb67fb66e
2019-04-03sccp_scoc: move sccp_find_user() upOliver Smith1-25/+25
Move it before sccp_scoc_rx_scrc_rout_fail(), so it can be used in the latter function to figure out the local_ref from the user (follow up commit). Related: OS#3871 Change-Id: Ieabeda3126dcc0349a06c0fc7c9e468b900d7855
2019-04-03Cosmetic: sccp_scoc: fix local reference commentsOliver Smith2-4/+4
Remove all comments, that claim conn_id is the local reference. This is only a hack, and should not be something to rely on. A properly separated local reference will be introduced shortly. Related: OS#3871 Change-Id: I900124037da76caaaf5ecee323eb82e1c6d2e368
2019-04-01sccp_scoc: Add more comments describing conn_id and local_ref membersHarald Welte1-0/+8
Change-Id: I85cabc42621103de1a83282baf210fbc117b63db
2019-03-15Fix output of route destination in 'show ss7 instance <0-15> route'Harald Welte5-1/+53
We were printing the mask of the route, but not the point code itself. Best would probably be to print both? Closes: OS#3835 Change-Id: Ifa4fdbad953d40f222beb470a082eed8c20991ef
2019-03-14Store + show remote ip/port in dynamically created ASPsHarald Welte1-0/+6
"show cs7 instance 0 asp" before this patch would not display the remote IP/port information about dynamically-added ASPs but instead: Effect Primary ASP Name AS Name State Type Rmt Port Remote IP Addr SCTP ------------ ------------ ------------- ---- -------- --------------- ---------- asp-dyn-0 ? ASP_ACTIVE m3ua 0 (null) With this patch it is now correctly displayed: Effect Primary ASP Name AS Name State Type Rmt Port Remote IP Addr SCTP ------------ ------------ ------------- ---- -------- --------------- ---------- asp-dyn-0 ? ASP_ACTIVE m3ua 24905 127.0.0.1 Change-Id: I39a1c57bc72e8aff607f3a551811a2f6372adab4 Closes: OS#3836
2019-03-14improve logging for rejected AS in xua_rkm.cNeels Hofmeyr1-1/+3
Change a loglevel from NOTICE to ERROR, for when a routing key gets re-purposed. Add another error log for insufficient resources case. Change-Id: Id22e3c6bab5f7b597df3514eedb162277ce0ef7d
2019-03-13vty: Ensure to properly save route pointcode and mask when writingHarald Welte1-1/+1
As osmo_ss7_route_print() returns a static buffer, we cannot use it twice within a single log/print statement. Rather, we must use osmo_ss7_route_print2() for the second call, as it uses a separate static buffer. Change-Id: Ica32e83cbe8af2317cb07f8d8422a399fa537012