aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
AgeCommit message (Collapse)AuthorFilesLines
2017-02-03vty tests: testBSCreload: ipa_handle_small: ensure rx of 4 bytesNeels Hofmeyr1-0/+2
Change-Id: I995b7aba9d0b51b0861a4281dbbca888f36e9e00
2017-02-03vty tests: more attempts to resolve sporadic 'Broken Pipe' errorNeels Hofmeyr1-1/+3
Change-Id: I3d833ddf8c62845fe68d1e5503332541a4a04a2d
2017-02-02vty tests: attempt to get at sporadic 'Broken Pipe' errorNeels Hofmeyr1-1/+15
Add verbose logging as well as three retries around the place that often fails on our build server with a 'Broken Pipe' error. Change-Id: I8851b76b2d7b87dd500ae40f47e6bea716ef3fc4
2017-02-03gsm0408_rcv_cc: guard against NULL subscriberNeels Hofmeyr1-0/+5
Check conn->subscr against NULL. gsm0408_rcv_cc() dereferences many conn members without checking presence: the bts and lchan members may be expected to be NULL in the ongoing MSC split and 3G developments. But the conn->subscr is initially NULL, so an MS sending a CC message before something like a LU or CM Service Request will result in a segfault. Prevent that. Note: the upcoming VLR will be more restrictive on what messages are processed, this is a "backport" to the situation on current master. Change-Id: If067db7cc0dd3210d9eb1da15be6b637795a3ecf
2017-02-02compiler warning: bsc_vty: remove two unused varsNeels Hofmeyr1-1/+0
Added in recent commit 42def7205ba91df4bbb7e3240be0df8c26c2d63e "Implement VTY configuration to control Early Classmark Sending" Change-Id: Iaf640fa6e1f234f594fb8dc06f716d3d3e95eb2a
2017-02-02paging.h: use '<>' include, not '""'Neels Hofmeyr1-2/+3
Also separate openbsc includes from osmocom/core includes. Change-Id: I4da0cb32476202d06902531d07faed8004f689f9
2017-02-02osmo_bsc_grace.h: use '<>' include, not '""'Neels Hofmeyr1-1/+1
Change-Id: I2f22be93d1a5fd6f229b85305a1d2a2cf6a43ce2
2017-02-01OM2000: use assoc_so *only* for TS objectsHarald Welte1-4/+4
all other objects always use the MO instance. The existing code likely is due to copy+paste mistakes. Change-Id: Ie0a31cd93993da10f31eecf530a5a05773c11eb1
2017-02-01sgsn: Fix deeply flawed copying logic for PDP context activationHolger Hans Peter Freyther1-3/+9
It is one of these changes that should have never worked but did for a long time. Only recently a corrupted GTP message was seen. The code in ccd2312d10e14747e8a4d26d8f72b052ffcfc282 tried to solve the right problem but was deeply flawed. * Make the code operate on the copied message and not the original one that is deleted by the underlaying layers on return * Add an out variable to determine if the msgb should be deleted and assume that by default it will be deleted. Change-Id: I564526e7cde2b8a2f0ce900492cd38fc23c176a7
2017-01-31Remove dependency to autoconf-archiveMax3-0/+80
It is generally not a good idea to add more and more external dependencies unless absolutely needed. autoconf-archive is a good example of that, as we need to update all build machines, and older OpenEmbedded versions do not appear to have (the right?) autoconf-archive recipe. Provide local copy of necessary m4 files to fix the build there. The dependency to autoconf-archive was introduced in Change-Id Ied9c950dafa65f324cf31298b13b590f56139700 Change-Id: Iacc1958b471ec3fc65307259039e1d496845f528
2017-01-27gprs: Fix compiler warning about uninitalized cause codePhilipp Maier1-1/+1
in gprs_gmm.c:gsm48_rx_gmm_ra_upd_req the variable reject_cause is not initalized, which is ok, since it gets initalized before the jump into the "rejected" path. However, the compiler still throws a warning. This commit fixes the problem by preinitalizing the reject_cause to GMM_CAUSE_PROTO_ERR_UNSPEC Change-Id: I84cffb631e4cad3d4748512b47e3876208f53727
2017-01-27rsl: Fix dropping of LAPDm UA message.Minh-Quang Nguyen1-0/+2
In some cases, when successive mobile originated calls are made, the LAPDm UA message gets lost because the channel is relased to early. Too overcome the problem we do not send release indications immediately. Instead a flag will be set and the message stored and sent on the next TCH-RTS-IND. This commit adds the required flag and the msg-buffer to struct gsm_lchan. See also coresponding change in osmo-bts.git: Change-Id Ie4f70c75f0137b4bd72d579b3a32575bac2fca38 This patch is is a slightly improved/reformatted version of: https://gitlab.com/nrw_noa/osmo-bts/commit/95d1f15ad108c1c1869c1965144acd64c1395d8c Change-Id: I15fc1ef8e9e83f009bde96de9a8e95702cffbce6
2017-01-26Implement VTY configuration to control Early Classmark SendingHarald Welte3-0/+27
The SI3 rest octests contain a flag that indicates if early classmark sending is allowed in this cell or not. So far we always set this to one, now it is configurable using the 'early-classmark-sending' command at the VTY node. Change-Id: Ia0b1cc5ab45673f3da70c59ae8917eba343f9862
2017-01-26remove unused struct members of 'struct sgsn_pdp_ctx'Harald Welte1-5/+0
There were some members that we neither set nor read, so let's shrink the struct size and remove those unused members. Change-Id: I02136e3aa91e58b2afc923c09c8693095497fdd7
2017-01-26sgsn: Add GTP information to "show pdp-context"Harald Welte1-2/+21
When displaying the PDP context, it is quite useful to also show IP address and TEI information about the GTP side of that PDP context. Change-Id: I56ea530240c15b26729e7a42e539020cb1e233e5
2017-01-26various comment / whitespace tweaks (libmsc, gprs, libcommon-cs)Neels Hofmeyr5-4/+5
cosmetic ws in common_cs_vty.c, osmo_msc.c comment: tiny typo fix in gsm_04_08.c In comments, drop some unbalanced braces, because simplistic C file harvesters will break at a single opening brace even if it is in a comment. This is aimed at the fsm-to-dot.py script in libosmocore/contrib. Change-Id: I3c1fa53195a1e57d6fe0a6791c346d30ceff1251
2017-01-25compression: Fix nullpointer derefPhilipp Maier1-3/+4
When the creation of a new compression entity fails, an error message is created, this error message contains printf with a dereferentiation of the compression entity, that is clearly NULL at that point. This commit corrects that. Change-Id: I87371ade0ccd6a93b446f2013c1747f486739518
2017-01-25CTRL: remove boilerplateMax4-105/+13
Use CTRL_CMD_DEFINE_RO(), CTRL_CMD_DEFINE_WO() and CTRL_CMD_DEFINE_WO_NOVRF() where appropriate to get rid of boilerplate code. Change-Id: I5bcea0b4f4b8f535bef2b423f2013b8b4a218b5b
2017-01-23Add VTY command to immediately expire user (set expire_lu to now)Keith1-0/+24
Change-Id: I676c84350a7afc963bc6bb4c46c60e5ac3eee67e
2017-01-23SI2q: add support for multiple UARFCNsMax4-34/+107
Support multiple UARFCNs with the same Scrambler Code. Fixes: RT#7379 Change-Id: If1c32e8b547a28325180faaaddd21f80c37f7337
2017-01-23Prevent segfault in range encodingMax6-37/+78
* Explicitly check when ARFCN array split is impossible and return gracefully instead of using negative index. * Separate range encoding into generic function and use it for all SI-related things. * Propagate the error into that function and to its callers. * Add separate test-case for the segfault previously triggered by this bug. Change-Id: I3e049ab2d7c1c4d6c791b148f37e10636a8e43e0 Related: RT#7379
2017-01-23bsc_control.py: fix blockingMax1-5/+11
Previously reading from socket would block if no data were sent by the server. Use non-blocking read for set and get operations. Change-Id: I706d54a4a7ceef62683bf9a2fe63fc9ab331c24e
2017-01-23Improve OML failure reportMax1-6/+14
* clearly separate report parts * use textual representation for failure cause if possible Change-Id: I7a98a77011463021d0edd6ecfab1680e211f7e16 Related: OS#1615
2017-01-23cosmetic: use osmo_strlcpy() everywhereNeels Hofmeyr21-118/+98
Shorten some code and make obvious to the reader that the string copy is done in a safe way. Change-Id: I900726cf06d34128db22a3d3d911ee0d1423b1bd
2017-01-23fix strncpy() invocation in vty_interface_layer3.c and 3 testsNeels Hofmeyr4-6/+9
Use osmo_strlcpy() to fix unsafe invocation of strncpy(), which potentially left the result unterminated. Change-Id: I1a119b1760a3e3262538b4b012d476fdce505482
2017-01-23Print subcriber when skipping authMax1-1/+2
Change-Id: I6ae6720afc04cc3c92ceff86e5b2a5a29494aeb1
2017-01-23undup: gtphub_test: use libosmocore's llist_count()Neels Hofmeyr1-17/+5
Depends on libosmocore Change-Id Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Change-Id: I67bc1889c064596a2f3e93cc0354b11c720b0225
2017-01-21Turn some compiler warnings into errorsMax1-0/+12
Re-apply the reverted commit 98bc7fa50d0731864297f8fb82932d480c426ff6, this time with a clear error message in case autoconf-archive is not installed. Change-Id: I631bde22e79ec0318eb9c8114db5861a1d635816 Tweaked-by: Neels Hofmeyr <nhofmeyr@sysmocom.de>
2017-01-15gprs subscr: fix: intended strcmp(), but is strcpy()Neels Hofmeyr1-5/+3
The code checked 'if (strcpy(..) != 0)' which is always true and thus always copied twice -- luckily we want to copy anyway and so this is not an actual functional failure. We could correct to strcmp, but instead of iterating to compare, we might as well copy right away. Change-Id: I0ea035bd478f7022ed65e9e84d8aaf5e423309b7
2017-01-13Log expected SRES on GPRS AUTH REJECTMax1-1/+3
Change-Id: I19b0001650979bf7f1832f04f9fd5a26beb577d0
2017-01-13Revert "Turn some warnings into errors"Neels Hofmeyr1-8/+0
This introduces a failure with ./configure on my machine: ../configure: line 6612: syntax error near unexpected token `-Werror=implicit,' ../configure: line 6612: `AX_CHECK_COMPILE_FLAG(-Werror=implicit, CFLAGS="$CFLAGS -Werror=implicit")' Makefile:420: recipe for target 'config.status' failed make[1]: *** [config.status] Error 2 Installing autoconf-archive did not fix the error. So even though jenkins seems to accept this, I cannot build with this patch. Let's find out how to do this in a way that all systems can still build and then re-apply this patch. This reverts commit fd161ccce8ecaad3ddd32dd8b696902e81593ae3. Change-Id: I2b368500b07f233882ef854eca1fa21f6df39e29
2017-01-11Turn some warnings into errorsMax1-0/+8
Make warnings (when available) related to common memory-related issues into errors to harden the source and decrease chance of errors. Change-Id: Ied9c950dafa65f324cf31298b13b590f56139700
2017-01-06Cosmetic fixes around SI generationMax5-11/+12
* add missing spaces after comma and minus * prevent useless recursion calls * mark static functions as such * name and explicitly use enum for ARFCN range Change-Id: If5b717445c8b24668bad0e78fd5bb51f66c4d18e
2016-12-31fix 'osmo-nitb --version' segfaultNeels Hofmeyr1-1/+1
Call vty_init() before handle_options() to make sure the host.app_info is populated before --version potentially tries to print it. The segfault was introduced by 2c05f75bbf3d9a69eee1fe78eb5552acf1d7671d in a recent MSC-split merge. Change-Id: Ice91256d72b9eabd52709352ba6cc6a42af2921b
2016-12-24Pass actual smpp_avail_status through to smpp in alert_all_esme()Keith1-2/+2
Change-Id: I4b00d8821c1688ca0c990b6042607f4ded0f80e3
2016-12-23cosmetic: Rename phone to msPhilipp1-7/+7
The term "phone" is incorrect. Rename phone to "MS" (mobile station) in the comments and log output of gprs_llc.c Change-Id: I322d3d99452502da7555cc2af6bc8a192ca3c9c5
2016-12-23sndcp: Allow empty SNDCP-XID indicationsPhilipp4-42/+61
In some rare cases the modem might send a xid indication that does not contain anything except the version number field. The sgsn ignors such SNDCP-XID indications by stripping the entire field from the response. We found a modem in the wild that started to act problematic when the empty SNDCP-XID was missing in the response. This patch changes the XID negotiation behaviour in a way that if a modem should send empty SNDCP-XID indications, the reply will also contain an empty SNDCP-XID indication. Apart from that the SNDCP-XID version number is now parsed and echoed in the response. This ensures that we always reply with the version number that the modem expects. (The version was 0 in all cases we observed so far) Change-Id: I097a770cb4907418f53e620a051ebb8cd110c5f2 Related: OS#1794
2016-12-22bsc_vty: Fix missing break statements in switch()Harald Welte1-0/+2
Change-Id: Ifd48e8d56c845603d320748144b4d7c3c24022a0 Fixes: Coverity CID 135188 Fixes: Coverity CID 135190
2016-12-21use new OSMO_VALUE_STRINGNeels Hofmeyr2-13/+11
libosmocore change-id I857af45ae602bb9a647ba26cf8b0d1b23403b54c adds OSMO_VALUE_STRING to compose value_string arrays with the exact enum names as entries. Use instead of identical local macros in two places. Change-Id: I1b44d2a3f293785a01d6a587c78f9e0cbeec70c3
2016-12-21gitignore: gsup_test_client binaryNeels Hofmeyr1-0/+1
gsup_test_client was added in 4f8e34b226aeae221119c1d5ea659c3f087132aa and moved to libcommon in 2c1f8c8cebe41b30deca29c55290fef7a61e5343, both of which forgot to adjust the .gitignore. Change-Id: Idd0d29a2f5c5b9b038103c955e0027d9ee9fee73
2016-12-21Improve GPRS loggingMax7-20/+63
* log xid type as string instead of int * log packet encryption status, algorithm and IOV-UI in debug mode * print encryption parameters when dumping llme via vty * log key propagation from MM to LLC Related: OS#1794 Change-Id: I30c38fdeb0b88bb39bdb9928851300bc79e6aec6
2016-12-21build: remove obsolete $LIBCRYPT in two placesNeels Hofmeyr2-2/+0
It should be $LIBCRYPTO_LIBS if at all. Change-Id: I191dfe0901a10a25dffa3bbfdb9ea319fcebe254
2016-12-21build: osmo-nitb: fix missing LIBCRYPTO_FLAGSNeels Hofmeyr1-0/+1
Change-Id: I6268d0b8782ee03b42ab8bbda7aa9650c26e11ad
2016-12-20Fix some typos in stdout outputRuben Undheim6-9/+9
Change-Id: I0dbb438f3bfbaf9744717cbeec31ceefdd679ee9 Related: OS#1694
2016-12-19bsc_control.py: remove unused -i optionMax1-5/+0
This option only served to demonstrate possibility of manually selecting <id> field in CTRL protocol. Since the transition to generic ipa module this is no longer exposed so the option became a no-op. Correspondingly there's no need to explicitly initialize the RNG - the Ctrl class handles random <id> generation internally. Change-Id: I10cc7c069354cced2bba84fe67c69c28b8596ded
2016-12-18gtphub: fix possible NULL deref: don't print NULL tunnelNeels Hofmeyr1-0/+3
Fixes: coverity CID#158302 Change-Id: Ic500a3eb0c49393c7962a20e61eb57fd467208d3
2016-12-16fix: missing terminator in two value_string arraysNeels Hofmeyr2-0/+2
iu_event_type_names[] and auth_action_names[] lacked a { 0, NULL }. Change-Id: I2e3f271b887e711c8139fbaa32410c16e7fe9921
2016-12-13oap_client: make use of OAP optional: disable for NULL configNeels Hofmeyr4-2/+11
When passing a NULL config to osmo_oap_client_init(), set OAP to disabled state. Along with the previous fix that ensures message rejection in the disabled state, this makes use of OAP in the GSUP client optional. oap_client_test: expect null config to set state to disabled. Related: OS#1592 Change-Id: Ie4d622fcfd24cb7d89d19f93e4b2571d8fadd1a3
2016-12-13oap_client: reject all messages in disabled/uninitialized stateNeels Hofmeyr4-20/+31
Fixes the bug indicated in oap_client_test.c: adjust to actually expect the proper behavior. Also adjust for modified return value for message rejection. Instead of -1, just expect < 0. Adjust experr for new error messages. Related: OS#1592 Change-Id: I16165d228653e8a2689f9df94b77b470c06480c6
2016-12-13oap_client_test: show bug: disabled state does not reject messageNeels Hofmeyr2-4/+41
There is a hole in OAP where a disabled OAP still accepts at least a Registration Reject message, after which it will do things it shouldn't. Show this by expecting the bugs, to be adjusted with the upcoming fix. Related: OS#1592 Change-Id: I4a5fde308b876946fea2571ea1a550f0cc7ee136