aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
AgeCommit message (Collapse)AuthorFilesLines
2016-10-01build: be robust against install-sh files above the root dirNeels Hofmeyr1-0/+3
Explicitly set AC_CONFIG_AUX_DIR. To reproduce the error avoided by this patch: rm install-sh # in case it was already generated. touch ../install-sh # yes, outside this source tree autoreconf -fi This will produce an error like ... configure.ac:16: error: required file '../ltmain.sh' not found configure.ac:5: installing '../missing' src/Makefile.am: installing '../depcomp' autoreconf: automake failed with exit status: 1 See also automake (vim `which automake`) and look for 'sub locate_aux_dir'. Change-Id: I3b6d9ad4e5af44c2bdf3844c7bf8e8517bd61d8e
2016-09-30SGSN: Fixing build configPhilipp2-4/+8
Tests for V.42bis, slhc, llc-xid and sndcp-xid are built and executed on all build configurations, but are only needed when the sgsn (gprs) is built. This patch adds conditions check if the tests mentioned abvove are needed or not. Change-Id: I6921e6198ea7f99fe5276f91cbc522091853bc4e
2016-09-30vty_test_runner.py: fix indents to use spaces, fix vim commentNeels Hofmeyr1-27/+27
Most of this file uses four spaces of indenting. Replace all tabs with spaces. Remove the erratic 'set' from the recently added vim comment at the bottom. Change-Id: I4273b3314defb1e5b31b509c2ac7d7c6cd6834cf
2016-09-30vty_test_runner.py: make unittest print all output by defaultNeels Hofmeyr1-1/+1
Add option to TextTestRunner that shows print output on stdout. It's better to see everything in our jenkins runs and not hide test output. Change-Id: If4be1ad1c81c9ed4ab9b208b4c6d1e4b2cc8fdd5
2016-09-30log CTRL bind only onceNeels Hofmeyr4-8/+0
After libosmocore 38d232ee5d2ceb045d9ad6d3a23afcb4972523f7 which outputs 'CTRL at <ip> <port>' from ctrl_interface_setup_dynip(), there's no need to log the CTRL bind here anymore. Change-Id: I1a874efe365a1ecf8ec37b058215b95b9a635ec2
2016-09-29fix: send SNDCP XID only on GERAN Gb contextsNeels Hofmeyr1-5/+7
Add a condition for GERAN Gb. SNDCP and IuPS were developed on separate branches, and the merge results in code trying to use an llme on a UTRAN Iu context where the llme is NULL, leading to stack corruption upon PDP ctx act. Change-Id: Ibb20d738c1b64d36630ce8eceb54c33ba4f1b003
2016-09-28vty_test_runner.py: fix nat_msc_test(): socket attach: reduce timeout, retryNeels Hofmeyr1-5/+22
In nat_msc_test(), upon socket timeout, retry up to six times. Reduce the timeout between retries. This should get rid of sporadic test failures that we've been seeing a lot on jenkins lately. Raise an exception upon unexpected vty response. Print more detail to stdout. Since we would actually want as much output as we can get in a test suite, remove the 'if (verbose)' and just always print the connection source. unittest is keeping all stdout silent by default anyway. Change-Id: I2f83eef55592778e54164a90e1eabeb80fb918da
2016-09-28COSMETIC: 'if' is not a function, so there is space before '('Harald Welte5-7/+7
Change-Id: Ic22623dffce998d70a3c67aa6e445de98f558ed7
2016-09-28cosmetic: bs11: also use ts_is_tch()Neels Hofmeyr1-7/+1
Use the recently added ts_is_tch() function instead of an explicit switch to determine TCH pchan types. This is a cosmetic change since the bs11 does not support dynamic channels (which was the main motivator behind ts_is_tch()). Change-Id: Idf8ce51c76a83210fe3d70e18c51bbaffebb8ad5
2016-09-28dyn TS: fix: e1_config.c: switch(pchan) for dyn TSNeels Hofmeyr3-6/+18
Add ts_is_tch() in gsm_data_shared.h/.c and use it to replace a switch on the pchan in e1_config.c. This patch is not due to an actual observed failure. A general grep for switch on pchan turned up this instance that doesn't handle dyn TS properly. Hence this patch is not actually tested with real equipment. Change-Id: Ide4f156034bab77140d2d9a8c462d68ae6f0d6a6
2016-09-28dyn TS: fix: abis_om2000: also handle dyn TS as TCHNeels Hofmeyr1-2/+16
Add ts2comb() to switch on dyn TS so that dyn TS in TCH mode are also treated like normal TCH/H or TCH/F pchans. Use ts2comb() instead of pchan2comb(). Change-Id: Iddc51a4409488d91db59228ca66aaab73ce3f1df
2016-09-28dyn TS: fix: ts_subslots() for TCH/F_PDCH in PDCH modeNeels Hofmeyr2-7/+21
In gsm_data_shared.c, add ts_pchan() to determine actual pchan type for dynamic and non-dynamic TS. Use in ts_subslots() to fix the value returned for TCH/F_PDCH in PDCH mode. Adjust the assertion in channel_test.c accordingly. Drop GSM_PCHAN_TCH_F_PDCH, which is now handled in ts_pchan(). Explicitly add GSM_PCHAN_PDCH as zero in subslots_per_pchan[] (cosmetic). Adjust the comment in subslots_per_pchan[]. The fix for the number of subslots affects only one caller: bts_chan_load() in chan_alloc.c. Before this, it would always include a TCH/F_PDCH in the load_counter->total, now it is skipped when in PDCH mode. Whether this is the way bts_chan_load() should handle dynamic TS is a separate discussion, so far I'm only making sure that the two dyn TS kinds act in the same way: TCH/F_TCH/H_PDCH is only counted when in TCH mode, and TCH/F_PDCH should match. Change-Id: Icd6668667ad2be7ad20866ffd185bf3b8711ccd6
2016-09-28Revert "bts: extend bts_chan_load to allow counting tch only"Neels Hofmeyr5-30/+7
This reverts commit 308cb0719dca3ba8eed1eff2a2124d44f34d9a28. Problems in this commit: openbsc/src/libbsc/chan_alloc.c:523: case GSM_PCHAN_TCH_F_PDCH: This is actually wrong, GSM_PCHAN_TCH_F_PDCH use ts->flags, not ts->dyn below (due to historical reasons and could be unified). 560: if (only_count_tch && !chan_is_tch(ts)) This has exactly one effect: it excludes GSM_PCHAN_TCH_F_PDCH when in PDCH mode, because for all other PDCH (plain PDCH and TCH/F_TCH/H_PDCH in PDCH mode) below ts_subslots() returns 0 and skips the for() loop. I consider this a bug in TCH/F_PDCH, to be fixed in an upcoming commit. I don't see why we need the only_count_tch argument, because this should normally only count TCH, weren't it for the TCH/F_PDCH bug. If dyn TS should be counted differently, we should do this in a different way. Change-Id: I34dbbaf53a800115e3d03bd44028cad675f3b525
2016-09-28channel_test: test nr of subslots for dyn pchan, with errorNeels Hofmeyr2-0/+32
Add test_dyn_ts_subslots() and call from main(). Update channel_test.ok. This includes erratic assert to show a bug for TCH/F_PDCH in PDCH mode: the nr of subslots should be the same as for a normal PDCH, i.e. zero. This will be adjusted along with the fix in an upcoming commit. Change-Id: I09685be3fb3ed1ead4577b772a9fbc31967980d1
2016-09-28channel test: prepare to add another test functionNeels Hofmeyr1-3/+8
Move the main() guts to test_request_chan(), so that I can add another test in an upcoming commit. Change-Id: I1349d0f416806416080d4667ad697f7db1ea252d
2016-09-27cosmetic: comment typo on e1_config.cNeels Hofmeyr1-1/+1
Change-Id: I894adf562670abf26665a1eb09592682ab8b31b5
2016-09-27SLHC: Improving slhc (RFC1144) testcasePhilipp2-56/+130
- Adding Testcases for UNCOMPRESSED_TCP and TYPE_IP - Minor cosmetic changes Change-Id: I555fa3c9b9f78424102f359ef1c27b290fa9c9e9
2016-09-27log VTY telnet bind only onceNeels Hofmeyr6-12/+0
After libosmocore 55dc2edc89c1a85187ef8aafc09f7d922383231f which outputs 'telnet at <ip> <port>' from telnet_init_dynif(), there's no need to log the telnet VTY bind here anymore. Change-Id: I97a730b28759df1d549a5049f47a3da1c16a3447
2016-09-26vty_test_runner.py: raise exception when MSC socket connection failsNeels Hofmeyr1-0/+4
Instead of below error, raise an exception to describe what's happening. Seen in a jenkins run on https://gerrit.osmocom.org/#/c/945/2: ERROR: testBSCreload (__main__.TestVTYNAT) ---------------------------------------------------------------------- Traceback (most recent call last): File "./vty_test_runner.py", line 787, in testBSCreload msc = nat_msc_test(self, ip, port) File "./vty_test_runner.py", line 1251, in nat_msc_test return conn UnboundLocalError: local variable 'conn' referenced before assignment Change-Id: Iae26e7345267a21aed0b108b089453832889c9fa
2016-09-26cosmetic: vty_test_runner.py: add comment for vim auto settingsNeels Hofmeyr1-0/+2
Change-Id: I61a0476a0317b011432bb4f6f593cfdcaf1c072b
2016-09-26mscsplit: directly access gsm_network backpointer from gsm_subscriber_connectionNeels Hofmeyr5-60/+53
The previous commit added a network backpointer to gsm_subscriber_connection. Use it wherever it makes sense, to skip the step through the bts structure. In some places, remove local variables that become unused. Change-Id: I34537025986713291e14c8212a81539b497befd4
2016-09-26mscsplit: add gsm_network backpointer to gsm_subscriber_connectionNeels Hofmeyr2-0/+3
We want to be able to use a network backpointer without having to go through a gsm_bts struct. This commit adds the network pointer, the subsequent commit applies direct access to the network structure from gsm_subscriber_connection. Change-Id: If8870972f1b3e333c2a4cce97cdc95bdee0382a1
2016-09-26mscsplit: abis vty: decouple from global bsc_gsmnet variableNeels Hofmeyr3-4/+6
Publish gsmnet_from_vty() in openbsc/vty.h and use in the abis VTY functions. Change-Id: Ib65a18db06b8bc4fc7d56bf56dd64a52cc1cd253
2016-09-26mscsplit: bsc_vty_init(): decouple from global bsc_gsmnetNeels Hofmeyr5-5/+5
Add an explicit gsm_network pointer instead of using the bsc_gsmnet global. This allows passing a gsm_network struct from the main() scope, which helps to decouple libmsc from libbsc. Change-Id: I9e2c0d9c18d4cebb5efb71565ad84df2bc2e0251
2016-09-26mscsplit: talloc_ctx_init(): decouple from global tall_bsc_ctxNeels Hofmeyr3-20/+19
Decouple the talloc context allocations from global tall_bsc_ctx pointer. It appears that talloc_ctx_init() was intended for general use, since it is located in libcommon. It is currently used only by osmo-nitb; but the upcoming osmo-cscn will use it as well. Instead of defining in osmo-nitb main file, add definition in gsm_data.h. Change-Id: I168106599b788f586be0ff0af4699b9746c1b103
2016-09-26mscsplit: gsm_network_init(): add explicit root talloc ctxNeels Hofmeyr7-9/+14
Decouple the root talloc context from libbsc's global talloc_bsc_ctx. This allows to define the root talloc ctx from a main() scope, which in turn helps decouple libmsc from libbsc. Change-Id: I92f6b47b1eeea2e8f3fba66f25d7e708e5659f8a
2016-09-26mscsplit: move subscriber conns list into struct gsm_networkNeels Hofmeyr5-10/+8
Replace the global sub_connections llist with gsm_network.subscr_conns. Initialize and apply where applicable. Remove bsc_api_sub_connections(), callers now access gsm_network->subscr_conns directly. This allows using the subscr_conns from libmsc without having to link libbsc. Change-Id: Ice2a7ca04910bcfaaff22539abe68a6349e8631c
2016-09-26mscsplit: bsc_init: don't pass telnet dummy connNeels Hofmeyr1-4/+1
We want to create the telnet for VTY only after reading the config file, and the dummy_conn was a workaround to be able to do so, but is not needed: gsmnet_from_vty() used to expect vty->priv to point to a gsm_network struct, but that is not actually the case anymore. It is using a static pointer to store the gsm_network struct instead. Change-Id: I51e7224c5a4cd5baf564bee871cf2fa6e885cda7
2016-09-24SNDCP: add V.42bis data compression functionalityPhilipp10-18/+585
- Add compression control for V.42bis Add code to handle compression (gprs_sndcp_dcomp.c/h) - Add Adjustments in SNDCP - Add VTY commands Change-Id: I6d36cbdf2f5c5f83ca9ba57c70452f02b8582e7e
2016-09-24V.42bis: integration and unit testPhilipp14-15/+1135
- Edit previously committed V.42bis implementation to function outside IAXmodem. - Add unit test to verify the correct function of V.42bis Change-Id: I689413f2541b6def0625ce6bd96f1f488f05f99d
2016-09-24V.42bis: add sourcecode from IAXmodem (SPANDSP)Philipp3-0/+1031
V.42bis is a data compression method found in modems. It has also been specified for GPRS as data compression algorithm. The implementation has been taken from IAXmodem: https://sourceforge.net/p/iaxmodem/code/HEAD/tree/ svn checkout svn://svn.code.sf.net/p/iaxmodem/code/ iaxmodem-code Revision: r36 Change-Id: Iabedece9f97ca944a1e3f747bb073e532c4e9dca
2016-09-24SNDCP: add RFC1144 header compression functionalityPhilipp14-31/+1474
- Add module to handle compression entities - Add module to control header compression - Introduce VTY commands for heade compression configuration - Add changes in sndcp and llc to integrate header compression Change-Id: Ia00260dc09978844c2865957b4d43000b78b5e43
2016-09-24RFC1144: integration and unit-testPhilipp14-89/+544
The previously pushed slhc implementation has been modified to compile and function outside of the kernel. Also debug log messages were added and datatypes ware matched. The implementation is now ready to be used Change-Id: I7a638e88a43b3eb9d006751a03ef2570e36613f0
2016-09-24RFC1144: add slhc code from linux kernelPhilipp2-0/+927
SLHC is an Implementation of RFC1144 TCP/IP header compression. We will need RFC1144 compression to compress GPRS TCP/IP traffic. The implementation pushed with this commit was taken from: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git commit 29b4817d4018df78086157ea3a55c1d9424a7cfc Change-Id: Ied69c143678dc4a64cecc671f5c4dfebe19d8519
2016-09-24SNDCP: add SNDCP-XID encoder/decoder and unit testPhilipp12-1/+2350
The SNDCP-XID (or layer-3 xid) is used to exchange layer-3 parameters such as compression. The encoder encodes a bytestream that is then sent as regular XID field from LLC. We will need the SNDCP-XID to negotiate the parameters for our upcomming GPRS data and header compression features Change-Id: If2d63fe2550864cafef3156b1dc0629037c49c1e
2016-09-23bts: extend bts_chan_load to allow counting tch onlyAlexander Couzens5-7/+30
Change-Id: I86f1d502649747b6b9aefcb39081b14110e8f494
2016-09-22cosmetic fixes in libcommon/talloc_ctx.cNeels Hofmeyr1-1/+20
Add copyright notice, remove obsolete include, remove unneeded line break. Change-Id: I4d06a0323aee5a003b06edd179fc61e1936acae5
2016-09-19cosmetic: transaction.h: 1 comment typo, 1 whitespaceNeels Hofmeyr1-2/+2
Change-Id: Ia2629f9d9887b50b25c6996531b7ef518fb33335
2016-09-18debug log for sms: fix/addNeels Hofmeyr3-2/+14
One logged the wrong function name. Add others. Change-Id: Ied5d8e84d5d192c826bc131be8907eaa55190479
2016-09-18Sanity fixes for gsm0408_dispatch(): rc, assertionsNeels Hofmeyr1-0/+5
gsm0408_dispatch() is the main entry point for receiving data from the BSC/RNC level, so make sure callers pass valid pointers before using them all the way down the code path (related to CID#93769, a fix before this was refactored). For unknown/unimplemented packet discriminators, make sure to return error codes. Change-Id: Ieec39c74a53ef4dfa971dd935c8c9aa60fef58c1
2016-09-18cosmetic: various comment, whitespace tweaksNeels Hofmeyr4-5/+4
Change-Id: I131939cfba4d67d7e2c935341deeb14d09523fee
2016-09-18utils/Makefile.am: remove unused LIBOSMOVTY_CFLAGSNeels Hofmeyr1-1/+0
Change-Id: Id1152b105bb7364a06d9720829d39f587242b707
2016-09-18vty l3 help: fix typo 'comamnds'; fix english s/his//Neels Hofmeyr1-5/+5
Change-Id: I6be52bbb69de8aa0a6d57a3a320661ad85fc2cc4
2016-09-18remove unused bsc_copyright from bsc_vty.cNeels Hofmeyr1-1/+0
Change-Id: I281791c0f57ca75ffe14431a3030811b2d224f0b
2016-09-18properly #include <openbsc/gsm_data.h> from gsm_subscriber.hNeels Hofmeyr1-2/+3
Don't use quoted, local include, use <> style include. Cosmetic: also move stdbool.h include to the top to keep osmocom and openbsc includes grouped. Change-Id: Iaa3dc36768f96f6b8c91010a2ba389fdc37f1503
2016-09-17Modify SI 13 field for control_ack_typeMax6-2/+47
Add vty function to explicitly set use of 4xRACH type of ack message for PACKET CONTROL ACKNOWLEDGMENT. Previous hardcoded value (use RLC/MAC control block) is used as a default. This is handy for debugging issues related to Timing Advance in context of GPRS. Change-Id: Ie869ac0a82055110f1e3b875e246750c4e113336 Related: OS#1526
2016-09-17log causing rx event for lchan_lookup errorsNeels Hofmeyr1-8/+14
Add log_name to lchan_lookup() and pass such from the various RSL rx events that call it to validate the RSL chan_nr. Change-Id: Id81e7b8b9c27831923f050a78dfc7d650e687033
2016-09-17log: abis_rsl: don't log 'error' when there is no errorNeels Hofmeyr1-1/+5
The message 'RF Channel Release due error 0' keeps catching my eye because it says 'error' even though the error code is zero, i.e. no error. This shall end now. Change-Id: Ie0b9d62e8ce85a096c963931e0ae5527b8dc490a
2016-09-17sms: change rp err cause of smpp_try_deliver errorsAlexander Couzens2-4/+15
smpp_try_deliver could fail with rc < 0. In such cases don't send the MS the rp error sms rejected (cause 21). A rejected message should not be sent again. The spec 04 11 recommends sending cause 41 Temporary failure in unknown cases. Add also a log message and rate counter for such cases. Tweaked-By: Neels Hofmeyr <nhofmeyr@sysmocom.de> Change-Id: Ia03e50ce2bd9a7d1054cc5a6000fd73bd3497c03
2016-09-15Build fixesAlexander Huemer5-4/+10
Some fixes for build environments where dependencies are installed in distinct directories. Change-Id: I38808fd2911747b266ee6fde91187a88dd7ae355