aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
AgeCommit message (Collapse)AuthorFilesLines
2015-11-15experinmental and incomplete hack trying to build separate MSCHarald Welte8-227/+692
2015-11-15ganc: fix segfault during memset()Harald Welte1-1/+1
2015-11-15ganc: change hard-coded MCC/MNC to 901-70Harald Welte1-2/+2
right now we use 901-70 based IMSIs for testing - but this of course needs to become vty configurable soon.
2015-11-15ganc: add (currently unused) functions for PAGING REQ and DL XFERHarald Welte1-0/+33
2015-11-15ganc: properly zero-initialize the GAN CCH description IEHarald Welte1-0/+3
As Dieter points out, the structure was not properly zero-initialized...
2015-11-15Use uint16_t for MCC and MNCHarald Welte1-2/+2
As Dieter correctly points out, MCC an MNC can very well be lager than 255 ;)
2015-11-15ganc: don't put IP addressess as string into a FQDN attributeHarald Welte1-3/+26
... there is a separate IP address IE that should be used for this. Otherwise, devices may treat 1.2.3.4 as a hostname and make forward dns lookups on it ;)
2015-11-15ganc: handle classmark changeHarald Welte2-2/+29
2015-11-15ganc: fix TLV parsing and dump L3 content as hexHarald Welte2-42/+83
2015-11-15ganc: process some more messagesHarald Welte2-15/+82
2015-11-15ganc: update copyright headersHarald Welte3-0/+40
2015-11-15ganc: Correctly return DISCOVERY ACCEPT and REGISTRATION ACCEPTHarald Welte5-16/+197
2015-11-15ganc: fix code to do naything useful at allHarald Welte2-12/+46
2015-11-15osmo-ganc: actually register the accepted fd's with select loopHarald Welte1-0/+3
2015-11-15initial skeleton for accepting UMA/GAN connectionsHarald Welte8-1/+597
2015-11-10sgsn_vty.c: fix typoNeels Hofmeyr1-1/+1
2015-11-10gbproxy: Count more GSM 04.08 messagesHolger Hans Peter Freyther4-0/+654
Extend the ul/dl counting to count the usual messages on the Gb interface. Add counters for the attach, routing area update, pdp context activation and deactivation procedures. Update the test result with the new counters.
2015-11-05Fix Warning: openbsc implicit-pointer-decl meas_udp2db.c:50Martin Hauke1-0/+1
2015-11-05Fix no-return-in-nonvoid-function meas_vis.cMartin Hauke1-0/+2
RPM post-build-checks found some issue and marks these as error: [ 38s] I: Program returns random data in a function [ 38s] E: openbsc no-return-in-nonvoid-function meas_vis.c:118
2015-11-02stats/mgcp: Initialize the statistics for MGCP as wellHolger Hans Peter Freyther1-0/+7
There are currently no reate counters but this will hopefully change in the near future.
2015-11-02stats: Set class_id in rate_ctr group descriptionsJacob Erlbeck5-0/+11
This commit adds the class_id initialiser to all rate_ctr_group_desc definitions. Sponsored-by: On-Waves ehf
2015-11-02stats: Enable stats for sgsn, gbproxy, nitb, bsc, natJacob Erlbeck6-1/+19
This commit initialises and enables the stats subsystem for the given binaries. Sponsored-by: On-Waves ehf
2015-11-02mgcp_osmux: available circuit IDs from 0 to 255, not from 0 to 128Pablo Neira Ayuso2-2/+2
Holger reports that the bitmap that accounts for available Osmux circuit IDs is limited to 128, when the maximum number of circuit IDs are determined by the uint8_t field in the header (ie. 256 circuits). [hfreyther: Update the testcase now that we have more ids to allocate]
2015-11-02oap: add OAP config to VTYNeels Hofmeyr1-0/+91
Sponsored-by: On-Waves ehf
2015-11-02gsup/oap: add OAP to GSUP client.Neels Hofmeyr5-8/+62
Trigger an OAP registration upon IPA connect. Feed incoming OAP messages to oap_handle() and send replies returned by it. Add oap_config to sgsn_config (todo: vty). Sponsored-by: On-Waves ehf [hfreyther: Fix coding style]
2015-11-02oap: add OAP API testNeels Hofmeyr2-5/+195
Sponsored-by: On-Waves ehf
2015-11-02oap: add oap testsuite skeletonNeels Hofmeyr7-1/+89
Sponsored-by: On-Waves ehf
2015-11-02oap: implement initial OAP API.Neels Hofmeyr6-2/+586
Add oap.[hc] and oap_messages.[hc]. Sponsored-by: On-Waves ehf
2015-11-02libcommon: soak up three static functions.Neels Hofmeyr7-43/+90
Add new kitchen sink openbsc/utils.h and libcommon/utils.c to make three so far static functions public (so I can use them in the upcoming OAP code). A place to put them could have been the gprs_utils.h, but all general functions in there have a gprs_ prefix, and todo markings to move them away. All other libcommon headers are too specific, so I opened up this kitchen sink header. Replace the implementation of encode_big_endian() with a call to osmo_store64be_ext(). See comments. Apply the change in Makefiles and C files.
2015-11-02sgsn: Fix up the VTY doc stringsHolger Hans Peter Freyther1-2/+2
The documentation needs to end with a \n and T3316 needs to have some text. I think it is the T3316 timer that has no action on the network side. <command id='timer t3312 &lt;0-65535&gt;'> <param name='&lt;0-65535&gt;' doc='(null)' /> Documentation error (missing docs): <command id='timer t3322 &lt;0-65535&gt;'> <param name='&lt;0-65535&gt;' doc='(null)' /> Documentation error (missing docs): <command id='timer t3350 &lt;0-65535&gt;'> <param name='&lt;0-65535&gt;' doc='(null)' /> Documentation error (missing docs): <command id='timer t3360 &lt;0-65535&gt;'> <param name='&lt;0-65535&gt;' doc='(null)' /> Documentation error (missing docs): <command id='timer t3370 &lt;0-65535&gt;'> <param name='&lt;0-65535&gt;' doc='(null)' /> Documentation error (missing docs): <command id='timer t3313 &lt;0-65535&gt;'> <param name='&lt;0-65535&gt;' doc='(null)' /> Documentation error (missing docs): <command id='timer t3314 &lt;0-65535&gt;'> <param name='&lt;0-65535&gt;' doc='(null)' /> Documentation error (missing docs): <command id='timer t3316 &lt;0-65535&gt;'> <param name='&lt;0-65535&gt;' doc='(null)' /> Documentation error (missing docs): <command id='timer t3385 &lt;0-65535&gt;'> <param name='&lt;0-65535&gt;' doc='(null)' /> Documentation error (missing docs): <command id='timer t3386 &lt;0-65535&gt;'> <param name='&lt;0-65535&gt;' doc='(null)' /> Documentation error (missing docs): <command id='timer t3395 &lt;0-65535&gt;'> <param name='&lt;0-65535&gt;' doc='(null)' /> Documentation error (missing docs): <command id='timer t3397 &lt;0-65535&gt;'> <param name='&lt;0-65535&gt;' doc='(null)' />
2015-10-29SGSN: Fix typo in VTY license statement.Harald Welte1-1/+1
It mentioned AGPLv3+ and refers to the hyperlink of v3, but still stated "Version 2 or later". That was a typo at the time.
2015-10-13gprs/gb_proxy: Use RAND_bytes for gbproxy TLLI/TMSI allocationDaniel Willmann6-303/+329
This change has some implications for the test case. It manipulated bss_ptmsi_state and sgsn_tlli_state variables to make the output of rand_r() and thus the TLLI/TMSI used predictable. This possibility is gone when using RAND_bytes() so instead it is overridden by a function that returns a deterministic sequence of values (0x00dead00, 0x00dead01, ...). The test cases are adapted to expect these values instead of the pseudo random values before. The gbproxy_test stdout file changes as well, but only where the TLLI/TMSI is displayed (in the hex dumps as well as the TLLI cache entries). All other output is the same.
2015-10-13gbproxy/test: Add and call cleanup_test functionDaniel Willmann1-0/+20
This (currently empty) function is meant to contain code that cleans up the left-overs of the test functions. This is needed by the next commit to reset the RAND_bytes sequence.
2015-10-13gprs: Use RAND_bytes for p-tmsiDaniel Willmann3-2/+8
[hfreyther: Link to libcrypto, include header, add uint8_t* cast]
2015-10-13sgsn/test: Really parse received DL LLC messagesJacob Erlbeck2-27/+61
Currently just the number of intercepted downlink messages is counted and eventually checked. The contents of the messages is lost. The PTMSI contained in ATTACH/RAU Accept messages is just 'guessed' by resetting the random number generator after reference PTMSIs have been generated. While this works with rand_r, RAND_bytes cannot be forced to recreate a certain number sequence this way (unless the backend is replaced). This commit changes that behaviour so that the last received msgb is kept and decoded. The PTMSI that has been assigned by the SGSN is then taken in the affected test cases and used instead of a 'guessed' one. This is similar to how a real MS would react to the Accept message. Sponsored-by: On-Waves ehf
2015-10-13sgsn/test: Add and call cleanup_test functionJacob Erlbeck1-0/+46
This (currently empty) function is meant to contain code that cleans up the left-overs of the test functions. This will be needed by the next commit that will store the last received msgb for later inspection. Sponsored-by: On-Waves ehf
2015-10-12osmux: Allow to listen to a specific addressHolger Hans Peter Freyther4-1/+16
For a setup with multiple network interfaces be able to pick the one that osmux should be used/visible.
2015-10-12sgsn: Fix pattern for too long msisdnHolger Hans Peter Freyther1-1/+1
We don't care how many bytes the length has but the destination we want to copy to. Fixes: CID#1296813
2015-10-12Revert "gprs: Use RAND_bytes for p-tmsi"Holger Hans Peter Freyther3-8/+2
The commit not compiling/linking should have been a strong indicator that it has not been tested either. This reverts commit 6cf0249dacc4ae46eb0857c007906c9a3f128a3e.
2015-10-12mgcp: Use the right bind addresses for NET and BTS0.15.0Holger Hans Peter Freyther1-4/+4
This API is a bit unfortunate as the caller will also access the endpoint directly. E.g. like this: output = bsc_mgcp_rewrite(..., mgcp_net_src_addr(endp), endp->net_end.local_port, -1, In terms of "terminology" the "net" was meant to be bad internet and the "bts" is the local and trusted network segment. With this terminology the "bts" would be the call-agent/MGW and "net" where the BSCs will send data to but that is not the case and terminology actuallys refers to: * net: The addresses exposed to the entity that made the MGCP call * bts: The system where we get our data for the local audio flow. Fix the method but leave the API as it is. Use the net_end in the net_src method and the bts_end in the bts_src method.
2015-10-12osmux: Make sure that bigger Osmux ids actually fitHolger Hans Peter Freyther1-2/+2
We put a signed integer into this string but did not account for the newline and for the terminating NUL of the string. Add the newline to the string and add one for NUL. Spotted while accidently having a CID of 255.
2015-10-12osmux: Remember the allocated CID and make sure it is releasedHolger Hans Peter Freyther5-9/+30
There appears to be a leak of CIDs: <000b> mgcp_osmux.c:544 All Osmux circuits are in use! There are paths that a CID had been requested and never released of the NAT. Remember the allocated CID inside the endpoint so it can always be released. It is using a new variable as the behavior for the NAT and MGCP MGW is different. The allocated_cid must be signed so that we can assign outside of the 0-255 range of it. Fixes: OW#1493
2015-10-12osmux: Enforce Osmux only global and per BSC configurationHolger Hans Peter Freyther2-10/+44
Extend the osmux only setting from the MGCP MGW to the NAT. This is applied when an endpoint is allocated and/or when the allocation is confirmed by the remote system. Not tested. The impact should only be when the new option is being used. Fixes: OW#1492
2015-10-12osmux: Allow to enforce using Osmux for the clientHolger Hans Peter Freyther3-14/+41
Some systems only want to use Osmux. In case only Osmux should be used fail if it has not be offered/acked. Client: Verified On, Off and Only with X-Osmux: 3 and without this field. <000b> mgcp_protocol.c:823 Osmux only and no osmux offered on 0x14 <000b> mgcp_protocol.c:884 Resource error on 0x14 NAT: Not tested and implemented Fixes: OW#1492
2015-10-12osmux: Add introspection for osmux.Holger Hans Peter Freyther1-0/+3
* Print number of used CIDs for the system * Hopefully this is just the beginning
2015-10-12osmux: Do not divide the number of bytes by eight.Holger Hans Peter Freyther2-3/+3
sizeof(uint8_t) == 1 and there is no need to create an array with 16 bytes and then only use the first two of them. This means the CID range is from 0 to 127 and we should be able to extend this to 256 by changing the array size to 32. Update the testcase now that we can have more than 16 calls with Osmux.
2015-10-12osmux: Test cid allocation and de-allocationHolger Hans Peter Freyther3-0/+41
* Test that one can get an id * That they are assigned predicatble right now * That returning them will make the number of used ones go down * That allocating more will fail
2015-10-12libmsc: Use RAND_bytes to generate a tokenDaniel Willmann1-1/+4
[hfreyther: Add cast to uint8_t to fix compiler warning]
2015-10-12libmsc: Use RAND_bytes to choose auth tupleDaniel Willmann1-3/+8
[hfreyther: Fix compiler warning about unused variable]
2015-10-12gprs: Use RAND_bytes for p-tmsiDaniel Willmann3-2/+8
[hfreyther: Link to libcrypto, include header, add uint8_t* cast]