When the user enters each "peer" node, the related object is created if
not yet existing, and its updated config is applied (connect()) upon
exiting the node (cbc_peer_apply_cfg_chg()). When connect happens, it
needs to obtain the local IP address from the main protocol node
(cbsp|sbcap)", which means it must be configured beforehand, otherwise
the peers connect using the default values.
Hence, it makes no sense to configure peers if the main protocol
information has not yet been configured. The usual example configs as
well as the write-config VTY commands provide correct order of things.
Catch and forbid the user providing a config file where the peers are
configured before the main protocol nodes.
Related: OS#6154
Change-Id: I678f9e6715c85b1eb9116cc892f1a8299577c0c2
Update skeleton files using newest asn1c with APER support [1],
commit 08b293e8aa342d465d26805d1d66f3595b2ce261.
This contains among others, fix to automatically disable stack overflow checks [2]
when using ASan, in order to avoid failing during unit test run.
[1] https://github.com/mouse07410/asn1c/tree/vlm_master
[2] https://github.com/mouse07410/asn1c/pull/128
Related: OS#6025
Change-Id: I385d14d4be308b991a48ce1033087f07bd1f47ea
This option should be used for any executables which are used only
for testing, or for generating other files and are consequently never
installed. By specifying this option, we are telling Libtool that
the executable it links will only ever be executed from where it is
built in the build tree. Libtool is usually able to considerably
speed up the link process for such executables.
Change-Id: I405b5e85113e9529b4491c7eeeec71afe25ef488
... so that locally built libraries are listed first.
Otherwise the linker may pick system-installed libs instead.
Change-Id: I3396a95d221e81f3785a5883630d261f033aa10e
By default systemd will execute service with root directory (or home directory for user instance) which might result in
attempts to create files in unexpected place. Let's set it to 'osmocom' subdir of state directory (/var/lib for system instance) instead.
Related: OS#4821
Change-Id: I033029a6b1f2bfa259cec74b139a33b0897fcd98
Executing 'maintainer-clean' before 'publish' makes the later fail:
+ make -C /build/doc/manuals publish
make: Entering directory '/build/doc/manuals'
make: Leaving directory '/build/doc/manuals'
make: *** No rule to make target 'publish'. Stop.
Execute 'maintainer-clean' after 'publish', like other projects do.
Change-Id: I16cc855ee05726938e1542f481488364c5e47a95
Fixes: I2fe0de9bcb372333da1e5c81712a511cda34858c
3GPP TS 23.041 9.3.32 states that the IE is always present for non-ETWS
messages and never present in ETWS messages.
Related: OS#4945
Change-Id: I4a5ac56b7e6eeb85aee07ae2ddf10fa2afbbf4ef
if conn is not in STREAM_CLI_STATE_CONNECTED state, it won't call disconnect_cb during
osmo_stream_cli_destroy(), hence the osmo-cbc pointers holding are not
nullified correctly.
"""
20220801174147247 DCBSP NOTICE ttcn3-bsc-server: Disconnected. (cbsp_link.c:101)
20220801174147247 DCBSP NOTICE ttcn3-bsc-server: Reconnecting... (cbsp_link.c:102)
20220801174147247 DLINP INFO [WAIT_RECONNECT] osmo_stream_cli_reconnect(): retrying in 5 seconds... (stream.c:287)
20220801174152235 DCBSP DEBUG CBSP-Link[0x612000002c20]{RESET_PENDING}: Timeout of T3 (fsm.c:317)
20220801174152236 DCBSP DEBUG CBSP-Link[0x612000002c20]{RESET_PENDING}: timer_cb requested termination (fsm.c:327)
20220801174152236 DCBSP DEBUG CBSP-Link[0x612000002c20]{RESET_PENDING}: Terminating (cause = OSMO_FSM_TERM_TIMEOUT) (fsm.c:332)
=================================================================
==17==ERROR: AddressSanitizer: heap-use-after-free on address 0x6180000024f0 at pc 0x7fbd28a05d01 bp 0x7ffe247352b0 sp 0x7ffe247352a8
READ of size 4 at 0x6180000024f0 thread T0
#0 0x7fbd28a05d00 in osmo_stream_cli_close /tmp/libosmo-netif/src/stream.c:307
#1 0x7fbd28a0a5b3 in osmo_stream_cli_destroy /tmp/libosmo-netif/src/stream.c:714
#2 0x55c3534a0322 in cbc_cbsp_link_close /tmp/osmo-cbc/src/cbsp_link.c:356
#3 0x55c3534a16e1 in cbsp_link_fsm_cleanup /tmp/osmo-cbc/src/cbsp_link_fsm.c:199
#4 0x7fbd28bf5085 in _osmo_fsm_inst_term /tmp/libosmocore/src/fsm.c:947
#5 0x7fbd28be6881 in fsm_tmr_cb /tmp/libosmocore/src/fsm.c:332
#6 0x7fbd28bc70ab in osmo_timers_update /tmp/libosmocore/src/timer.c:269
#7 0x7fbd28bcba5b in _osmo_select_main /tmp/libosmocore/src/select.c:394
#8 0x7fbd28bcbb31 in osmo_select_main /tmp/libosmocore/src/select.c:438
#9 0x55c35348bce8 in main /tmp/osmo-cbc/src/cbc_main.c:314
#10 0x7fbd27a4cd09 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26d09)
#11 0x55c353488ce9 in _start (/usr/local/bin/osmo-cbc+0x68ce9)
"""
Change-Id: Ic13578e958345207892465644b5e1f28537c032d
This makes the smscb_message_fsm receive immediate notice that this peer
failed to deliver the message, avoiding need to wait for 10 seconds
timeout.
Change-Id: I1f3911accb327f3378d65902d53d86fb298fd528
It really doesn't make sense to share the event list betwen those for
several reasons.
First, because ech of those FSM relate to different things:
* smscb_message_fsm: Handling/scheduling of 1 smscb towards all peers
* smscb_peer_fsm: Handling/scheduling of 1 smscb towards 1 peer.
The former has higher level interface used by the REST
API, plus some mid level interface used by smscb_peer_fsm.
The later has a mid level interface used by smscb_message_fsm to
interact, and a lower level interface used by the SBcAP/CBSP links to
talk to.
Furthermore, this makes it a lot easier understanding which events are
sent from one to another FSM.
Change-Id: I909474d1ff4ec7ed20aff0981da47074397df6cb
If cause != accepted, submit a NACK to the upper layers.
In that case, in the upper layers we don't want to parse the PDU IE
"Unknown Tracking Area List" since it shouldn't be there. 3GPP TS
29.168 4.3.4.3.6 states:
"""
This IE shall only be included if the Cause IE indicates Message accepted, which means the MME will proceed with the
request for Tracking Areas that are known to the MME. The Cause IE indicating Tracking area not valid is used when
all Tracking Areas in the Request are invalid.
"""
Change-Id: I0a4d5bdbb6c4fd3870a4f4ebf226668b70fea06a
ASN1C encoding/decoding can get really verbose. Furthermore, it should
only be enabled under really specific conditions, so it makes sense to
have it under its own category.
Change-Id: Ia4cbae2395532d9b5b7b9177a7d0f31bf777d751
Previous naming is misleading, as it seems to indicate the function is
used to generate any kind of message, which is wrong.
Change-Id: Ib0228c64bbf104accdbbebb6076004a6a1f44c6f
Move code from message_handling containing both code for generic
cbc_message and specific cbsp_message into thers files. The former are
moved to cbc_message.c and the later to cbsp_msg.c, similar to what's
already done for SBc-AP messages.
Change-Id: Ie4082e40f23170cfd6c573fbbb7beb8c6226b6e6