aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2021-02-24attempt to fix RPM spec file after recent soversion bumplaforge/specHarald Welte1-1/+1
In Ic66eb67254d35f02ec8cdea4d79fa4b1899e8230 the soversion was chhanged (e.g. libosmoabis.so.9 to libosmoabis.so.10) but the spec.in file was not adjusted accordingly. Change-Id: I0ca9eb5a60557a1bc8e3611fdd2668469ac19031
2021-02-23Bump version: 1.0.0.34-2163-dirty → 1.1.01.1.0Pau Espin Pedrol6-22/+69
Change-Id: Ic66eb67254d35f02ec8cdea4d79fa4b1899e8230
2021-02-23gitignore: Ignore autofoo files *~Pau Espin Pedrol1-0/+1
Change-Id: I64e433f2425dbe2b22103f986354939c0ac9d9f9
2021-02-19tests: trau_sync: Explicitly drop category from logPau Espin Pedrol2-14/+16
Let's disable hex category here since we don't care about its formatting here. In any case, every test relying on logging output validation should always explicitly state the config to avoid issues in the future if default values change. Related: OS#5034 Change-Id: I332d1215fc7784a6647b90e2eb8b1efcd644002e
2021-02-08migrate to osmo_fd_{read,write}_{enable,disable}()Harald Welte8-21/+21
Change-Id: I005826dfe3a8ad0fd6e08df2c87b38ce916bda2d Depends: libosmocore.git Change-Id Idb89ba7bc7c129a6304a76900d17f47daf54d17d
2021-02-06osmo_ortp: Don't print ERROR message for every missing RTP frameHarald Welte1-2/+4
* it's inconsistent to print ERROR in a LOGL_INFO message * loosing RTP packets is not that unusual, especially when the channel is just starting up Change-Id: Ide0017987b4cea7fd24795941494f1da913ea673 Closes: OS#4464
2021-02-03e1_input: Support I.460 timeslot typeHarald Welte5-5/+41
Unlike the legacy TRAU mode, this only adds I460 mux/demux, without any TRAU frame synchronization. The user must still be adding the actual sub-channels using osmo_i460_subchan_add() depending on his requirements. Change-Id: I44da6dfec77ef475adb35001a0e4fa11d549aa02
2021-01-27configure.ac: set -std=gnu11Oliver Smith1-0/+2
Change-Id: Ib920af17b9a0b5d6ea5f4db33faab3a2dcf8fbbe
2020-12-21Use osmo_fd_setup() wherever applicableHarald Welte8-42/+12
Change-Id: I5b369343cf708ddfcde347f218a10d5f72303aaa
2020-11-29ipaccess: fix verbosive logging in __handle_ts1_write()Vadim Yanitskiy1-1/+1
Apparently, the logging level was changed unintentionally. Change-Id: Ibdee8cbcc12edf14fd824b515d0aecb89fcac490 Fixes: Idce3bb3daf8ab16b84968a61502c826df8b773ed
2020-11-24ipaccess: Fix wrong assertion in ipaccess_drop() when used by BTS codePau Espin Pedrol1-7/+17
The code wrongly assumed that ipaccess_drop was only called by BSC code, which is wrong. ipaccess_drop is called by BTS run code path in __handle_ts1_write(), if send() syscall fails (for instance because BSC becomes unreachable). In that case, we need to account for the BTS role case which doesn't store the line pointer into the ofd->data. In BTS case, it's a pointer to the struct ipa_client_conn, which we leave up to sign_link_down() cb to do whatever they please with. Fixes: OS#4864 Change-Id: If763e5f7736921a4360ad9027ba075ef8e118934
2020-11-23ipaccess: Fix log error printed on wrong conditional branchPau Espin Pedrol1-2/+4
The signal link is set if fd is established (see osmo_fd_setup in ipaccess.c). This log message was introduced in 466c5467e2e95c04260cb6b933181a38d1d97bd5, where the lifecycle worked a bit different than nowadays: line->ops->sign_link_down() was called before the log line, so the code expected by that time that the socket should have been freed by sign_link_down(). That's no longer the case. In ipaccess_drop, we force dropping so we release lower layers and then signal upper layers. Hence, the log lines are misleading nowadays. Change-Id: Ibc6554e6cacc9c71232238b4e6a17d749dfdd30a
2020-11-23ipaccess: Use LOGPITS macro in __handle_ts1_writePau Espin Pedrol1-2/+3
Change-Id: Idce3bb3daf8ab16b84968a61502c826df8b773ed
2020-10-29cosmetic: fix spelling in logging messages: existAnt -> existEntVadim Yanitskiy2-2/+2
Change-Id: Ifb22b5544cf06012fa529828dfdf3f0d73b07e7d
2020-10-18Use OSMO_FD_* instead of deprecated BSC_FD_*Harald Welte9-73/+73
Change-Id: Ib676eda521f0e89a1f4d8f9eac810598a3c813b9
2020-10-12contrib/jenkins: Enable parallel make in make distcheckPau Espin Pedrol1-2/+2
Related: OS#4421 Change-Id: I54b084de6080ab8c438c2c85663abe01c54b07fe
2020-10-08vty: add attributes to VTY commands indicating when they applyPhilipp Maier1-47/+59
Change-Id: Ie0182351bd8a10085563c403dfab04c4d1b4305c Depends: libosmocore I0efc57f2cb54798ba207ae6fef9af4771d96bfa9 Related: SYS#4937, OS#1601
2020-10-04vty: use install_lib_element() and install_lib_element_ve()Vadim Yanitskiy2-26/+26
See https://lists.osmocom.org/pipermail/openbsc/2020-October/013278.html. Change-Id: I22a8075852ba97edf819b368e3af4eddbf1dbae0 Depends: I8baf31ace93c536421893c2aa4e3d9d298dcbcc6 Related: SYS#4937
2020-09-09tests: Disable stderr log color in trau_sync_testPau Espin Pedrol2-14/+14
Change-Id: Ibe8e2d580848a41dd25e0ae2d95f83233be6ed9a
2020-08-29Revert "debian: Build libosmo-abis with osmo-e1d support"Harald Welte2-7/+0
This reverts commit f62da4798c271ff56a8f2a2aebefdf5281231dde. It introduced lots of fall-uot in osmo-remsim, smo-hlr, simtrace2 OBS builds: [ 432s] libtool: link: ranlib .libs/libifd_remsim_client.a [ 432s] /bin/sed: can't read /usr/lib/i386-linux-gnu/libosmo-e1d.la: No such file or directory [ 432s] libtool: error: '/usr/lib/i386-linux-gnu/libosmo-e1d.la' is not a valid libtool archive [ 327s] libtool: link: ranlib .libs/libosmo-gsup-client.a [ 327s] /bin/sed: can't read /usr/lib/i386-linux-gnu/libosmo-e1d.la: No such file or directory [ 327s] libtool: error: '/usr/lib/i386-linux-gnu/libosmo-e1d.la' is not a valid libtool archive [ 327s] Makefile:456: recipe for target 'libosmo-gsup-client.la' failed Change-Id: I63596664ae709e0059312c65b79d4bd8e53d56e2
2020-08-24debian: Build libosmo-abis with osmo-e1d supportHarald Welte2-0/+7
We've supported building with osmo-e1d support for quite some time, but our Debian packages have not been upgraded to include that support. Let's change that. Related: OS#2547 Change-Id: I2f365c3fbd44457033e922257cf040408d0c7058
2020-08-14Fix RPM spec file (.so.6 -> .so.9)Harald Welte1-1/+1
Change-Id: I987757d8b8fa3908b5b9d690ce7a5a67e2254546
2020-08-13debian/control: change maintainer to the Osmocom team / mailing listVadim Yanitskiy1-1/+1
Change-Id: I8bd677d2028677efbd6913adefa92066af67d5c6
2020-08-13Merge branch '1.0.0' into masterHarald Welte7-26/+94
We tagged 1.0.0 off a non-master version in the commit history in order to keep the new TRAU frame handling out of the 1.0.0 release, but to have all of the other fixes in a tagged release. This merge brings master in sync with those changes. Change-Id: If8fc996f385f4127204ad773b991c49d853dfc5b
2020-08-13Bump version: 0.8.0.59-1f92-dirty → 1.0.01.0.0Harald Welte7-25/+93
Change-Id: Iffbb96739f53c7e005f440bc1615f158f7c661eb
2020-08-07trau_sync: make sync pattern configurablePhilipp Maier2-1/+9
When a trau sync fsm is allocated, the user must set the sync pattern, which can not be changed during the whole fsm lifecycle. However on codec changes it might be necessary to change the sync pattern on the fly. - Add function to change the sync pattern Change-Id: I1caff93b4c8eace8ba8cd6e32e996a9e1503232b Related: OS#2659
2020-08-06trau_frame: Add missing break statement in osmo_trau_frame_encode()Harald Welte1-0/+1
Change-Id: I986781218a844e043b6206124696452b3afec7fd Closes: CID#211592
2020-08-06trau_sync: Check return value of osmo_fsm_register()Harald Welte1-1/+1
Change-Id: Ieaf524423033864a8b79ea1b04b62568d10ffbd3 Closes: CID#211593
2020-08-06trau_frame: Fix computation of odd parity while encoding HR framesHarald Welte1-1/+1
division modulo 1 is always 0, and hence we always returned '1' as parity bit. Instead, we need to check if the LSB is set in order to know if the number of bits is odd or even. Change-Id: I37af702ba020a90a820bae84cb603e187ebbacb5 Closes: CID#211594
2020-08-04Add missing build dependency to libosmocodec-devHarald Welte3-2/+4
Since I0190872dd282bcfe0f97bb4f8ab8d09023f9f06b we are using a header file provided by libosmocodec, which means we need to add it to our dependencies (and include path). Linking against the library is not required, as we don't use any symbols at this point. Change-Id: Ie4524165d8873f6c801e07d9f03c94f43c66110d
2020-08-03Add 'trau2rtp' demo program illustrating the use of new TRAU codeHarald Welte8-0/+442
This is just for development and hence in 'contrib', and not built by default. For details, see the included README Change-Id: I0190872dd282bcfe0f97bb4f8ab8d09023f9f06b
2020-08-03TRAU frame RTP conversionHarald Welte4-2/+694
This adds code that converts codec frames between (decoded) TRAU format and RTP payload format. The FR + EFR functions have been lifted from OsmoNITB and exended slightly. The HR functions have been written from scratch. There is also incomplete code for AMR that needs to be completed + tested. Change-Id: I7f6993cce2b95318203043e2e14952e581941b79
2020-08-03trau_sync: prevent false positive synchronization on startupPhilipp Maier1-0/+6
The history buffer is filled with zeros on startup. Together with incoming bits those may appear as a valid signal. (each trau frame begins with 16 zeros). In order to prevent this lets set the history buffer to all ones, so that it looks like the data in the history buffer is from an unused timeslot. Change-Id: Ie5cc7b9a1ab3d8940ef9d2147f5999e8d09ee40e Related: OS#2547
2020-08-03Add new TRAU frame sync codeHarald Welte10-4/+712
This code is able to detect and sync against a variety of TRAU frame sync patterns. Focus is so far on those patterns present on 16k sub-slots, but 8k sub-slots are expected to be supported soon, too. A new codebase for this is required as the old OsmoNITB code had conflated a 16k sub-slot multiplexer with TRAU frame synchronization, so there was no way to separate those two parts and hence no way to support 8k sub-slots. Change-Id: Ia6fe6228b0b8b9a27999f37ce1115ed5558881ea
2020-08-03osmo_trau_frame_encode(): Check for sufficiently sized output bufferHarald Welte1-0/+37
Change-Id: Ie14399b2271aba9ff81f62d593a0ddd9d3e83d98
2020-08-03trau_frame: Introduce support for Downlink Time AlignmentHarald Welte2-40/+134
In the uplink direction, we provide osmo_trau_frame_dl_ta_us() to determine the time alignment as requested by the CCU in the BTS. In the downlink direction, the TRAU frame encoder will perform time alignment as requested by the user in osmo_trau_frame.dl_ta_usec. Change-Id: I3981becafc56c9a50119b9ba6bf67aa0391cc76e
2020-08-03trau_frame: New APIHarald Welte4-2/+1514
The old TRAU frame code in src/trau_frame.c (which is for some strange reason part of libosmo-abis, and not libosmo-trau!) was introduced more than a decade ago for the needs of bs11_abis AKA OpenBSC aka OsmoNITB. It is too constrained to implement TRAU frame parsing in a generic way, including: * no way to add support for 8k sub-slots * no way to handle CRC bits or UFI (i.e. no AMR) * no real API design, it was just ripped out from OsmoNITB and moved into a library (even the wrong one) For those reasons, let's introduce a new API for TRAU frame encoding/decoding - one that supports all the relevant use cases. Change-Id: I5cf42e6c445d9224be18503cebc7584b3beba08c
2020-08-02e1_input_vty: Fix VTY help stringsHarald Welte1-1/+1
* HSL was never fully supported, not sure why it's in the help * E1D was neglected to add to the help string Change-Id: I4a5e503676618171e59550774892816b61adecae
2020-08-02input/e1d: Add missing "RAW" timeslot supportHarald Welte1-0/+72
Change-Id: Ia4ef5fd40ce15f824a3cbfec533dde2169464c3b
2020-08-02input/e1d: Fix support for TRAU slotsHarald Welte1-0/+75
Change-Id: I2d7f85523089f4e1f2496d9836bced577eda4671
2020-08-02dahdi: Use osmo_revbytebits_buf() instead of local flip tableHarald Welte1-41/+8
We've had osmo_revbytebits_buf() in libosmocore for ages. As it recently turned out, the flip_bits[] lookup table approach implemented here is faster at least on x86 systems of the last decade or so. As of Change-Id I25029fe7e54c92979fb0119992fb8dc167e1536e in libosmocore, it has been migrated to the lookup table approach. This means there's no performance penalty of migrating to using it, and hence no reason whatsoever to have a private implementation here. Change-Id: I285a87a9fc6abae7d8b47923a46cd082f46829f8
2020-08-02contrib/jenkins.sh: Test builds with --enable-e1dHarald Welte1-1/+4
We so far didn't include the osmo-e1d e1_input driver during compile testing, let's change that. Change-Id: I8bb876f9f3aebbad80a328b5ebff6e156c3db8da
2020-08-02e1d: Fix compilation after I4a088f91f23aaad05c5ab84a4783c1915d85aca6Harald Welte3-4/+8
This slipped through the cracks as jenkins so far doesn't build with --enable-e1d support (fixed in a separate patch). Change-Id: I505331a4a9430001b049e9f5cc36abf4ce4ca19e
2020-07-31ipaccess: Fix use-after-free in ipaccess_drop()Pau Espin Pedrol1-0/+2
Recent commit b8ea0ff521a3e01c22a9dd1948b9a853521f575e introduced a heap-use-after-free while getting rid of memleaks and clearing up the reference counting lifecycle of the line object. In that commit, e1inp_line_put2() was added in ipaccess_drop() which may potentially free the line object (and its children e1inp_ts objects) under specific conditions/scenarions. However, the function still used the child object e1i_ts which in those scenarios would access already freed memory. Let's keep a local reference during the life of the function to make sure the object is non-freed during e1inp_line_put2(), so that we can notify upper layers that the link is down. Detected by enabling ASan and running BSC_Tests.TC_chopped_ipa_ping TTCN3 test. Related: OS#4688 Change-Id: I4f56af28ad8297846bcdc8ba7afe51fff0f9a00f
2020-07-22e1d: Add new osmo_e1dp_client_ts_open() argumentHarald Welte1-3/+3
An additional argument was added to specify the timeslot read buffer size. Change-Id: I4a088f91f23aaad05c5ab84a4783c1915d85aca6 Depends: osmo-e1d I6d603778cce14c5d72fe5f54904905ea7e66d7ff
2020-07-15tests: Use API e1inp_line_put2 instead of deprecated e1inp_line_putPau Espin Pedrol2-2/+2
Change-Id: If3fb68fda1c109f6aa15aa68c5bce285054efda7
2020-07-15lapd: Use lapd_dl_init2 instead of deprecated lapd_dl_initPau Espin Pedrol2-2/+2
Change-Id: If25957d10bf9e32d2fe601111a9c1311aee21094
2020-07-15cosmetic: lapd: Fix trailing whitespacePau Espin Pedrol1-1/+1
Change-Id: I7a6af2f417f6f924a3f27cfa12462158f2c2a1c6
2020-07-15ipaccess_recvmsg: Untangle code updating linePau Espin Pedrol1-8/+13
This patch untangles the code a bit by changing the order where actions are taken and variables are assigned. The only real changes in behavour are the introduced assert, and that bfd->data is set to NULL before releasing the related line. Related: OS#4624 Change-Id: I947f64f8fa20f87fdc84538402623a6bcf35fdf9
2020-07-15ipaccess_recvmsg: Assert the new bfd from new line differs from the old onePau Espin Pedrol1-0/+1
Related: OS#4624 Change-Id: I45818e04af0da7b1109d909642a1ea378a85a636