Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Debian doesn't have reverse dependencies so we need to bump the
SO version to have libosmoabis and libosmotrau link against our
new version.
|
|
ortp 0.18 has introduced the jitter_stats but we only check for
0.21 an later. It is okay that at some point the jitter stats
will be reported. For previous versions it is 0.
|
|
We might want to know how many things arrived at the BTS and
ortp is already counting for us. We don't intend to use RTCP
so I am not sure what the last "sender report" is and how
accurate the jitter is.
|
|
|
|
nullbytes has never been used, I assume the code ended up
using memset instead of copying from nullbytes.
Fixes:
subchan_demux.c:47:22: warning: unused variable 'nullbytes' [-Wunused-const-variable]
static const uint8_t nullbytes[SYNC_HDR_BITS];
|
|
|
|
|
|
Jacob noticed that after a re-connect old messages would be
sent. This can be the wanted behavior but add a method that
allows a caller to clear the tx queue. The implementation has
not been verified and there is no existing unit test where
I could easily add this code to.
|
|
Fixes: Coverity CID#1040691
|
|
A few declarations are missing.
This patch adds forward declarations for struct used for pointers
only and an include directive (osmocom/core/select.h) to get a full
definition of struct osmo_fd.
Sponsored-by: On-Waves ehf
|
|
When the link is being created BSC_FD_WRITE and BSC_FD_READ are
being ored into the flag. When the socket connects the first time
the ipa_client_fd_cb function is called and the link->state is
moved from connecting to connect.
In case the connection drops and ipa_client_conn_open is called
again the BSC_FD_WRITE flag might not be set. This means that after
the socket is connected, ipa_client_fd_cb will not be called. This
means that the updown_cb will not be called until after the first
write or read on the socket. It might even lead to missing some
data.
When re-connecting set the write flag again.
|
|
The check was always hit by osmo-bts master leading to the RSL
connection never being made. This is because the type of the line
will be set _after_ the RSL connection has been made. E.g. inside
osmo-bts/src/common/abis.c:
static struct e1inp_sign_link *sign_link_up(void *unit, struct e1inp_line *line,
enum e1inp_sign_type type)
{
struct e1inp_sign_link *sign_link = NULL;
switch (type) {
...
case E1INP_SIGN_RSL:
LOGP(DABIS, LOGL_INFO, "RSL Signalling link up\n");
e1inp_ts_config_sign(&line->ts[E1INP_SIGN_RSL-1], line);
...
Only the call to e1inp_ts_config_sign will set the type to be
E1INP_TS_TYPE_SIGN. Before the call the type is still _NONE and
the connect was rejected.
|
|
libosmo-abis/0.3.0+gitrAUTOINC+b6d2834eef-r2.14.0/git/src/input/dahdi.c:25:26: fatal error: ../../config.h: No such file or directory
#include "../../config.h"
|
|
|
|
This test didn't compile as it called the wrong method. It is a
manual test anyway and tend to bitrot. I didn't execute the
resulting test binary. Hmm, now I did and it segfaults on something
that appears to have been introduced a long time ago. Manual
tests are as good as no tests (besides they take more time than
writing no test). ;)
|
|
|
|
In order to support multiple TRX, multiple RSL connections can be
establised. e1inp_ipa_bts_rsl_connect() requires an additional parameter
to set the TRX number.
The ts[] array (member of struct e1inp_line) refers to OML and RSL.
ts[0] refers to OML link, ts[1] to RSL link of first TRX, ts[2] to
RSL link of second TRX (if exists) and so on.
The code was successfully tested with osmobts-trx and UmTRX with two
transceivers.
The user of e1inp_ipa_bts_rsl_connect() (which is osmo-bts) can use
the new function like this (backwards compatibility function provided):
src/common/oml.c
- rc = e1inp_ipa_bts_rsl_connect(oml_link->ts->line, inet_ntoa(in), port);
+ rc = e1inp_ipa_bts_rsl_connect_n(oml_link->ts->line, inet_ntoa(in), port,
+ trx->nr);
|
|
if we don't evaluate the result of write(), there's no point in
storing the result in a variable.
|
|
libosmo-abis is about forming A-bis interfaces/lines by means
of E1 or the IPA multiplex (or possibly other link layers).
The IPA multiplex is used in other contexts, such as the Control
interface, or the A interface. In that context, it makes sense to have
generic IPA related functions in libosmocore.
|
|
In order to make use of the IPAC_PROTO_OSMO stream_id of the IPA
multiplex via the e1_input abstraction layer, we need to define
E1INP_SIGN_OSMO and treat it like other signalling (OML/RSL).
This is required for the upcoming code that uses IPAC_PROTO_OSMO
to remotely insert routing table entries into the OML router (e.g. from
osmo-bts).
|
|
this function takes the parsed TLVs of an IPA ID RESP message and
fills a 'struct ipaccess_unit'.
|
|
ipaccess_idtag_parse(), int ipaccess_send_id_req() and
paccess_parse_unitid().
In the mid to long term, the entire IPA/CCM handling should be
moved out of the processes and into a proper state machine inside
libosmocore or libosmoabis.
|
|
The generic functionality of responding to IPA CCM messages doesn't need
to be intertwined with our e1input abstraction. We split this out
as new exported function ipaccess_bts_handle_ccm() and modify
ipaccess_bts_read_cb() to make use of that function.
|
|
Move the second null check before we actually dereference the
msg.
Fixes: Coverity CID 1231854
|
|
|
|
If the ipa_client_conn is lost and ther user issues a new
ipa_client_conn_open(), then we need to re-set our internal state
to IPA_CLIENT_LINK_STATE_CONNECTING, as otherwise we wouldn't call the
updown_cb() once the link is up again.
|
|
l2h points to the OML/RSL header, so it is only logical that l1h points
to the IPA header. Also, this is what osmo-bts/msg_utils.c expects.
|
|
purely cosmetic change.
|
|
Pick a random timestamp when creating the session.
RFC 3550:
The initial value of the timestamp SHOULD be random, as for the
sequence number.
Fixes: SYS#403
|
|
The usage of random() is not that unpredictable but the closest
we can get right now.
RFC 3550:
The initial value of the sequence number SHOULD be random
(unpredictable) to make known-plaintext attacks on encryption
more difficult, even if the source itself does not encrypt
according to the method in Section 9.1, because the packets
may flow through a translator that does. Techniques for
choosing unpredictable numbers are discussed in [17].
Fixes: SYS#403
|
|
These functions are called from OpenBSC and are supposed to be
public API of libosmo-abis.
|
|
Reported by coverity. CID 1206565.
|
|
|
|
Currently ipa_msg_recv() fails, when messages are received partially.
This patch provides a new function ipa_msg_recv_buffered() that uses
an additional ** to a message buffer to store partial data. When
this happens, -EAGAIN is returned. If NULL is used, the function
behaves similar to ipa_msg_recv() and fails on partial read.
In addition in case of errors the return value is now always -EXXX
and the contents of errno is undefined.
Note that this feature needs support by the calling code insofar that
*tmp_msg must be set to NULL initially and it must be freed and
set to NULL manually when the socket is closed.
Note also that ipa_msg_recv() is then a wrapper around
ipa_msg_recv_buffered() which mimics the old error behaviour by
setting errno explicitely to -rc and returning -1 when an error has
happened.
Ticket: OW#728
Sponsored-by: On-Waves ehf
|
|
This patch adds tests for ipa_msg_recv(), where messages are sent
either complete or partitioned.
Sponsored-by: On-Waves ehf
|
|
Fix the compilation on FreeBSD that does not use these names
but they are prefixed with TCPTV_KEEP... instead.
|
|
|
|
|
|
|
|
This patch changes the implementation to use the keep-alive
configuration fields instead of constants.
Ticket: OW#1060
Sponsored-by: On-Waves ehf
|
|
This patch adds a generic keep alive configuration layer that mainly
consists of additional fields in e1_input structs and VTY commands
and extensions.
Ticket: OW#1060
Sponsored-by: On-Waves ehf
|
|
Keep alive has only been used for OML so far.
This patch refactors the socket configuration into an own function
and uses it for RSL, too.
Ticket: OW#1060
Sponsored-by: On-Waves ehf
|
|
This way we can find out fast if the connection is broken.
Ticket: OW#1060
|
|
The issue was that the link has not been configured yet and the
list has not been initialized yet (it is NULL for next/prev).
Check if the ts is not configured before searching a link.
Reproduce with:
(Sockets.StreamSocket remote: 'localhost' port: 3003)
nextPutAll: #[0 1 0 0];
flush.
Backtrace:
#0 e1inp_lookup_sign_link (e1i=0x27af8c0, tei=0 '\000', sapi=0 '\000') at e1_input.c:437
437 if (link->sapi == sapi && link->tei == tei)
(gdb) bt
#0 e1inp_lookup_sign_link (e1i=0x27af8c0, tei=0 '\000', sapi=0 '\000') at e1_input.c:437
#1 0x00007f338ee87d49 in handle_ts1_read (bfd=0x27afe60) at input/ipaccess.c:436
#2 ipaccess_fd_cb (bfd=0x27afe60, what=1) at input/ipaccess.c:586
#3 0x00007f338f0976ce in osmo_select_main (polling=0) at select.c:158
#4 0x0000000000407394 in main (argc=<optimized out>, argv=0x7fff1aa4fed8) at bsc_hack.c:346
(gdb) p *e1i
$1 = {type = E1INP_TS_TYPE_NONE, num = 2, line = 0x222e860, lapd = 0x0, {sign = {
sign_links = {next = 0x0, prev = 0x0}, delay = 0, tx_timer = {node = {
rb_parent_color = 0, rb_right = 0x0, rb_left = 0x0}, list = {next = 0x0,
prev = 0x0}, timeout = {tv_sec = 0, tv_usec = 0}, active = 0, cb = 0, data = 0x0}},
trau = {demux = {chan_activ = 0 '\000', subch = {{
out_bitbuf = '\000' <repeats 319 times>, out_idx = 0, consecutive_zeros = 0,
in_sync = 0}, {out_bitbuf = '\000' <repeats 319 times>, out_idx = 0,
consecutive_zeros = 0, in_sync = 0}, {out_bitbuf = '\000' <repeats 319 times>,
out_idx = 0, consecutive_zeros = 0, in_sync = 0}, {
out_bitbuf = '\000' <repeats 319 times>, out_idx = 0, consecutive_zeros = 0,
in_sync = 0}}, out_cb = 0, data = 0x0}, mux = {subch = {{tx_queue = {next = 0x0,
prev = 0x0}}, {tx_queue = {next = 0x0, prev = 0x0}}, {tx_queue = {next = 0x0,
prev = 0x0}}, {tx_queue = {next = 0x0, prev = 0x0}}}}}}, driver = {misdn = {
fd = {list = {next = 0x7f338f2a7950, prev = 0x250f890}, fd = 19, when = 1,
cb = 0x7f338ee87c40 <ipaccess_fd_cb>, data = 0x27af2c0, priv_nr = 2}}, ipaccess = {
fd = {list = {next = 0x7f338f2a7950, prev = 0x250f890}, fd = 19, when = 1,
cb = 0x7f338ee87c40 <ipaccess_fd_cb>, data = 0x27af2c0, priv_nr = 2}}, dahdi = {fd = {
list = {next = 0x7f338f2a7950, prev = 0x250f890}, fd = 19, when = 1,
cb = 0x7f338ee87c40 <ipaccess_fd_cb>, data = 0x27af2c0, priv_nr = 2}}, rs232 = {fd = {
list = {next = 0x7f338f2a7950, prev = 0x250f890}, fd = 19, when = 1,
cb = 0x7f338ee87c40 <ipaccess_fd_cb>, data = 0x27af2c0, priv_nr = 2}}}}
|
|
Do not pull in libosmocore but let the abis/trau library pull in
the DSO that is actually linked to.
|
|
|
|
|
|
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.
|
|
|