aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2018-01-08Fix RAI constructionMax1-2/+2
The gsm48_construct_ra() expect 6-byte buffer while ra_id.digits is 3-byte buffer. The function fills in LAC and RAC as well so we should pass entire struct, not just 'digits' part which only store MCC/MNC. Related: OS#1640 Change-Id: I3bfda930012c792452f9fd695ed7acf46365f1df Fixes: CID57877, CID57876
2018-01-07gprs_gmm: Convert warning message to pragma messagePau Espin Pedrol1-1/+1
This way we can enable -Werror in builds to disallow new compilation warnings being introduced. Change-Id: If2b9a618f4219df9e013095beff52c20aacbc79e
2018-01-07cosmetic: gprs_gmm: Remove trailing whitespacePau Espin Pedrol1-2/+2
Change-Id: Ie2466268fbc4699a366856d467660b17e3f7e307
2018-01-07gprs_gmm: Remove unused variablePau Espin Pedrol1-2/+2
Fixes following compilation warning: osmo-sgsn/src/gprs/gprs_gmm.c: In function ‘gsm48_rx_gmm_service_req’: osmo-sgsn/src/gprs/gprs_gmm.c:1786:10: warning: variable ‘ciph_seq_nr’ set but not used [-Wunused-but-set-variable] uint8_t ciph_seq_nr, service_type, mi_len, mi_type; ^~~~~~~~~~~ Change-Id: If0819026a99f45df96ee6de26a71c16128e79cb8
2017-12-27Migrate from OpenSSL to osmo_get_rand_id()Max5-38/+38
This avoids potential licensing incompatibility and makes integration of Debian packaging patches easier. The libosmocore version requirements are fine already but for jenkins tests to pass we have to have Ic77866ce65acf524b768882c751a4f9c0635740b merged into libosmocore master. Related: OS#1694 Change-Id: I2b687b7f07ef05bbd861b8479cad5a958a3dde92
2017-12-26Use connection id when allocating rate countersMax1-3/+5
Due to recent libosmocore's change we can't allocate rate counters with the same name and index which are already allocated. This causes sgsn_mm_ctx_alloc_iu() failure for multiple subscribers. Fix this by using conn_id parameter from ranap_ue_conn_ctx. Change-Id: I1062ffdcac96c82269cab6f4e7ae50e28dc3aa44 Related: OS#2757
2017-12-26cosmetic: use macro for gtphub plane iterationMax1-1/+1
Change-Id: If82fcd9f6509da60e6f0d916fe107de1b38bfd18
2017-12-20Remove dead codeMax1-4/+0
Get rid of ifdefs around old unused code to improve readability. Change-Id: Ia80cf845b624d520d67143b61c9de3d49074cb8c
2017-12-20Replace '.' in counter names with ':'Max3-3/+3
The '.' is illegal character in counter names, as they are exported via CTRL interface, where '.' has a special meaning that cannot be used by strings comprising the variable name. Change-Id: I4eb6851d3577f5942ae1a9ab28d3b3ca7ab8e208
2017-12-20gsm48_rx_gmm_att_req: fix error handling: don't clean up NULL llmeNeels Hofmeyr1-1/+1
Change-Id: I78903d0846568d4e98b6e43e62bbe3c329b5bc68
2017-12-20gprs_gmm: segfault: gracefully handle failure to alloc contextNeels Hofmeyr1-0/+4
This counter allocation error I hit uncovers a segfault when allocating an MM context fails in the GSM_MI_TYPE_TMSI case: DRANAP <001a> ../../../src/osmo-iuh/src/iu_client.c:509 handle_co_initial(dir=1, proc=19) DRANAP <001a> ../../../src/osmo-iuh/src/iu_client.c:229 RNC 23: new LAC 24358 RAC 22 DMM <0002> ../../../../src/osmo-sgsn/src/gprs/gprs_gmm.c:1271 MM(---/ffffffff) -> GMM ATTACH REQUEST MI(3427325924) type="GPRS attach" DLGLOBAL <001d> ../../../src/libosmocore/src/rate_ctr.c:195 counter group 'sgsn:mmctx' already exists for index 0 DMM <0002> ../../../../src/osmo-sgsn/src/gprs/gprs_sgsn.c:272 MM(/00000000) Cannot allocate counter group Program received signal SIGSEGV, Segmentation fault. gsm48_rx_gmm_att_req (llme=0x0, msg=0x555555886950, ctx=0x0) at ../../../../src/osmo-sgsn/src/gprs/gprs_gmm.c:1375 1375 ctx->p_tmsi = tmsi; Fix it with a bit of code already present for the GSM_MI_TYPE_IMSI case just above the segfault. Change-Id: I49aa95b610f2faec52dede2e4816da47ca1dfb14
2017-12-05Show GTP version for PDP context in vtyMax1-2/+2
Change-Id: Id1692e99ae0d2b78e9473f6139e6e430fcd6a607
2017-12-05Fix display of GTP addressesMax1-5/+5
Previously we've tried to convert addresses manually which lead to wrongly displayed GTP addresses (e. g. '4.0.0.0' instead of '127.0.0.2'). Use libgtp function for conversion to fix it. Change-Id: I695a9c9497d675564a088b002299096e0dcd267d
2017-11-29Add vty cmd 'cdr trap' to send CDR through CTRL ifacePau Espin Pedrol3-27/+69
Default behavior is to have them disabled, and can be explicitly disabled too by using 'no cdr trap' cmd. Tested with osmo_ctrl.py that messages are send successfully: TRAP 0 cdr-v1 20171129125950222,901700000015254,357737055592090,555,0,5,,pdp-periodic,2731,127.0.0.2,127.0.0.1,internet,176.16.222.3,20793,10045,1 Related: OS#2360 Change-Id: I1d144d87effd934d991257a65e19cf046a938907
2017-11-29sgsn_cdr: Split log formatting into a snprintf functionPau Espin Pedrol1-30/+51
This function is going to be re-used to send TRAP messages over CTRL interface. Related: OS#2360 Change-Id: I0d87df578db1d8c220fd63376e03866895d2aa0d
2017-11-28Replace '.' in counter names with ':'Pau Espin Pedrol1-14/+14
'.' is an illegal character in counter names, as they are exported via CTRL interface, where '.' has a special meaning that cannot be used by strings comprising the variable name. Change-Id: Ie7734cc42151581897d220b445984448ceb57aed
2017-11-24use default point-code as listed on Point_Codes wiki pageNeels Hofmeyr1-1/+2
see https://osmocom.org/projects/cellular-infrastructure/wiki/Point_Codes Change-Id: Ie11f1dfcdd5889d44fefe6cc10472ef1a794cc64
2017-11-21Replace '.' in counter names with ':'Harald Welte1-23/+23
'.' is an illegal character in counter names, as they are exported via CTRL interface, where '.' has a special meaning that cannot be used by strings comprising the variable name. Change-Id: Iec382ec4ee54beb2937431f5a9d8d1171224eebb
2017-11-01vty: skip installing cmds now always installed by defaultNeels Hofmeyr3-3/+0
vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: Iee1b582a62921cb3205de01ff87d94881e8d411b
2017-11-01change default config filename to osmo-sgsn.cfg, not osmo_sgsn.cfgNeels Hofmeyr1-2/+26
All other Osmocom programs I know of have a default config file using a dash. Comply. Be backwards compatible: when a legacy osmo_sgsn.cfg exists but no osmo-sgsn.cfg, use the old config file instead. (Verified to work by manual tests.) Change-Id: If804da17a7481e79e000fe40ae0d9c4be9722e61
2017-10-31drop osmo_sgsn.cfg from src/gprs dirNeels Hofmeyr1-23/+0
There is a semantically identical config in doc/examples/osmo-sgsn. Change-Id: I9b9c502afbddcfc02ea70aa8317e0d2f37276c38
2017-10-27Log address on GTP creationMax1-0/+2
Change-Id: Ic54a2ff835c9a0ceccf2f718f56371a881dd25b7
2017-10-27Log GTP-U endpoints updateMax2-5/+7
* make gtp_ntoa() public after renaming it to sgsn_gtp_ntoa() to avoid confusion with libgtp functions * use it to log GTP-U endpoints address updates Change-Id: I96d0f3a63cce338471cc39cc33fd44c39cd2aa73 Related: SYS#3610
2017-10-26Fix libosmo-sigtran dependencyMax1-2/+4
That's follow-up fix for I72819462db0b4656fabaa80731342d06ae91fcdf to make sure IU builds are properly conditioned. Change-Id: Idb034bf2ae749204836ab7e02018d769bb242a9f
2017-10-26gbproxy: don't link unnecessaryMax2-3/+0
* remove sigtran include from common_vty.c because nothing uses it * remove LIBOSMOSIGTRAN_LIBS from generic OSMO_LIBS * remove LIBOSMOABIS_LIBS from generic OSMO_LIBS Both LIBOSMOSIGTRAN and LIBOSMOABIS are linked explicitly when necessary already anyway. Change-Id: I015a9d858bc2a95f8c9a4aedd3e0a84eadcf84e1
2017-10-25non-iu-build: guard vty libosmo-sigtran function calls.Philipp Maier1-0/+6
The function calls osmo_ss7_vty_go_parent() and gtphub_vty_is_config_node() are not guarded by an ifdef. The functions are only needed for IU support where libosmo-sigtran is used. Guard the function calls with a BUILD_IU Change-Id: I1c609ef0c344ce825c313335c7e084bf97159262
2017-10-25log: fix default loglevelsPhilipp Maier1-9/+9
for some log categories the default loglevel is far to verbose. downgrade all loglevels to LOGL_NOTICE Change-Id: I3a427ce201c96338a00a84d737d090ac1a77a29f
2017-10-20Fix APN printingMax1-18/+2
Previously first character of APN was omitted. Fix this by getting rid of errorneous wrapper function and using osmo_apn_to_str() directly. The breaking change was introduced in I7315ffcbed8a54cca2056f313bb7783ad82d0ee9. Change-Id: Ie13b6cd0066e0370e2adf48d12a363c2e405eaf2 Related: SYS#3610
2017-10-20SGSN: check that GSN is created in proper modeMax1-0/+3
Change-Id: Ie15364fb3c099806ce8a456ef452200305c836f6
2017-10-20SGSN: print additional GTP-related infoMax2-1/+7
* print libgtp version on startup * print GSN addresses in 'sh sgsn' Change-Id: I699a9eb56c4b362984ea8292a3d2b22b71f53c15 Related: SYS#3610
2017-10-17Use new FSF address in license headerMax1-1/+1
The issue was uncovered by lintian while checking .deb packaging. Change-Id: Idfe0e3d61f2604521647e9ef5ffb984db96aabbe
2017-10-09Check for correct P-TMSI allocationMax1-2/+5
Do not assign new P-TMSI if allocation failed. Change-Id: Ifa71bbc8df726c74aceaf9ae3eb49e124a53910a
2017-10-09Move P-TMSI alloc/update into separate functionMax1-13/+16
Remove code duplication by allocating and assigning P-TMSI in a static function. Change-Id: Ie5466326a851867d55da389bf18b240acd3f0fc5
2017-10-02Use extended logging for PDP contextsMax1-2/+3
Log additional details (IMSI, NSAPI etc) on PDP context creation/deletion by using appropriate LOGP() wrappers. Change-Id: I91a126952ae75ae9ba1f42aac4d26413384bba5d Related: SYS#3610
2017-09-23gbproxy: ensure peer allocation resultMax1-2/+2
gbproxy_peer_alloc() could return NULL which wasn't checked and used right away. Fix it by making this assumption explicit with OSMO_ASSERT(); While at it, also format log messages consistently. Change-Id: Ib10c954e17a479baef31ded54370b35938e00018
2017-09-06move include/openbsc to include/osmocom/sgsnNeels Hofmeyr47-191/+191
Change-Id: I281ef585fffc2644682c8282224fb1c2da5ca795
2017-09-06drop files unrelated to osmo-sgsnNeels Hofmeyr3-248/+0
These either remain from openbsc.git or slipped in while applying recent patches from openbsc.git and do not belong in osmo-sgsn. Change-Id: Ie9dc7514c3850010d0e9b3ab716b4f4e8d83594f
2017-08-30sccp init: pass no local m3ua addr to use defaultsNeels Hofmeyr1-4/+3
Remove the FIXMEs because these addresses are configurable via the cs7 / {as,asp} vty commands. Change-Id: Ibafda0a9097183c26b21f3380d24dbe293e132e2
2017-08-30split off osmo-sgsn: remove files, apply build1.1.0Neels Hofmeyr157-67797/+760
Change-Id: I5d27ff93e56cd13e0e70edd15e2080201e35e91f
2017-08-30add msg type to SMS rx loggingNeels Hofmeyr1-1/+3
Change-Id: I73ea4eebe57b2d1008045a27f174072178b9f077
2017-08-30gsup client: move not-connected to error loglevelNeels Hofmeyr1-10/+2
Change-Id: I8290963aedb7237da89c9ff98adf4cd33beb5031
2017-08-30move to osmo-mgw.git: osmo-bsc_mgcp and libmgcp as libosmo-legacy-mgcpNeels Hofmeyr26-7296/+22
Rewire build and includes to libosmo-legacy-mgcp. Drop osmo-bsc_mgcp and related python tests, now found in osmo-mgw.git. libosmo-legacy-mgcp is installed from osmo-mgw, hence add the dependency to jenkins.sh (so far using the pre_release branch). Change-Id: Ic99d681759edce11564da62500c2aac5cf5fffe2
2017-08-30move libiu to osmo-iuh/libosmo-ranapNeels Hofmeyr23-1029/+129
Remove libiu here, use the functions from libosmo-ranap instead, by applying the ranap_ / RANAP_ prefix. Corresponding change-id in osmo-iuh.git is I6a3f7ad15be03fb94689b4af6ccfa828c25f45c0 To be able to run the msc_vlr tests for RAN_UTRAN_IU without Iu client headers available, add iu_dummy.h, containing mere function signatures that match iu_dummy.c and a mostly empty struct ranap_ue_conn_ctx. Make sure we can build with and without --enable-iu: include osmo-iuh headers only with --enable-iu. Change-Id: Ib8c4fcdb4766c5e575618b95ce16dce51063206b
2017-08-30mgcp: add VTY Option to force-realloc endpointsPhilipp Maier4-2/+18
Currently the force_realloc feature is turnd on and of in a hardcoded way. This patch makes the option available via VTY. Change-Id: Ic8740512c5ea0766ff6ceb1c28b9c2b3fe46e75f
2017-08-30Implement AoIP, port to M3UA SIGTRAN (large addition and refactoring)Philipp Maier38-650/+3617
This was originally a long series of commits converging to the final result seen in this patch. It does not make much sense to review the smaller steps' trial and error, we need to review this entire change as a whole. Implement AoIP in osmo-msc and osmo-bsc. Change over to the new libosmo-sigtran API with support for proper SCCP/M3UA/SCTP stacking, as mandated by 3GPP specifications for the IuCS and IuPS interfaces. From here on, a separate osmo-stp process is required for SCCP routing between OsmoBSC / OsmoHNBGW <-> OsmoMSC / OsmoSGSN jenkins.sh: build from libosmo-sccp and osmo-iuh master branches now for new M3UA SIGTRAN. Patch-by: pmaier, nhofmeyr, laforge Change-Id: I5ae4e05ee7c57cad341ea5e86af37c1f6b0ffa77
2017-08-27Treat SIGTERM just like SIGINT in our programsHarald Welte5-0/+10
When somebody kills the process, it's best to handle the signal and to use the opportunity for some cleanup. We always did this in the NITB on SIGINT, but never on SIGTERM. Let's change it. Change-Id: Iea6804325a6575ceab5edfd28dd20249462f143b
2017-08-27NITB: remove 'help' output about '-a' option that is removed for agesHarald Welte1-2/+0
This option was present in very early versions of the NITB, but at least since 2011 it is no longer supported. It's still listed in --help output, which is wrong. Change-Id: I1d2cceb588ec5fb34ec5e2c05a7d8c93310bee88
2017-08-27libmsc: Use actual delivery time in delivery reports.Keith2-2/+3
Set the time on the status report to the time the message was delivered, as this may not be the same as the time when we are delivering the report to the originating MS. Change-Id: I9056429d40bf02731f004b7833f1de45a0d1add8
2017-08-27gbproxy: log signal value as textMax1-6/+4
Change-Id: I6ed923f5c60a8d64305f4b8e90d1362d6510e1c5
2017-08-27gbproxy: log unhandled BSSGP PDU as textMax1-2/+1
Change-Id: Ibe3c8bd353b3a178e26b0936f25b2e1959f9990c