| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This was always intended to be GPL and not AGPL. "kat" did the
development as part of an internship paid by me and we agreed
to shared copyright.
Change-Id: Ied2041ba20c5737bd967dfaa3017edf72a95b31c
|
|
|
|
|
|
|
|
|
|
|
| |
The external sercomm_drv_[un]lock() functions are defined as stubs in
case of non-embedded build only which causes linking issue with
sercomm_test. Let's define the same stubs in sercomm_test
unconditionally - the implementation details of the locking are
irrelevant for the test anyway.
Related: OS#2708
Change-Id: I3dab4f3348871b66b5d6c9fd10b2e448c61f9e73
|
|
|
|
|
|
| |
When creating asciidocs for osmo_counter an empty is not useful.
If there aren't any counter, output a hidden comment
Change-Id: Ie2768100e69dcd7d8d77533688585dd9b43c4a5e
|
|
|
|
| |
Change-Id: I9068231d71876e06d27ee67a688d7fb611ac3a1b
|
|
|
|
|
|
|
|
|
|
|
| |
In case of embedded build some tests are failing to link properly. Fix
it:
* do not run fsm_test unless CTRL is enabled
* do not run fr_test unless GB is enabled
* do not link loggingrb_test with libosmovty
Change-Id: Icedad5ba3ed311ccdb97fa3ccd3002f5fda8be68
|
|
|
|
|
|
|
| |
Do not attempt to load auth plugins - this does not make sense on
embedded target anyway.
Change-Id: Ie92d2eea21e19e499b3f3bb4d5a82e31fbbea3f0
|
|
|
|
|
|
|
|
| |
For the lua console printing I need to print several values with
continuation but also specify the filename. Add a "C" for continue
and forward arguments.
Change-Id: I1d6dcb2567b9ed2c8767f661737b979bc3d1377e
|
|
|
|
| |
Change-Id: I896d6aaae3c36b87243b7dc270267090dcb44afe
|
|
|
|
| |
Change-Id: I65c75e56831420d3daf386ea280c13ae9cb64d1b
|
|
|
|
| |
Change-Id: I1ec23ca3cf0d973c77b8c4e7e23e0e75a4f0a7a3
|
|
|
|
|
|
|
|
|
| |
* remove duplicate code: use function from libosmocore
* use utility function to dump ubits
* reformat for easier reading
* link against libosmocore
Change-Id: I8c31b0954176a2c53305936a025c92a793b6d9b6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously ctrl request for all counters in
group (e. g. 'rate_ctr.abs.msc.0') will result in human-readable
description which is not regular enough and is hard to both parse and
generate. The ctrl interface is intended for m2m, not for human
interaction. Let's simplify things by making response similar to counter
group request ('rate_ctr.*').
Reply now looks as follows:
GET_REPLY 9084354783926137287 rate_ctr.abs.msc.0 loc_update_type:attach 0;loc_update_type:normal 0;
Previously it was:
GET_REPLY 9084354783926137287 rate_ctr.abs.msc.0 All counters in msc.0
loc_update_type:attach 0
loc_update_type:normal 0
Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36
Related: OS#2550
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When calling the timer_cb, that may have effected an fi termination and
deallocation, e.g. from dispatching events and/or complex choices made.
Current timer_cb implementations expect T to reflect the fired timer number, so
we can't actually set T=0 before calling the timer_cb.
Instead, never reset T to zero, let it always reflect the timer that last
fired. When a new timer starts, T will be set to its new value.
Adding a T arg to the timer_cb() would have been the cleanest solution, so that
fi->T can be set to zero before dispatching the timer_cb. But since we've
already rolled out this FSM API, we should stay backwards compatible.
In the case where the timer returned 1 to request termination, we can assume
that the fi still exists, but to be consistent, don't set T = 0 in that code
path either.
Change-Id: I18626b55a1491098b3ed602df1b331f08d25625a
|
|
|
|
|
|
|
| |
Report back expected interval values.
Change-Id: I05ca7f716342af4f7424b28216ed6c1bf2bd589f
Related: OS#2550
|
|
|
|
|
|
|
|
| |
This should never happen with the current code, but if it ever does, we
should log the error instead of silently returning 0.
Change-Id: I544001d3072e5f12a96a67e4178f9b945c5f6b6c
Related: OS#2550
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before user have to know group name and index in advance to request rate
counter value. Introduce introspection function which allows user to
obtain all the groups and their indexes by requesting 'rate_ctr.*'
variable.
This simplifies KPI dumping over ctrl interface.
Change-Id: Ifad8b4f0360c8bcd123a838676516476e84c246a
Related: OS#2550
|
|
|
|
| |
Change-Id: I6e1274f17e2d9d2eee16481940642216ca96e3e3
|
|
|
|
|
|
|
|
| |
Some callers pass NULL and len == 0. The semantics are that we then
nul-terminate an emtpy string. Avoid a sanitizer warning by not calling
memcpy() for the NULL case.
Change-Id: I883048cf2807e606c6481634dbd569fc12aed889
|
|
|
|
|
|
|
|
|
| |
This should fix the last current remaining sanitizer build failure in
libosmocore regression tests.
Helps fix sanitizer build on debian 9.
Change-Id: I4d6dd7f4348675bc77d4df5a7a0ce41f12d4a043
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example encode_auth_info() from gsup.c calls
msgb_tlv_put(msg, iei, 0, NULL)
to put a tag and len with content data following later.
However, this would cause a memcpy() from a NULL pointer, in tlv_put(). Allow
passing NULL and len = 0 for cases like the above:
If val is NULL, use memset(0) instead of memcpy().
If len is zero, do not copy nor memset anything.
Hence make tlv_put() behave in a well-defined and valid way for any and all
input args; no negative fallout is possible from this patch.
Add proper API doc comment.
Fixes a sanitizer build failure in gsup_test:
../../../../src/libosmocore/include/osmocom/gsm/tlv.h:99:2: runtime error: null pointer passed as argument 2, which is declared to never be null
Helps fix sanitizer build on debian 9.
Change-Id: I13dce9cd1228817890d3e81edeeb660c893c1d64
|
|
|
|
|
|
| |
Helps fix sanitizer build on debian 9.
Change-Id: I0ef95ee8185a4789f0732b9420243dda5104d181
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All successful and all error code paths of bssgp_fc_in() free the msgb, except
the code path calling fc_enqueue() when the msg is dropped (due to queue being
full, or failure to allocate).
Callers could theoretically catch the -ENOSPC return value and discard the
msgb. However, in other code paths, a callback's return value is returned,
which is expected to free the msgb, so such callback would have to never return
-ENOSPC when it freed the msgb. Much simpler semantics would be to free the
msgb in every code path, no matter which kind of error occurred.
Who is currently calling bssgp_fc_in and how do they handle the return value?
- bssgp_fc_test.c ignores the return value (and hits a mem leak aka sanitizer
build failure if the queue is full).
- fc_timer_cb() ignores the return value.
- bssgp_tx_dl_ud() returns the bssgp_fc_in() rc.
- which is returned by a cascade of functions leading up to being returned,
for example, by gprs_llgmm_reset(), which is usually called with ignored
return code.
At this point it is already fairly clear that bssgp_fc_in() should always free
the msgb, since the callers don't seem to distinguish even between error or
success, let alone between -ENOSPC or other errors.
bssgp_fc_test: assert that no msgbs remain unfreed after the tests.
Adjust expected results.
Helps fix sanitizer build on debian 9.
Change-Id: I00c62a104baeaad6a85883c380259c469aebf0df
|
|
|
|
|
|
|
|
|
|
|
|
| |
Print remaining msgbs when done, then free the entire tall_msgb_context. To be
able to do that, call msgb_talloc_ctx_init() and use its return value.
A subsequent patch will fix a known mem leak and add assertions for 0b in 1
blocks remaining in the tall_msgb_context.
Helps fix sanitizer build on debian 9.
Change-Id: I67d347ab2642b0bfc27b21b44231a7f3146ff641
|
|
|
|
|
|
|
|
|
|
|
| |
The test fills up the queue / sends too large PDUs on purpose. Make that
obvious by outputting returned errors in the expected output.
Cosmetic:
- fc_in()'s return value is ignored, hence don't return anything.
- add comment.
Change-Id: I57d6fce2515a65f6dd037e75af5397079215cb46
|
|
|
|
|
|
|
|
| |
Ever since this test was changed to use osmo_gettimeofday_override, the times
it sees are exact every time and don't need rounding to pass the expected
output.
Change-Id: I4a9a5d31fc02eb55caf7ba9c141426d8115bb740
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using the NULL context creates mem leaks that bother sanitizer builds.
Allocate as talloc "child" of the rate_ctr_group, so that the mangled desc (if
any) gets freed when the rate_ctr group is freed.
Remove the comment concerning osmo-msc: the way to fix the unexpected talloc
state in osmo-msc tests is to have no invalid rate counter names in osmo-msc.
See Ib1db8e3dc6c833174f1b0b1ca051b0861f477408 (osmo-msc).
Change-Id: Ief9abfeb78b7706200bcc6aaa5dcb04fbeaa9b5b
|
|
|
|
|
| |
Related: Iaad35f03e3bdfabf3ba82b16e563c0a5d1f03639 (libosmo-netif)
Change-Id: Ia291832ca445d4071f0ed9a01730d945ff691cf7
|
|
|
|
|
|
|
|
| |
It was decided that osmo-mgw as direct successor of osmo-bsc_mgcp
will use the same VTY port number (similar to osmo-nitb, osmo-bsc
and osmo-bsc-sccplite all using the same VTY port number)
Change-Id: Iec1da9f3b4d170416279f05876d9e1ae2970c577
|
|
|
|
|
|
| |
Helps fix sanitizer build on debian 9.
Change-Id: I0097d63bbb4e7ee20eb4a8474f4fef32d39e625f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove initial msgb talloc context creation: if we create a root ctx for msgb
that all msgb are allocated in, we would in a final cleanup discard all msgbs,
i.e. we would not verify that all msgb are cleaned up properly.
If we create the msgb context and *don't* clean it up in the end, the sanitizer
build fails because the context root is not cleaned up.
Easiest is to actually allocate all msgb at NULL ctx, because then any msgb
that aren't cleaned up properly would still linger, while we don't leave a root
ctx that we need to clean up either.
Helps fix sanitizer build on debian 9.
Change-Id: I1f2d1d05c75bbf4d92787f9735083f18cdc90f6f
|
|
|
|
|
|
| |
Helps fix sanitizer build on debian 9.
Change-Id: I0add9eac7225db23bc02fc2aaee5f42258d34e25
|
|
|
|
|
|
| |
Helps fix sanitizer build on debian 9.
Change-Id: I69750d9cd2b8f30bfc6d2dfd9e62576e46989fab
|
|
|
|
|
|
| |
Helps fix sanitizer build on debian 9.
Change-Id: Iddf0a6cc733cd81d5f6c1eb62fc079ad319db119
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The accelerated convolutional decoder uses SSSE3 instructions such
as PSIGNW (via _mm_sign_epi16) which go beyond what SSE3 offers. So
let's make sure we use the right compiler flag (-mssse3) and also the
right runtime check.
Without this patch, we would use illegal instructions e.g. on Opteron
Gen3 such as Opteron 2427, which are also used as build.opensuse.org
build hosts (build31 through build36) where we wouldn't pass "make
check" as a result.
Change-Id: I2754164384109f2821fd98ffb48f625893f2923d
Fixes: OS#2386
|
|
|
|
|
|
|
|
| |
The testsuite fails on some specific build machines in the OBS
build cluster. Let's try to figure out which CPU flags they have
to narrow down the cause of this.
Change-Id: Ib23e5bfb3c894206fad62d6cc6151583b1bb75a6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes the warning below:
warning: ‘sqn’ may be used uninitialized in this function [-Wmaybe-uninitialized]
fprintf(stderr, "Requesting --sqn %"PRIu64" implies IND=%u,"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
" so no further --ind argument is allowed.\n",
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sqn, test_aud.u.umts.ind);
~~~~~~~~~~~~~~~~~~~~~~~~~
The warning is a false positive as sqn is only used in case
sqn_is_set!=0, and in that code path, sqn is set.
Change-Id: Ib5903db01ea6765bd6bb688e63f70925c5012f98
|
|
|
|
|
|
|
|
|
|
|
| |
"man getrandom" states sys/random.h is required.
Fixes warning below:
warning: implicit declaration of function ‘getrandom’; did you mean ‘srandom’? [-Wimplicit-function-declaration]
rc = getrandom(out, len, GRND_NONBLOCK);
^~~~~~~~~
Change-Id: I2e73fd018e887893dc5527d6d73644d627eb963a
|
|
|
|
|
|
|
|
| |
Let's fix some erroneous/accidential references to wrong license,
update copyright information where applicable and introduce a
SPDX-License-Identifier to all files.
Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit in e9e9e427b78271941a25a63567fc2ec2bb9e4433 attempted to fix a
compilation warning but introduced a regression documented in OS#2613.
The commit was reverted in 4aa0258269296f078e685e21fb08b115567e814.
After closer lookup and testing, it seems vector_slot(vline, index) is
expected to be NULL in this case as set by vty_complete_command:
/* In case of 'help \t'. */
if (isspace((int)vty->buf[vty->length - 1]))
vector_set(vline, NULL);
As a result, the correct fix for the compilation warning is to test
against NULL instead of testing for empty string.
Change-Id: Id9e02bbf89e0a94e1766b1efd236538712415c8a
|
|
|
|
| |
Change-Id: Ied224fe94b5152fd19e259396fbc0eaf69be4b96
|
|
|
|
|
|
|
|
|
|
|
| |
Following I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b a deprecation of
vty_install_default() and install_default() commands is indicated.
However, compiler warnings may clutter build output or even fail strict builds,
hence I am submitting the deprecation in a separate patch.
Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b
Change-Id: Icf5d83f641e838cebcccc635a043e94ba352abff
|
|
|
|
|
|
|
|
|
|
| |
In Change-Id Ic77866ce65acf524b768882c751a4f9c0635740b we introduced a
gnutls fall-back for random number generation, and made this a default
unless explicitly disabled at compile time. This means the debian
package needs related build dependency.
Change-Id: I918e4b7bf1cb621679dce6339b3c4b69d653e2a6
Related: OS#1694
|
|
|
|
|
|
|
|
|
|
|
|
| |
The EFR coding contains some repeated bits. In case there are
transmission errors, some bits may of course get corrupted. It looks
like there's an improvement can be made by taking a majority vote on
those "repetition bits", i.e. if 2 out of 3 bits are the same, then use
that instead of expecting to match all 3 bits.
See 3GPP TS 45.003 Section 3.1.1.3 for reference.
Change-Id: I2a28a4d7fb82aed4d39fe8efeea702effdba3858
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's an error in tch_efr_unreorder() function in gsm0503_coding.c
that results in increased RBER. One of the indices used by repetition
bit recombining in this function doesn't match 3GPP TS 45.003 section
3.1.1.3, specifically "w(k) = s(223) for k = 231 and 232".
This bug resulted in RBER even under ideal conditions, with no
fading or AWGN present.
Change-Id: I153da7bbc1bb3e01ed31eb5a7417e90841cfcde3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On systems with GNU/Linux kernel older than 3.17 (Debian 8 "jessie" for
example) the osmo_get_rand_id() would always return failure due to
missing getrandom() syscall.
To support such systems, let's add fallback code which uses GnuTLS
library. It can be disabled explicitly via '--disable-gnutls' option at
compile-time, otherwise ./configure will fail if both getrandom() and
GnuTLS are not available. When building with '--enable-embedded' the
fallback is disabled automatically.
Related: OS#1694
Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b
|
|
|
|
| |
Change-Id: I88c0d0327fb022b0626ab0feff3f34468b122d4b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch seemed sensible, but introduces a segfault when hitting tab
on the interactive VTY. Reproduction example:
osmo-msc
telnet 127.0.0.1 4254
OsmoMSC> enable <TAB>
So we need to understand what that line of code actually intends to do.
Until then, revert this to avoid the segfault.
The segfault happens at:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7bc0894 in cmd_complete_command_real (vline=0x5555558d59e0, vty=0x5555558d57b0, status=0x7fffffffe024) at ../../../../src/libosmocore/src/vty/command.c:1953
1953 if (*(char *)vector_slot(vline, index) == '\0')
This reverts commit e9e9e427b78271941a25a63567fc2ec2bb9e4433.
Change-Id: I3fe213bdfb96de9469aae64e67000dafee59302e
|
|
|
|
| |
Change-Id: I54f4e439cc232d926b42ddba9648d4f5e7487c3e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to
https://www.gnu.org/software/automake/manual/automake.html#Libtool-Flags
the libraries supposed to be added to *_LDADD or *_LIBADD
while *_LDFLAGS should contain additional libtool linking
flags. Previously we used both. Let's unify this and move all the
libraries into proper automake variable. While at it - also add
libosmocore.la for tests to LDADD since all the tests link against it
anyway.
Change-Id: Ia657a66db75df831421af5df1175a992da5ba80f
|
|
|
|
|
|
|
|
| |
This is for Change-Id Icf337a430fb367bbca48a1b02822a2cb3b644e5f
to catch repeated calls to osmo_init_logging() whcih is what osmo-pcu
will perform after some upcoming fixes there.
Change-Id: Ie14a7eadf8ba01e8d31a83e330491036358ac650
|