This patch adds signal handling to release memory in the exit
path of the tests. This is good to check what memory we are
leaking in the exist path of the tests.
This patch allows you to create PCAP traces between the BSC and BTS including
the LAPD frames. Useful for debugging communication issues.
So far, it was only possible to create layer 3 traces containing
OML/RSL. LAPD traces can be also interesting to debug communication
issues between the BSC and the BTS.
To enable PCAP of LAPD, you only have to invoke:
li->pcap_fd = osmo_pcap_lapd_open("/tmp/file.pcap", 0600);
By default, li->pcap_fd is set to -1 which means disabled.
openBSC needs a patch to replace all usage of e1_set_pcap_fd by
osmo_pcap_lapd_open.
CC e1inp_ipa_bts_test.o
e1inp_ipa_bts_test.c: In function ‘sign_link_up’:
e1inp_ipa_bts_test.c:47:8: warning: variable ‘dst’ set but not used [-Wunused-but-set-variable]
e1inp_ipa_bts_test.c: In function ‘test_bts_gsm_12_21_cb’:
e1inp_ipa_bts_test.c:211:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
CCLD e1inp_ipa_bts_test
If we hit any error, spot an error message containing the reason
and close the links to start over.
This patch has been tested by injecting errors in:
* ipaccess_send, by randomly returning -1.
* returning error from the ->sign_link_up callback, both from the
OML and RSL links.
* returning error from the ->sign_link callback, both for the
OML and RSL links.
With this patch, Valgrind shows no "definitely lost" memory blocks
anymore (including the error path that has been tested) and the
ipaccess driver behaves more robustly in case of errors.
Acked-by: Holger Freyther <holger@freyther.de>
The sequence to trigger the crash was:
1) establish a full A-bis IPA link (both OML and RSL correctly established
and ID_RESP received from BTS).
2) nc 127.0.0.1 3002 # establish OML link only
I forgot to set to NULL the oml and rsl links we're using. Otherwise,
the test calls e1inp_sign_link_destroy(rsl) which does not exists.
Holger reported a leak in the ipaccess_drop path and a patch to
fix this. This is a new version of the patch posted that also
handle the case in which only one of the link (OML / RSL) is
established and no ID_RESP was received.
Based on patch of Holger Freyther.
Therre is no current use of HAVE_* variables for these checks in the
code, so there is no reason to keep the checks around.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Also disable building the gzip distribution since we're building the
bzip2-compressed tarball already.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
This spares us another recursion, and allows a much higher
parallelisation, since trau is only one source unit and one standalone
library.
Incidentally, also make sure that the version specification for
libosmoabis is applied.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
automake is well capable of building sources present in sub-directory
without requiring a recursion, so there is no reason to use a
non-installed library just for the extra files.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
This simplifies installation of include files, as make no longer have
to recurse into subdirectories and install each subset of files in
different directories.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Also contextually remove the AC_PROG_LIBTOOL call (which is an
obsolete name for what is now LT_INIT).
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
The E1 abstraction provides the above method, declare it in
our header file.
GCC warning (of OpenBSC):
abis_rsl.c: In function ‘rsl_bcch_info’:
abis_rsl.c:221:2: warning: implicit declaration of function ‘abis_rsl_sendmsg’ [-Wimplicit-function-declaration]
When many applications write to the stdout it is not clear that
'network_error' comes from osmo-bts due the usage of oRTP. At least
provide a hint that oRTP is involved.
* HSL/IPA had different socket closing code for the same thing,
create one method for it.
* Both methods tried to send an event but as we are on the close
path the sign_link was already removed from the list and the
input event sending method couldn't find the sign_link using the
sapi/tei provided.
We used to write as many messages as we received from mISDN for
b-channels. Now we write as many _bytes_ as we have received, which
seems to be the more logical thing to do.
The core functionality of input/lapd.c is removed. Now it uses lapd_core.c
of libosmogsm. The stucture of lapd_instance and SAP (SAPI/TEI handling)
is kept, as well as interfaceing and header transcoding. The former
implementation of datalink is completely replaced, except for the minimal
TEI manager..
Currently it supports 3 modes:
- ABIS (BS11/Ericsson/Nokia)
- ISDN (Not used yet)
- ASAT (A interface for satellite)
all these modes can run as NETWORK or USER.
the "e1_line <0-255> port <0-255>" vty command allows the user to
set which physical port/card number should be represented by the
given virtual e1_line.
Furthermore, we now actually query the DAHDI hardware to determine the
number of ports of a given span (e.g. only 24 in case of T1) instead of
blindly assuming there are 31 timeslots on each port.
This specifically will fix T1 timeslot (/dev/dahdi/%u) calculation in
setups with multiple DAHDI spans/ports and a T1 span != span 1.