summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
12 daysss7: Do not queue messages if stream is not connectedHEADpespin/mastermasterPau 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
2019-03-06debug log typo fix in sccp_scoc.cNeels Hofmeyr1-1/+1
Change-Id: Ic5637700122ef26a44932149994c01ccbfc18ffd
2019-02-18OsmoSTP: enable statsd supportMax1-0/+4
Change-Id: I5309ae44e5b9eda1a5dd1bbf10db5ffdff1fa9cd
2019-02-12osmo_ss7.c: fix typoMax1-1/+1
Change-Id: Idd0945ef7fa5cc0caf2f35919f97e2e11691f3a3
2019-02-07Don't use deprecated osmo_stream_cli_open2()Max1-3/+4
Using osmo_stream_cli_open() with explicit timeout set via osmo_stream_cli_set_reconnect_timeout() will have the same effect. Update comment explaining this as well as the code. Change-Id: Iffe6ea48a170880faef071c7c4a1bc0605aa9855
2019-01-20Bump version: 0.10.0.39-b723 → 1.0.01.0.0Harald Welte6-11/+69
Change-Id: I9b9d9331bdd1d9cdebdef5c3e0c49a1b18972abd
2019-01-20sccp.c: Fix gcc-8.2 -Werror=maybe-uninitializedHarald Welte1-1/+1
This fixes the following compiler warning when using -Werror on gcc-8.2: sccp.c: In function ‘sccp_system_incoming_ctx’: sccp.c:1039:10: error: ‘result.destination_local_reference’ may be used uninitialized in this function [-Werror=maybe-uninitialized] && memcmp(&conn->source_local_reference, result.destination_local_reference, sizeof(conn->source_local_reference)) == 0 sccp.c:1030:27: note: ‘result.destination_local_reference’ was declared here struct sccp_parse_result result; ^~~~~~ Change-Id: Ied41f7c8ddaa5f616dd6556079a54d8d70274490
2018-12-20fix ipa_asp_fsm down state transitionStefan Sperling1-22/+27
Properly transition into IPA_ASP_S_DOWN from IPA_ASP_S_ACTIVE and fix the mask of legal out states from IPA_ASP_S_ACTIVE. BSC-sccplite tests are still passing with this change. Change-Id: Idb8e7bd1c74a4b47080fe32ebe0161c503ead571 Related: OS#3111
2018-12-06contrib: fix makedistcheck with disabled systemdOliver Smith1-1/+2
EXTRA_DIST files need to be distributed, no matter if the systemd option is configured or not. Change-Id: Ib848aa5ce03f45d4f8182a4e77b0130ccb261635
2018-12-05contrib/jenkins.sh: build and publish manualsOliver Smith1-2/+19
Add new environment variables WITH_MANUALS and PUBLISH to control if the manuals should be built and uploaded. Describe all environment vars on top of the file. When WITH_MANUALS is set, install osmo-gsm-manuals like any other dependency and add --enable-manuals to the configure flags (for "make" and "make distcheck"). Add the bin subdir of the installed files to PATH, so osmo-gsm-manuals-check-depends can be used by ./configure. Related: OS#3385 Change-Id: I5904c86c7e38d36d23df213f5a2ae1986647a051
2018-12-04Fix DISTCHECK_CONFIGURE_FLAGS overrideOliver Smith1-1/+1
Set AM_DISTCHECK_CONFIGURE_FLAGS in Makefile.am instead of DISTCHECK_CONFIGURE_FLAGS. This is the recommended way from the automake manual, as otherwise the flag can't be changed by the user anymore. Related: OS#3718 Change-Id: Ib3f443e07f51df352357c5a90792bd946efcdf27
2018-11-27build manuals moved here from osmo-gsm-manuals.gitOliver Smith7-26/+87
Moved to doc/manuals/, with full commit history, in preceding merge commit. Now incorporate in the build system. Build with: $ autoreconf -fi $ ./configure --enable-manuals $ make Shared files from osmo-gsm-manuals.git are found automatically if - the repository is checked out in ../osmo-gsm-manuals; or - if it osmo-gsm-manuals was installed with "make install"; or - OSMO_GSM_MANUALS_DIR is set. Related: OS#3385 Change-Id: Ib5a22c2ea81fdde036bf9efb47d785a830b88c93
2018-11-27Merge history from osmo-gsm-manuals.gitNeels Hofmeyr6-0/+1662
Change-Id: Iabd0af069f00e7827a7793aabfc38a14fb7f1570
2018-11-27stp: update vty reference with added SCCP commandsNeels Hofmeyr1-1/+99
After I66e97706de0c546db3c6ff77fb5e6ac6e32bff55 which adds the missing sccp_vty_init(), update VTY reference with the new SCCP show / config commands. Depends: I66e97706de0c546db3c6ff77fb5e6ac6e32bff55 Change-Id: Id941b8e31d3b4cfdb3f912beedc1e7af321a0113
2018-11-27stp: update vty referenceNeels Hofmeyr1-55/+130
Change-Id: Id5f1067760db7a11ec380a541bfe7357a21a3bb3
2018-11-27vty-ref: Update URI of docbook 5.0 schemaHarald Welte1-2/+2
... to match the /etc/xml/catalog file on debian (no "www" in hostname) Change-Id: Id9f3579c7f2bc3af13fe30b5268f249b6f59ed0d
2018-11-27OsmoSTP: update VTY referenceNeels Hofmeyr1-1742/+1359
This is the first update since the libosmocore changes to the 'show online-help' generated output. Hence the produced document now benefits from the structural improvements: - not repeating common commands for every node; - using section names that match the VTY prompt. Change-Id: I98cdfcb6c1c7db49ab106e775be92e4c6adeab17
2018-11-27STP: Update vty reference XML fileHarald Welte2-2/+1742
This ensures useful content in the STP vty reference manual Change-Id: Ica4b1c0172255ec2328562fdd8fac190e3ad448d
2018-11-27First step towards an OsmoSTP manualHarald Welte6-0/+132
Change-Id: I450bfac7444ac9cb7f50c086d87cf7157c2e2a31
2018-11-27Importing history from osmo-gsm-manuals.gitNeels Hofmeyr0-0/+0
Change-Id: I17bfe64d98ca47cb4b3be81d2715bda047b79466
2018-11-22SS7: safeguard against wrong number of pointcode componentMax1-1/+2
Previously internal function get_pc_comp_shift() returned negative error code when called with wrong component number despite unsigned return value which wasn't checked for error anyway. Fix this by using explicit assert in the error path. This should not affect external users because this function always called with constant component argument. Change-Id: Ib24cdbcf614bad68f3cfa9776a451c5c1e45ae6e
2018-11-19Log ip:port for created SS7 serverMax1-1/+4
Change-Id: If2ae093175d64000490a2be31ecfea265ca3853d
2018-11-19Make pointcode width function publicMax2-3/+5
That's useful for external programs veryfying pointcode validity. For example if used as part of BSS-related identity in GCR construction by LCLS code we should be able to double.check that no significant bits off pointcode are lost/ignored. Change-Id: I5a9981dd2c1d78966c61a3f6b50c7c0d9b542caf
2018-11-18osmo-stp: add SCCP related VTY commandsNeels Hofmeyr1-0/+1
Call osmo_sccp_vty_init(), so far forgotten. This adds the various 'show cs7 instance N sccp *' commands, as well as making the SCCP timers configurable. See Id941b8e31d3b4cfdb3f912beedc1e7af321a0113 for a diff of the VTY reference, showing what commands are enabled by this patch. Change-Id: I66e97706de0c546db3c6ff77fb5e6ac6e32bff55
2018-11-09return error code from xua_srv_conn_cb() if conn is freedStefan Sperling1-1/+5
Allow callers of xua_srv_conn_cb() to tell whether conn was freed by returning error code EBADF, which is also used elsewhere in osmocom programs for this purpose. This is necessary because xua_srv_conn_cb() might be running inside of a loop which checks for read and then write events on the connection. If the connection is freed by xua_srv_conn_cb() as part of processing a read event, callers should avoid further processing of events. But if we don't return an error we are leaving callers none the wiser and with a dangling conn pointer. Change-Id: I7359667b2f25d6c45acc70049b2a4ee2f376a1df Related: OS#3685