* log port from which we accept() the connection in addition to address
* use macro helper for logging
Change-Id: I186974dae1819af8c92f9ea9eeb966ec7c9c9f55
When creating IPA link for server we might be called without explicit
address (which is legit - it means bind to all available
addresses). However in this case we won't have 'addr' field of
ipa_server_link initialized properly.
Fix this by following changes:
* don't copy NULL value as address
* use socket's local IP when no address set explicitly
Change-Id: I33679bb35f426d4cafb223b9200fccbf407e0cf6
Due to apparent copy-paste errors, wrong values were being
logged for IPA tags in ipa_bts_id_resp().
Fixes: 4c57eef663
Change-Id: I29a0401db0760219b9b9176709a88d589312261b
Related: OS#3355
dev->trx_id points to a structure used for whole BTS and doesn't point
to related TRX ID, which is encoded in priv_nr.
Change-Id: I00b01790990c8d21fdbe0f5750fa02f13ddb2009
The unix(7) man page recommends that sun_path is NUL-terminated
when struct sockaddr_un is passed to a bind() or connect() call.
Non-NUL-terminated paths only need to be dealt with at the
receiving end of a UNIX domain socket.
Commit b24efa5 erroneously assumed otherwise.
Change-Id: I9beecfa500db75cb679b1edcc352c893bf098b13
Fixes: b24efa551d
Related: OS#2673
In previous commit 9540f59b1d, libosmoabis
packaging was fixed to match its contained major lib version.
However, systems using nightly may run into issues when upgrading since
now libosmoabis6 in repo tries to overwrite libosmoabis5 in their system
and fails. By using Conflicts + Replaces it should do it now without
erroring.
Fixes: OS#3365
Change-Id: If98ae21670f13554da5aa46fe30741d56631fd8c
When parsing the configuration, reject a socket path which
exceeds the maximum size supported by the operating system.
In unixsocket_line_update() stop copying the line's socket path to a
local buffer. The path will be copied again in osmo_sock_unix_init().
Both changes are portable; we don't assume any particular socket
path length since the size differs between implementations of Unix,
and we rely only on information from the generic sys/un.h header.
Change-Id: I36344805a825f5d0e0c9d218d438d8fd985ed9ca
Related: OS#2673
LIBVERSION for libosmoabis was increased during v0.4.0 release, but
didn't update the debian package name accordingly to match major.
Change-Id: I7ead154d72e6dadf795414c47fe276edadd08580
Fixes: OS#3365
As we are closing the socket, there's no need for lower layers to
continue handling it, so let's return -EBADF.
Change-Id: I961b0ef7e598a09ce48a83038c0d90a415e0e11c
Similar to what we do in other osmo_fd cb, check for read_cb returning
-EBADF and in that case don't attempt using the osmo_fd anymore, either
because the fd was already closed (no need to then signal WRITE) or
because osmo_fd struct itself has been freed.
Change-Id: I4b968b72285f23a9552519cea67398a43d5003d2
Similar to what we do in other osmo_fd cb, check for read_cb returning
-EBADF and in that case don't attempt using the osmo_fd anymore, either
because the fd was already closed (no need to then signal WRITE) or
because osmo_fd struct itself has been freed.
Change-Id: I0e449a2bdf7f0411feeccd262cd731ca6fba3fc1
By doing this change we remove a duplicated error code path and thus
avoid having to maintain an extra code path with function pointers.
Change-Id: I5bce9f92209cc2fb37b78792e34f7898c71d2327
By doing this change we remove a duplicated error code path and thus
avoid having to maintain an extra code path with function pointers.
Change-Id: Ic044894980ae2b882d99eb30d9df50066671d8f3
ipaccess_bts_read_cb() only initializes signalling links if it has received an
IPA ID GET message on it, and so far happily accesses the uninitialized
sign_links list anyway if it hasn't.
Reproduce: simply don't send an IPA ID GET message when connecting to an IPA
server run by libosmo-abis, then continue to use the link --> segfault.
Fix the segfault: make sure that the e1inp_ts' type has been set, i.e. that
e1inp_ts_config_sign() has been called and the sign_links llist is initialized,
before calling e1inp_lookup_sign_link() on it.
../../../src/libosmo-abis/src/e1_input.c:511:2: runtime error: member access within null pointer of type 'struct e1inp_sign_link'
../../../src/libosmo-abis/src/e1_input.c:512:11: runtime error: member access within null pointer of type 'struct e1inp_sign_link'
ASAN:SIGSEGV
=================================================================
==5702==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000038 (pc 0x7f28a379ea34 sp 0x7ffd7d8933f0 bp 0x62e000000a98 T0)
#0 0x7f28a379ea33 in e1inp_lookup_sign_link ../../../src/libosmo-abis/src/e1_input.c:512
#1 0x7f28a37b97d4 in ipaccess_bts_read_cb ../../../src/libosmo-abis/src/input/ipaccess.c:778
#2 0x7f28a37b0277 in ipa_client_read ../../../src/libosmo-abis/src/input/ipa.c:76
#3 0x7f28a37b0277 in ipa_client_fd_cb ../../../src/libosmo-abis/src/input/ipa.c:139
#4 0x7f28a2ac1a34 in osmo_fd_disp_fds ../../../src/libosmocore/src/select.c:217
#5 0x7f28a2ac1a34 in osmo_select_main ../../../src/libosmocore/src/select.c:257
#6 0x444ba3 in bts_main ../../../../src/osmo-bts/src/common/main.c:364
#7 0x7f28a17ddb44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
#8 0x405e54 (/usr/local/bin/osmo-bts-trx+0x405e54)
Related: OS#3498
Change-Id: I2487ca37a0fe9aa56733f66bcad9dcf91fc11144
Commit 56ae85fd52 modified code in
ipaccess_rcvmsg to use osmo_fd_setup. During this change, a "|="
operator was converted to "=". Fix this change by manually ORing old and
new values passed to osmo_fd_setup.
Change-Id: Ie59072f07ca50d853c413fa038e447dcdee30a76
We have a public API in libosmocore, so let's use it istead of manually
filling each struct field.
Change-Id: I09479c3d5b0b9bd69a56c080b8c533a32824cc66
The .tarball-version file should contain the *source version* uniquely
identifying the git commit, and not the Debian package name.
With https://gerrit.osmocom.org/#/c/osmo-ci/+/10343/ there is a correct
.tarball-version file in the .tar.xz of the nightly source packages.
Change-Id: I4ce87d474687b61bc2104a02015e954425736123
Related: OS#3449
In libosmocore Change-ID I1834d90fbcdbfcb05f5b8cfe39bfe9543737ef8f
we have introduced ipa_ccm_id_resp_parse() as a bugfixed replacement
of ipa_ccm_idtag_parse().
The main difference is that the returned "value" parts now have
a correct reported "length", whereas before this commit they all
reported a one-byte too-long "length" for each IE.
Change-Id: Id4c9ff821a43a37cbacce905d44fee43d1b2c879
The '.' is illegal character in counter names, as they are exported
via CTRL interface, where '.' has a special meaning that cannot be
used by strings comprising the variable name.
Change-Id: I730d1acdd5562cd2c1758ceee31193010b14337d
We discovered that enabling the scheduler caused a segfault on the
ARM build of osmo-bts. So we have to revert the following two changes:
Change-Id I3a63c23f5ede47773b6a249a48ecebd5d3b45ace
Change-Id I4b8f0349d5503bbe53745cc8903beb26f149f219
This reverts commit 5a236ce1d4.
Change-Id: Ic81062d79a304038a50658b955f7d05edb3fa28e
Related: OS#3299
We discovered that enabling the scheduler caused a segfault on the
ARM build of osmo-bts. So we have to revert the following two changes:
Change-Id I3a63c23f5ede47773b6a249a48ecebd5d3b45ace
Change-Id I4b8f0349d5503bbe53745cc8903beb26f149f219
This reverts commit 7632278ea3.
Change-Id: Ie375b9eb0dc8ec4f8d4ca12940a7bc5dfc1f6235
Related: OS#3299
we use some functionalities of libortp that require to use rtp sessions
with the scheduled mode enabled. Since we do not enable the scheduled mode,
yet, we receive error messages in the log that complain about a non enabled
scheduled mode.
- Turn on scheduled mode using rtp_session_set_scheduling_mode() when
osmo_rtp_socket_create() is called.
Note: this patch is related to chane:
I3a63c23f5ede47773b6a249a48ecebd5d3b45ace Unfortunately we observed a
segfault with ortp version 0.25.0 (ARM), which seems to be related to an
unintialized scheduling mode. We expect this patch to fix the problem.
Change-Id: I4b8f0349d5503bbe53745cc8903beb26f149f219
Closes: OS#3299
libortp detects an ssrc jump using a packet count thresold. This
threshold is set to 50 by default. This means that libortp has
to see 50 rtp packets with the new SSRC before it accepts the
new stream. In our application we want to detect the changed
SSRC (Handover) as fast as possible. So we should change the
threshold to zero.
- use rtp_session_set_ssrc_changed_threshold() to set a thresold
of 0 packets when osmo_rtp_socket_create() is called.
Change-Id: Id88c2c44d29a409affc2e47fdb932e1187020593
Related: OS#3299
When libortp detects a timestamp jump, we resynchronize the session
in order to restore proper rtp frame reception. However, we do not
resynchronize on an SSRC change. An SSRC change usually indicates
the change of an RTP stream source, which is a much more profound
event than a timestamp change, so we should even reset the session
on SSRC changes.
Also, not resynchronizing the session on an SSRC change causes
problems when the jitter buffer feature is used. In those cases
it takes libortp a long time until it finally detects the timestamp
jump and the session resyhcornization happens late.
- reset the ession on SSRC changes by calling rtp_session_reset()
Change-Id: I8688a55cd20d0e14493c357db80754851e12f2fb
Related OS#3299
the function osmo_rtp_init() is initializing ortp at the start of the
application. However, it does not start the scheduler of ortp, which
leads into error log messages in some situatios.
- make sure that ortp_scheduler_init() is called with osmo_rtp_init()
Change-Id: I3a63c23f5ede47773b6a249a48ecebd5d3b45ace
Related: OS#3299
Ensure that pointers in cloned e1inp_lines point to valid memory.
Some members of struct e1inp_line can simply be deep-copied.
Use talloc reference counting for pointers to objects which may
be shared between clones (driver-private state and counters).
Prevents double-free bugs, e.g. when multiple links referring
to the same line are closed.
Also, do not forget to unlink struct e1inp_line's counter group from
the counter list. Fixes use-after-free in rate_ctr_timer_cb() during
osmo-bts shutdown.
Change-Id: I9f4724b4a5a064801591e9acf4f2fd1db006d082
Related: OS#3011
Related: OS#3137
Those values are not used anymore, since the old bfd is unregistered and
the values for the new one will be overwritten by osmo_fd_register.
Change-Id: I7ac74843cbed920a2fdc6ade7aef4d4de905939a
Tags starting with "v*" are old ones. We first want to check for the new
ones, otherwise the wrong tag is selected as the last one.
Change-Id: Ic39bed2fcf7e3ccb6a83e2999d29d129e07c1a84
While building libosmo-netif on a system with an old ortp (0.22), it
was seen that warning related to RTP_SIGNAL_PTR_CAST not being correctly
selected were being printed. The compilation didn't fail there as
expected because the issue was being handled as a warning instead of an
error, so the void* ptr case was always being selected.
Change-Id: Ib5e7569e68fdb921c63e0c12e20e73aafbebda46
ipaccess_rcvmsg() disposes of a temporary osmo_fd structure after
the RSL link comes up. It copies data from its temporary osmo_fd
to the new one returned by sign_link_up(). However, in doing so,
it clobbered the 'when' flags, which could differ between the two
osmo_fd structures.
For instance, BSC_FD_WRITE could be set on the new osmo_fd but
not on the old one, in case sign_link_up() has already enqueued
outbound messages using the new osmo_fd.
Because of this behaviour, a patch committed to osmo-bsc to address
issue #2719 did not work as intended and had to be reverted.
After this change, that osmo-bsc patch should work as intended
and issue #2719 can hopefully be resolved.
Change-Id: I52f7c903212b38e9c87e4d45e52b231b6f1ae9f5
Related: OS#2719
Provide a sane means of adding the -Werror compiler flag.
Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"',
but that actually *overwrites* all the other CFLAGS we might want to have set.
Maintain these exceptions from -Werror:
a) deprecation (allow upstream to mark deprecation without breaking builds);
b) "#warning" pragmas (allow to remind ourselves of errors without breaking
builds)
As a last configure step before generating the output files, print the complete
CFLAGS and CPPFLAGS by means of AC_MSG_RESULT.
Change-Id: I20d5f18cf05c9e277d914ada259a95187b73fe39
This allows the users of libosmotrau to set the content of the SDES
items to something more useful than their compile-time defaults.
Change-Id: Ice794f9e0c6caeea1c67520c12efbfa375d1fb82
Related: OS#2701