aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-01-31gprs/gprs_mm: add value_strings for PMM & MM stateslynxis/sgsnAlexander Couzens1-2/+15
Change-Id: I4e34dcd5e48c4dd73d63c6f865298ee7d9c864be
2017-01-31gprs/sgsn_vty:fix typo in commentAlexander Couzens1-1/+1
Change-Id: I63225b7ba6d666eddf00b1deb893e79dc9ec842b
2017-01-31use different aproach to spli MM out of PMMAlexander Couzens1-29/+46
Change-Id: Ie4edff141db56ab7ef71b2b531df40b2bcd323ec
2017-01-31split MM states from PMM statesAlexander Couzens2-8/+23
Change-Id: Ib78300de12b1cbf0f8c9a943aee8770ae8fee7cd
2017-01-31sgsn: rename gprs->mm_state -> gmm_stateAlexander Couzens6-50/+50
GMM is the right term. MM state is already occupied. Change-Id: I9cfdcf921e4ebd14a5e7ce7489ec4ce5d1f5515f
2017-01-31gprs: T3186 encoding in Sysinfo 13Philipp1-1/+7
The timer T3186, which is described in 3GPP TS 44.060, is using 3 bits of the si13 mac block. This requires special encoding. In the case of T3186, the value is encoded by the formula: bits = t/500-1. Our implementation uses the formula bits=t/500, which is incorrect.
2017-01-30debian: Require libgtp-dev after the SO version bumpHolger Hans Peter Freyther1-1/+1
The ABI of libgtp changed and we require a new library now. Drop the SO_VERSION from the library name and just depend on libgtp-dev. Change-Id: Ib301b27e2c08fda827b55820389247e27e5e8fc7
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-24debian: Install header and source file to different directoryHolger Hans Peter Freyther2-4/+5
osmo-bts consumes the gsm_data_shared.{h,c} files and assumes the OpenBSC directory layout. Install the files into the specific sub-directories to make the --with-openbsc=dir option work. Change-Id: I3da21402dee3d6f1d812b232b0a3f13b8a462d5b
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 errorsMax2-0/+13
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-19deb: unbreak nightly buildsRuben Undheim2-0/+13
Add openbsc-dev with source and header files necessary for osmo-bts builds. Max's note: extracted from Debian packaging work into separate commit. Change-Id: I25f8c639d2dc525ca280a7cd09de3ca6358d2568
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 Hofmeyr2-9/+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 errorsMax2-0/+9
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-21Integrate Debian packaging changesMax4-66/+194
debian/control: * restructure to make it easier to incorporate further changes * update package descriptions * update project URL debian/rules: * use proper hardening syntax * restructure to make it easier to incorporate further changes * remove useless comment debian/compat: update compatibility version debian/coryright: update to match Debian format Change-Id: I49cc9239b15dc77d782914ca2547e601d049acdc Related: OS#1694
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