There are some configuration nodes, which are handled by extenral
libraries, such as libosmoctrl. So, when switching back to the
parent node, this should be kept in mind.
Instead of aborting, let's got to the CONFIG_NODE by default.
Fixes: OS#3250
Change-Id: Ia0600a46d19825806e5aed9257b6c57c3907808b
At this stage, osmo-trx still uses the cmdline parameters top run the
device, but it is already able to parse all the same parameters from a
cfg file through the VTY and filling a trx_ctx structure which will be
later used to drive the device. Device config can be printed in the VTY
with "show trx".
Change-Id: Ie084c1b30b63f91c6e7640832ec1797d9e813832
We still need an intermediate class Logger due to osmo-trx being
multi-threaded and requiring to have a lock to use libosmocore, which is
not thread safe.
Change-Id: I30baac89f53e927f8699d0586b43cccf88ecd493
Up to this point, the logging system, vty and ctrl are initialized and
can be used fine, though they don't have a lot of use yet.
Depends on libosmocore Change-Id Ib79cdb62d45d8c78445c7b064e58eb7e9faeccf9
Related: OS#2184
Change-Id: I08982c37b4f873966304b3cfb38a10ee86eb3dad
This feature is currently not being used, so let's simplify current code
to move to libosmocore logging system in the future.
Change-Id: If2c77c776823f595130edac963be953026049423
This feature is currently not being used, so let's drop it to make it
easier to integrate into libosmocore logging system in the future.
Change-Id: I8282745ef0282d41599eaf94fe460a1d29b18e2a
It's only used internally inside the Logger module, and in case there's
an "alarm" (level more than critical) we still print on cerr, so we can
just rely on our system catching stderr instead of stdout to handle it.
Change-Id: I6d6df1578c3a4c1a37bd0d69952d443f62eed2ab
Without this line, destination address for a UDD socket is left with
incorrect value AF_UNSPEC. Later on when calling DatagramSocket:write(),
sendto() fails with EINVAL.
This commit fixes test SocketsTest.cpp.
Change-Id: I6e1b7e743a781abdcf69aa9842b30be893633433
Test files are moved from CommonLibs/ to tests/CommonLibs/.
Some tests are disabled in autotest because they generate timedate
related output which cannot exactly match against expected output.
Change-Id: I3d6ba625968be09297642d18090c496490e9b8fc
This is a required step towards getting rid of ConfigurationTable class
and libsqlite dependency.
As a side effect, support for different log levels for different files
is dropped, but it's not something really being used and we will end up
dropping current logging system in favour of osmocom's one in the future
anyway.
Change-Id: I51cb12d1ab7e103e78190ac71a70fb5bb1d9ff51
Vector class already has a semantically odd non-const copy
constructor that serves the same function as a C++11 move
constructor. Make the move constructor semantics explicit
and address Coverity at the same time.
Change-Id: I22e0099abe601b0c59beee808f7560837c6977dd
Fixes: Coverity CID 170738
Implemeted with a Galois LFSR for speed and flexibility compared to Fibonacci version.
Aliases for three popular PRBS' are added for convenience - PRBS9, PRBS15 and PRBS64.
Note that we can't test PRBS64 completely, because the sequence is too long to
be generated.
Change-Id: Ib5331ba5d0b5819929541686fdd87905e2177b74
This makes code simpler and will allow us send -127..127 soft bits towards
osmo-bts instead of 0..255 bits.
Change-Id: I16ecc3d4c829dcf0f619ad995bc9d4a4ed8af0a4
Now we have more fexibility in how we represent SoftVector, since we
no longer depend on the particular convolutional codec implementation.
Change-Id: I3006b6a26c5eff59dbe9c034f689961802f1d0d0
We use other symbols to show that these bits has less confidence:
o and . for 0 with less confidence
| and ' for 1 with less confidence
Change-Id: I747a17568ee48f1f3163e8dfab2e450af85e6435
* Explicitly check for sqlite3 at configure stage, remove old include
dir, fix header inclusion.
* Use configure results for linking instead of hardcoded linker option
for sqlite.
* Add dependency on -dev package for .deb
Change-Id: I6d7f697d67651f02ceb77fc4da4317b64fa47f9e
Fixes: OS#1928
Current UDP receive reads up to MAX_UDP_LENGTH bytes into the
passed in buffer, which may lead to buffer overflow if the
write buffer is of insufficient size.
Add mandatory length argument to UDP socket receive calls.
Reported-by: Simone Margaritelli <simone@zimperium.com>
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Reported security vulnerability where control and data UDP
packets can be injected into the transceiver externally due
to socket binding to all interfaces using INADDR_ANY.
Existing socket interface does not allow specifying local
address; only the local port and remote address/port are
arguments.
Restrict socket bind to localhost with INADDR_LOOPBACK. If
external interfaces do need to be used, the API should be
modified to allow specifying the local socket address.
Reported-by: Simone Margaritelli <simone@zimperium.com>
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
debugLogEarly was replaced to an empty space and arguments of the function
became operators, grouped together by ():
Configuration.cpp: In member function 'bool ConfigurationTable::defines(const string&)':
Configuration.cpp:272:28: warning: left operand of comma operator has no effect [-Wunused-value]
debugLogEarly(LOG_ALERT, "configuration parameter %s not found", key.c_str());
^
This fix removes debugLogEarly together with its arguments.
When we enable DEBUG logging level, syslog gets Gb's of data and can completely
exhaust the file system free space. Now we can just enable it. This is not to
say that logging to syslog it just not very useful in general.
For clean shutdown in the transceiver we need to cancel and join
running threads for orderly unwinding. Thread cancellation points
already exist, so we just need to be able to call on the threads to
exit out when stopping or shutting down.
Don't error when joining a NULL thread, which would be the case if a
thread was stopped before ever being started to begin with.
Signed-off-by: Tom Tsou <tom@tsou.cc>