aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
AgeCommit message (Collapse)AuthorFilesLines
2016-05-05Add human-readable name of SGSN_AUTH_AUTHENTICATEHarald Welte1-0/+1
In commit 4adb136da63a1d3ed523ad85e12fd99fc62f5701 we introduced a new authentication state SGSN_AUTH_AUTHENTICATE, but we didn't add that to auth_state_names[] resulting in log messages printing it abut 'unknown 0x1' rather than something more useful.
2016-05-05sgsn/GSUP: Support MAP-style nested LU/ISDHarald Welte1-0/+22
The existing GSUP code expected the subscriber data to be piggy-backed onto the location update response, rather than a separate (and nested) insert subscriber data request/response phase. With this patch we should now support both the nested as well as the piggy-backed version.
2016-04-29osmo_oap_decode(): Use common argument orderingHarald Welte4-7/+7
In general, if a function generates output data like a msgb (or in this case filling an osmo_oap_message structure), the output argument precedes the source. This is what we use all over libosmo*, and it is modelled after memcpy(), where dst is the first argument, before src. Let's align osmo_oap_decode(). Intestingly, osmo_oap_encode was already correct, so the encode/decode functions used different conventions before.
2016-04-29OAP: Various coding style fixesHarald Welte1-13/+14
* we always declare stack variables at the top of the function / block * 'switch' is not a function, so there's space ahead of the opening (
2016-04-29OAP: use osmo_oap_ prefix for OAP, rather than plain oap_Harald Welte5-22/+22
this is in preparation of moving related code to libosmocore.
2016-04-29oap_message.h: Remove dependency to openbsc includeHarald Welte4-2/+4
This is a first step to moving oap_messages.h to libosmocore
2016-04-29Move osmo_gsup_messages.[ch] to libosmocoreHarald Welte10-877/+14
This requires the corresponding commit in libosmocore.
2016-04-29move utils.h functions to libosmocoreHarald Welte10-339/+12
This needs the corresponding commit in libosmocore which imports the related functions
2016-04-29osmo_gsup_messge.[ch] documentation update (doxygen)Harald Welte2-3/+25
2016-04-29gsup_messages: Add UMTS AKA related encoding/decoding supportHarald Welte2-0/+53
2016-04-29move osmo_shift_* / osmo_match_shift_* to libosmogsmHarald Welte3-185/+0
2016-04-29rename gprs_shift_*() to osmo_shift_*()Harald Welte5-53/+92
This rename is the first step of moving the associated functions into libosmocore. Also, rename gprs_match_* to osmo_match_shift_* to indicate that it is not just matching the TLV, but also shifting the data portion.
2016-04-29Rename gprs_gsup_* to osmo_gsup_*Harald Welte6-228/+229
This is a preparation to move the related code to libosmocore, whilst at the same time generalizing it from GPRS Subscriber Update Protocol to the Osmocom Generic Subscriber Update Protoco.
2016-04-29use new libosmocore gsm_23_003.h for IMEI/IMSI lengthHarald Welte12-22/+25
... rather than our private definitions everwhere. As an added benefit, gprs_gsup_messages.h is now free of any header dependencies within openbsc.
2016-04-29move gsm_04_08_gprs.h to libosmocoreHarald Welte21-557/+14
This requres the corresponding commit in libosmocore.
2016-04-29Start to use struct osmo_auth_vector from gsm_auth_tupleHarald Welte12-70/+69
Rather than having a 'private' structure for kc, sres and rand, we now finally (with 4 years delay) use osmo_auth_vector from libosmogsm, which encapsulates authentication vectors that can be either GSM triplets or UMTS quintuples or a combination of both. gsm_auth_tuple becomes a wrapper around osmo_auth_vector, adding use_count and key_seq to it. key_seq is no longer initialized inside gprs_gsup_messages.c, as there is no CKSN / key_seq inside the message anyway. If a usre of the code needs key_seq, they need to manage it themselves.
2016-04-29Disconnect calls with incompatible channel types / modesMax1-1/+45
In case both TCH/H and TCH/F or different codecs are configured and internal MNCC handler is used we might end up in a situation where call legs with incompatible channel types or codecs would be connected resulting in a broken audio. Disconnect such calls with appropriate error message. Fixes: OS#1663
2016-04-29Adjust si2quater rangesMax1-5/+6
Change ranges of arguments for si2quater neighbor lists to proper values according to 3GPP spec.
2016-04-29Fix comment typoMax1-1/+1
2016-04-23Add missing includeMax1-0/+1
2016-04-22Add extra debug output with channel mode and typeMax4-9/+27
This provides helpful information for debugging internal MNCC handler.
2016-04-22Add vty check for max si2quater sizeMax5-42/+60
Explicitly check if added (U|E)ARFCN will fit into available si2quater message.
2016-04-22Add basic UARFCN supportMax9-46/+369
* add data structures, generation functions * vty interface for neightbor UARFCNs specific to SI2quater * vty test * unit test Fixes: OS#1666
2016-04-22Cleanup shared data structureMax1-2/+1
* remove unused variable. * lower max number of (e|u)arfcns to more realistic value.
2016-04-22Fix earfcn deletionMax2-2/+16
* fix typo in arg index * fix sign in error reporting * add vty test
2016-04-22Fix documentation for command parametersMax1-1/+2
2016-04-16nat/ussd: Add an example of the USSD gateway side-channelHolger Hans Peter Freyther1-0/+65
This adds a very basic, use once example in python on how to connect and deal with the app specific payload and messages. The code is not complete as the invokeId should be patched according to the initial invoke. This excercise is left to future readers of that code.
2016-04-16nat/vty: Do not print token update statementHolger Hans Peter Freyther1-4/+1
On start this would print one line per BSC and this doesn't add a lot of value. Let's just remove this logging message.
2016-04-16Add basic SI2quater supportMax10-4/+391
* support for sending arbitrary static SI2quater. * vty interface for neightbor EARFCNs specific to SI2quater. * dynamic generation of SI2quater messages. * unit test for SI2quater messages. Fixes: OS#1630
2016-04-16Refactor SI-related codeMax3-20/+20
Move define to header file. Use inline functions where appropriate. Change int variables which are used as boolean into actual bool to make code easier to follow.
2016-04-16Add SI2quater support to SI3Max4-2/+19
Advertise SI2 quater presence and location (if available) using SI3 according to 3GPP TS 44.018 § 10.5.2.34
2016-04-16gbproxy_test: assert msg allocation (CID #57873)Neels Hofmeyr1-0/+1
2016-04-16bsc_nat: forward_sccp_to_msc(): assert con presence (CID #57872)Neels Hofmeyr1-0/+1
2016-04-16gtphub_unmap_header_tei(): don't dereference unmapped_tei arg if not present ↵Neels Hofmeyr1-4/+6
(CID #57687)
2016-04-14nat/vty: Fix construct not working with python 2.6Holger Hans Peter Freyther1-1/+1
Use the simpler approach and just call encode('hex') on the str and then convert it to lower case to keep the tests working. reproduce: Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> d = '\0\0' >>> d '\x00\x00' >>> "".join("{:02x}".format(ord(c)) for c in d) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 1, in <genexpr> ValueError: zero length field name in format fixes: ====================================================================== ERROR: testBSCreload (__main__.TestVTYNAT) ---------------------------------------------------------------------- Traceback (most recent call last): File "./vty_test_runner.py", line 658, in testBSCreload b0 = nat_bsc_sock_test(0, "lol") File "./vty_test_runner.py", line 1150, in nat_bsc_sock_test ipa_handle_small(bsc, verbose) File "./vty_test_runner.py", line 1116, in ipa_handle_small s = data2str(x.recv(4)) File "./vty_test_runner.py", line 1100, in data2str return "".join("{:02x}".format(ord(c)) for c in d) File "./vty_test_runner.py", line 1100, in <genexpr> return "".join("{:02x}".format(ord(c)) for c in d) ValueError: zero length field name in format ----------------------------------------------------------------------
2016-04-14nat/vty: Remove second assumption about lo and bindingHolger Hans Peter Freyther1-1/+1
If we want to separate the BSCs we should separate based on the source port and not the source ip (at least in the current test setup). Fixes: ====================================================================== ERROR: testBSCreload (__main__.TestVTYNAT) ---------------------------------------------------------------------- Traceback (most recent call last): File "./vty_test_runner.py", line 658, in testBSCreload b0 = nat_bsc_sock_test(0, "lol") File "./vty_test_runner.py", line 1145, in nat_bsc_sock_test bsc.bind(('127.0.0.1' + str(nr), 0)) File "<string>", line 1, in bind error: [Errno 99] Cannot assign requested address ----------------------------------------------------------------------
2016-04-14nat/vty: And move to a different port..Holger Hans Peter Freyther1-1/+1
2016-04-14nat/vty: Convert into str for the VTY commandHolger Hans Peter Freyther1-1/+1
====================================================================== ERROR: testBSCreload (__main__.TestVTYNAT) ---------------------------------------------------------------------- Traceback (most recent call last): File "./vty_test_runner.py", line 656, in testBSCreload nat_msc_ip(self, ip, port) File "./vty_test_runner.py", line 1096, in nat_msc_ip x.vty.command("msc port " + port) TypeError: cannot concatenate 'str' and 'int' objects ----------------------------------------------------------------------
2016-04-14nat/vty: Use different port for the mock MSCHolger Hans Peter Freyther1-5/+9
Update the comment to reflect that the NAT itself will bind to port 5000 and then the mock MSC will fail to bind to it. Try to move the mock MSC to another port. Could fix: ====================================================================== ERROR: testBSCreload (__main__.TestVTYNAT) ---------------------------------------------------------------------- Traceback (most recent call last): File "./vty_test_runner.py", line 654, in testBSCreload msc = nat_msc_test(self, ip) File "./vty_test_runner.py", line 1101, in nat_msc_test msc.bind((ip, 5000)) File "<string>", line 1, in bind error: [Errno 98] Address already in use ----------------------------------------------------------------------
2016-04-14nat/vty: Don't assume one can magically add IPv4 addresses to loHolger Hans Peter Freyther1-2/+1
Don't assume that one can just bind to a local address that has not been configured. Remove the unspecific comment as I don't know to which other tests it is referred to. This should fix: ====================================================================== ERROR: testBSCreload (__main__.TestVTYNAT) ---------------------------------------------------------------------- Traceback (most recent call last): File "./vty_test_runner.py", line 655, in testBSCreload msc = nat_msc_test(self, ip) File "./vty_test_runner.py", line 1102, in nat_msc_test msc.bind((ip, 5000)) File "<string>", line 1, in bind error: [Errno 99] Cannot assign requested address ----------------------------------------------------------------------
2016-04-14NAT: reload BSCs config dynamicallyMax3-1/+153
Add vty tests for BSC configuration reloading. Load BSCs configuration on bscs-config-file command: * remove all runtime configured BSC not in the config file * close connections to all BSC with updated token value Fixes: OS#1670 Sponsored-by: On-Waves ehf
2016-04-14NAT: move BSC config into separate fileMax5-11/+69
Introduce new configuration option bscs-config-file which includes BSC configuration from the given file. Both absolute and relative (to the main config file) paths are supported. Add 'show bscs-config' command to display current BSC configuration. Note: it is still possible to have BSC configuration in the main file (provided proper index number is used) and in runtime but BSC configuration is no longer saved automatically. The management of included configuration file is left to external tools. Update configuration examples. Fixes: OS#1669 Sponsored-by: On-Waves ehf
2016-04-14vty_test_runner: update ipa sending codeMax1-2/+27
Factor out 2, add 3 functions. Those functions are simple wrappers around hex strings specific to IPA protocol. Not all of them are utilized at the moment but they were checked with wireshark while working on the tests. It might come in handy if we'd like to further expand related test harness in future. The same goes for optional verbosity argument which is not used right now but will be handy for future debugging.
2016-04-12NAT: allow allocating BSC in arbitrary orderMax4-20/+18
Check for existing BSC before allocating new one. Track number of remaining BSCs on deallocation. Explicitly use BSC number in allocation function.
2016-04-12Remove trivial wrapper functionMax1-13/+2
Rename gsm48_tx_chan_mode_modify() to gsm48_lchan_modify() and remove corresponding wrapper code.
2016-04-12NAT: extend debug output for ipaccess errorsMax1-2/+2
2016-04-12NAT: vty command to display number of BSCsMax1-0/+9
Add command 'show nat num-bscs-configured' to display number of configured BSCs. Sponsored-by: On-Waves ehf
2016-04-11Fix segfault with broken configMax1-0/+3
Fixes OS#1691
2016-04-07ctrl: Extend ctrl command to optionally handle alg+kiHolger Hans Peter Freyther2-2/+85
Extend the existing ctrl command to be able to specify the algorithm and Ki. In contrast to the VTY no size check is done. Together with the VTY this code only supports a small part of what is supported by libosmocore. The algorithm and ki are considered optional but if a valid algorithm other than "none" is passed, a KI must be passed as well. Extend the test coverage by passing the potential values. It is not verified that the KI/algorithm is stored.
2016-04-06db: If creating a subscriber in the db fails, return NULLHolger Hans Peter Freyther1-1/+4
We should not return a subscriber in case it was not written to the database. Instead free the memory allocated and return NULL. Callers in gsm_04_08.c are prepared to have the creation fail. Related: OS Issue #1657