This way one can install two ABI incompatible versions of the
library at the same time. This will ease future transition. Create
a dummy/compatible package.
This was basically a link to configure/ipa which is not cleanly
supported by the current VTY framework.
The test program uses the default implementation for
go_parent_cb/vty_go_parent() and is_config_node, since config-ipa is
a top level config node which is assumed by default.
This patch removes the local 'end' and 'exit' implementations and
uses the generic ones provided by libosmocore instead, which are
enabled automatically when vty_install_default() is used.
The second check used the cached result for ORTP. Store the result
in ORTP_VERSION and my system properly detects that it is running
on < 0.21.
The HAVE_ORTP_021 will always be defined so just use #if and not
the #ifdef to fix the build.
in order to keep the message ordering right, we first send the
ID_ACK/ID_RESP messages, before handing sign_link_up() into the
application. This ensures that no OML messages get transmitted before
the ID_ACK/ID_RESP has been completed
When an IPA link is in client (BTS) mode, we should not automatically
re-connect in the lowest (ipa) layer. Instead, we properly close the
socket if the link is dead, and we call link->updown_cb() to notify
the user that the link is down.
The e1inp/ipaccess layer translates this into a line->sign_link_down()
callback that propagates up to the user.
This would create linked list coruption in osmo_fd_unregister().
The fact that multiple calls of osmo_fd_unrgeister() on the same fd
happen is due to the fact that ipaccess_drop() and others already close
the file descriptor.
If a write on an IPA file descriptor fails, then we call
ipaccess_drop(). However, only in the BSC side the assumption that
bfd->data == e1inp_line holds true. On the BTS side, ofd->data
references to the ipa_client_conn structure. In order to avoid the
problem, call ipaccess_drop() with an explicit reference to the line in
which the link was dropped.
If we have a BTS-side e1inp_line, we can only establish OML at the
time of line_update. We have to wait with RSL until the BTS explicitly
tells us the RSL destination IP and port (received via OML from BSC).
This is now handled in a new function called
e1inp_ipa_bts_rsl_connect().
input/ipa.c: In function 'ipa_server_link_create':
input/ipa.c:344:2: warning: implicit declaration of function 'osmo_generate_backtrace' [-Wimplicit-function-declaration]
input/ipaccess.c: In function 'ipaccess_bts_cb':
input/ipaccess.c:873:2: warning: implicit declaration of function 'osmo_generate_backtrace' [-Wimplicit-function-declaration]
Add assertion as suggested by Holger. This function does not make
much sense with the accept callback set. While at it, check return
value of the accept callback and release the peer socket in case
such callback returns an error.
Reported by Holger.
Reference: CID 1040692
e1_input.c: In function 'e1inp_tx_ts':
e1_input.c:620:6: warning: variable 'len' set but not used [-Wunused-but-set-variable]
Fix it by performing a stricter checking on the muxed bits
before transmission. Let's see if this spots some hidden bug
in this code.
The line->port_nr is compared to the array size of the span config
and then the array can be potentially accessed one element outside
of the array.
Fixes: Coverity 1042368
CC e1_input.lo
e1_input.c: In function 'e1_set_pcap_fd':
e1_input.c:143:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
e1_set_pcap_fd returns now the result of write. OpenBSC is still
assuming that this function returns nothing, so it simply ignores
this return value by now.
In theory argc could be negative and this code would crash with
a null pointer dereference on the line pointer. Check for <= to
avoid this warning.
Fixes: Coverity CID 1040699
We want to store stream ids 0 to 0xff. This means we need to have
256 entries in this array.
Fixes: Coverity CID 1040697, CID 1040696, CID 1040695, CID 1040694
Warning:
input/misdn.c:252:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is
true [-Wsometimes-uninitialized]
if (mline->use_userspace_lapd) {
^~~~~~~~~~~~~~~~~~~~~~~~~
input/misdn.c:289:9: note: uninitialized use occurs here
return ret;
^~~
input/misdn.c:252:2: note: remove the 'if' if its condition is always false
if (mline->use_userspace_lapd) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
input/misdn.c:241:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
This was spotted by clang3.3 and got broken in git revision
f42280b6a2 when moving to the
C99 initializer.
Warning:
input/lapd.c:106:30: warning: initializer overrides prior initialization of this subobject
[-Winitializer-overrides]
.t203_sec = 20, .t203_sec = 0,
^
input/lapd.c:106:14: note: previous initialization is here
.t203_sec = 20, .t203_sec = 0,
^~
1 warning generated.
If we bind a local socket to INADDR_ANY, then getsockname() will always
return 0.0.0.0 for the local IP address _unless_ the socket was
previously connected to a specific remote IP/port using connect().
This will have the side effect that we only accept RTP packets from the
one IP/port that we have connect()ed to, but that is actually
intentional and useful in our applications.
This file is created in ./configure so we shouldn't remove it with make.
Otherwise ./configure && make clean && make check fails
with:
make[3]: *** No rule to make target `atconfig', needed by `check-local'.
Stop.
This patch relaxes the behaviour on error coming from the signalling
layer. This is probably too strict for recoverable errors.
Don't release msgb in this case, as this is controled by the signaling link
layer.
Thanks to Lennart Müller <mueller.lennart@googlemail.com> for the report.
Tests if the frame synchronization header is correctly recognized.
The problem tested for is the following:
The sync header consists of 16 zero-bits followed by 1 one-bit. Before,
subchan_demux only tested for the 16 zero-bits. But if the previous
frame ended in one or more zero-bits these were then already counted as
belonging to the sync header, leading to a frame that was shifted by one
or more bits.
Tobias has worked on CSD support and Dieter has helped with a CSD
trau fix. This is a stub that should allow to easily write a test
case for the syncing issue observed by Tobias.
Run the tests:
$ make check
In case of failure:
$ vi tests/testsuite.dir/1/testsuite.log
Add the actual content:
$ edit tests/subchan_demux/subchan_demux_test.c
Update the test result:
$ ./tests/subchan_demux/subchan_demux_test > tests/subchan_demux/subchan_demux_test.ok
There is no interworking function (IWF) here. The contents of an uplink
frame simply gets copied into a downlink frame. For this to work both
sides of the call need to connect with the same speed and parameters.
The sync header consists of 16 zero-bits followed by 1 one-bit. Before,
subchan_demux only tested for the 16 zero-bits. But if the previous
frame ended in one or more zero-bits these were then already counted as
belonging to the sync header, leading to a frame that was shifted by one
or more bits.