AgeCommit message (Collapse)AuthorFilesLines
2017-01-13Implement 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-07remove 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-07sgsn: 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-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 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
2016-12-13oap_client: move logging to DLOAP logging categoryNeels Hofmeyr3-34/+30
Use libosmocore's DLOAP logging category for OAP. oap_client_test.c: make sure DLOAP is in DEBUG level to not lose any logging messages from experr. Todo: we're using a "Library" logging category, which is not really what the library category was intended for. Instead, the OAP client should probably be given a logging category like DVLR or DGPRS in its initialization API. Related: OS#1592 Change-Id: Ic765c19381b0d983da90a5d8aee9cd17e31cf34a
2016-12-13oap_client_test: print test descr to stderr, check stderrNeels Hofmeyr5-30/+56
Related: OS#1592 Change-Id: If1696c8e7bfa696b250f7eac24f08f85f8f492a2
2016-12-13oap_test.c: rename to avoid clash with libosmocore oap_test.cNeels Hofmeyr4-7/+7
Rename to oap_client_test.c, which is also a more accurate name. Related: OS#1592 Change-Id: I3ca333141a15940df07a1ae77a30bc54885db41f
2016-12-13move grps_gsup_client.c to libcommon/gsup_client.cNeels Hofmeyr5-16/+17
This is in preparation for libvlr. Related: OS#1592 Change-Id: I9ad7dc7f17f3b033c779de9ae8bc120655502fce
2016-12-13move gprs/oap.c to libcommon/oap_client.cNeels Hofmeyr5-4/+2
This is in preparation for libvlr. Related: OS#1592 Change-Id: Ib526df6d9de55a1e59a379d5e2c8541ed0ef67e3
2016-12-13rename oap.h to oap_client.hNeels Hofmeyr6-5/+5
Related: OS#1592 Change-Id: I05bd65ff81b0f70f68217b2e0a9466e160bdbdec
2016-12-13oap: rename public API from oap_ to oap_client_Neels Hofmeyr6-57/+63
Mainly to differentiate the OAP messaging API (osmo_oap_ in libosmocore) from the OAP client. This is in preparation for moving the oap client to libcommon, which is in turn preparation for libvlr. Add the osmo_ prefix, as all public Osmocom API should have. We also have OAP messages code in libosmocore, so clarify by naming this osmo_oap_client, and by also renaming the oap_test to oap_client_test. This reshuffling will allow an easy move of OAP to libosmocore if we should want to do that. A number of patches will follow up on this. Related: OS#1592 Change-Id: Id447d2bebc026a375567654adafa5f82439ea7e1
2016-12-13move OAP messages implementations to libosmocoreHarald Welte9-256/+3
This corresponds to change-id If5099e60681a215e798b6675f21813f26769c253 in libosmocore, which is now required to build openbsc. Related: OS#1592 Change-Id: I2f06aaa6eb54eafa860cfed8e72e41d82ff1c4cf
2016-12-13gsup client, gsup_test_client: move logging to DLGSUP categoryNeels Hofmeyr3-25/+20
Use the DLGSUP logging category for GSUP. Bump the required version of libosmocore to 0.9.5 to benefit from the DLGSUP logging category fix in core/logging.[hc]. (Id974c7be158e4d60421a98110f5c807aefd31119) Todo: we're using a "Library" logging category, which is not really what the library category was intended for. Instead, the GSUP client should probably be given a logging category like DVLR or DGPRS in its initialization API. Related: OS#1592 Change-Id: Id3938267fa062e1a997d3704cd678874306f86ee
2016-12-13rename gprs_gsup_client.h to gsup_client.hNeels Hofmeyr7-6/+6
This is in preparation for moving gsup to libcommon, which is in turn preparation for libvlr. Related: OS#1592 Change-Id: I9c95d00f1a9420887a44c938b1d0ee3e20586f4c
2016-12-13gprs_gsup_client*: remove the gprs_ prefixNeels Hofmeyr7-76/+79
Make sure everything is named gsup_client_ / GSUP_CLIENT_. Rename static gsup_client_send() to client_send() to avoid clash with public gprs_gsup_client_send() being renamed to gsup_client_send(). This is in preparation for moving gsup to libcommon, which is in turn preparation for libvlr. libvlr and osmo-sgsn will use the same GSUP client code. A number of patches will follow up on this, also for the the OAP client. Related: OS#1592 Change-Id: I57433973b1c4f6cc1e12e7b1c96b5f719f418b51
2016-12-13comments: gsup client: rename to Generic, adjust copyright and authorsNeels Hofmeyr1-2/+3
Related: OS#1592 Change-Id: I2c5d145e05aa4afd43ef1341d22563448f1c3577
2016-12-13add gsup_test_client programHarald Welte3-0/+319
Related: OS#1592 Change-Id: Iafd844393dd90b899f84ed61c875c1eb533436d7
2016-12-13build: bump required libosmocore, libosmogsm to 0.9.4, for GSUPNeels Hofmeyr1-2/+2
GSUP was added to libosmocore in 0.9.4. We're using it here, so make up for a previously missing bump. (BTW: I'm pretty sure that other dependencies are also in dire need of a bump, but leaving that for another patch) Change-Id: I4f245a7d78d0889b37084c52478372bddb8289d6 use moduleMax1-61/+28
Simplify code by using Ctrl implementation from Change-Id: I25fd7cd4b42126354b72abd60a3837be5d13e159 style correctionsMax1-22/+23
* replace some tabs indent with spaces * add comment to make sure no new tabs are used for indentation by emacs * remove unnecessary parenthesis Change-Id: Ib79fd4317d40ee4fd87b090b9faf8ebaf4bfca64
2016-12-13Add twisted-based IPA multiplexMax1-0/+373
Add sample applications using twisted framework for IPA and CTRL multiplex. Change-Id: I07559df420b7fe8418f3412f45acd9a375e43bc5 Related: SYS#3028
2016-12-13Use IPA module for vty testsMax1-31/+9
Replace hackish ipa_send_* routines with proper implementation from IPA module thus making it part of extended tests. Change-Id: If13ed7fd243ce3aeef505d2e8468e221aa62f79e
2016-12-13Revert "Support Deactivate PDP Context Request from network"Neels Hofmeyr4-180/+0
This reverts commit 1611df5226199da2bf2fba3d22d93cc1a6c6c777. This is due to a segfault introduced to the asan build only. See: Subject: new sanitizer breakage: SIGSEGV in sgsn_create_pdp_ctx() Date: Tue Dec 13 12:08:32 UTC 2016 Change-Id: Ic926c0e6778947b516994822e3a21d4fde25bb02
2016-12-13Add IPA multiplexMax1-0/+278
Add base class and derived Ctrl class implementing ctrl-specific routines. Change-Id: I41e37ec143183e422c0b31af95d183bd84f0c328 Related: SYS#3028
2016-12-12Support Deactivate PDP Context Request from networkPravin Kumarvel4-0/+180
Enable Deactivate PDP context based on the IMSI of the subscriber. When there are PDP contexts present for a MM context, PDP context will be deactivated along with GMM Detach(MM context deletion). If there are no PDP present, MM context will be deleted to avoid further PDP context request from the MS. Test cases is added to check this functionality. Change-Id: Ia0a41aa2218ec2fda4ea17a37c8cc55cba63dd13
2016-12-09channel_mode_from_lchan(): Add missing break statementHarald Welte1-0/+1
GSM48_CMODE_DATA_6k0 was not properly terminated and thus resulted in a bug. Change-Id: I4000f06d0b49c4afb0446beddd150521c4ba3cf0 Fixes: Coverity CID 148207
2016-12-09gsm0408_test.c: Don't pass negative value to strerror()Harald Welte1-1/+1
Change-Id: I4fcf24ec1bc974a3189486d2372b9713d7fdab70 Fixes: Coverity CID 135192
2016-12-09cfg_bts_si2quater_neigh_add(): Don't call strerror() on negative valueHarald Welte1-1/+1
Change-Id: I1300eede3f22df812b7e83902327ce4cde21aa35 Fixes: Coverity CID 135185
2016-12-09mgcp_protocol: Ensure we don't call strtok_r with NULL dataHarald Welte1-0/+1
Change-Id: I1dce4df6a49fe95db592b0598194e3a8b8b1b994 Fixes: Coverity CID 135181
2016-12-09bsc_ctrl: Ensure we don't pass NULL string into strtok_r()Harald Welte1-0/+1
Change-Id: I03bea132377c0136b55b6fdad99a5d92da12e692 Fixes: Coverity CID 135180
2016-12-09abisip-find: check bsc_fd_register() resultHarald Welte1-1/+5
Change-Id: I72d713725d287d32ec90506099751aeb9b15ef15 Fixes: Coverity CID 70462
2016-12-09sgsn_test: Fix missing = in == type checkHarald Welte1-1/+1
Change-Id: I696a7d25d2f4d19922e05a7e83c4aeec5c44fb07 Fixes: Coverity CID 135156