AgeCommit message (Collapse)AuthorFilesLines
2019-08-24gsm48_rx_gmm_att_req(): cleanup old statecccamp2019Alexander Couzens1-0/+15
Change-Id: If65b0ff1e82a87107960cb7ccb29cb907f1055d4
2019-08-24FIXNE: move mmctx_cleanup_utran() upwardsAlexander Couzens1-23/+24
Change-Id: I85d0fe1a441e5b6d34b6637b37aef59de0a8f822
2019-08-24gprs_sgsn: sgsn_pdp_ctx_terminate: check llme before accessing its memberAlexander Couzens1-1/+2
Change-Id: Ia392a24999308b88aebc24b59c00cd5b83d66df2
2019-08-24gprs_gmm: stop T3350 on IDLEAlexander Couzens1-38/+45
The rau should be aborted in this case Change-Id: Ib01796cd753e2111cb952b9f6abc7998cb3acbac
2019-08-23gprs: on Iu release, stop the attach fsm if runningAlexander Couzens1-0/+3
Change-Id: I6f8a018ab375ceb4427fec344f95dcc6100069ad
2019-08-23gsm48_rx_gmm_ra_upd_req(): assign the new RAN and assign the ran connectionAlexander Couzens1-0/+5
Change-Id: I22651740dc5d5fd45ad4e7e5b8892bf2476bd40d
2019-08-23set_pmm_state: dont tx_release the PMM on idleAlexander Couzens1-2/+0
It should be released via release request/response Change-Id: Id6c8773396dcf7630bd00847456d7574588f48f3
2019-08-23set_mm_state: unassign llme when switching to MM_IDLEAlexander Couzens1-0/+9
Change-Id: I032fe4260b48476ff42b96fd9df840ec7478145a
2019-08-23clean up state on RAUAlexander Couzens1-0/+42
Change-Id: If9202d83c8d68f2474dcdb6c81dbab35a1637d55
2019-08-23gmm/iu: use new ranap_iu_free_ue() to free Iu contextsAlexander Couzens1-4/+22
Previous the context wasn't released and never be freed. With the new call ranap_iu_free_ue() the SGSN can free all resources, including memory and the SCTP connection. Change-Id: Idd3e80a9bff674aa912619da106e601d8e6ac2f3
2019-08-23gprs_gmm: refactor msgid2mmctx() out of switch/caseAlexander Couzens1-2/+2
Change-Id: I709f847802a975e1a75d0b87ac5125240cfd0854
2019-08-23gprs_gmm: clarify comment of Iu follow-on requestAlexander Couzens1-1/+3
Change-Id: Ib6b3a1b250de373656310a3c8f88d1d39bdcee60
2019-08-23gprs_gmm: only update gb/iu cell information when Iu/Gb presentAlexander Couzens1-8/+13
This function should not do the transistion of Iu/Gb. Only copy simple data Change-Id: Id52761f3ea655a2d0cc663a950154c6b7c1b5f7a
2019-08-21gprs_gmm.c: Add spec document to function documentationPau Espin Pedrol1-16/+16
Change-Id: Ibb89499e9c1ab588336df34fde26faf3fbf2c72c
2019-08-21gprs_gmm.c: Print value_string of reject causePau Espin Pedrol1-1/+2
Change-Id: I71d9abcf7e3a836c475b7adbb95a82580e41ae6d
2019-08-21vty: Introduce cs7-instance-iuPau Espin Pedrol5-1/+25
Similar to what we already have in osmo-msc. Change-Id: Iaa9e1d06dd0430848ef4f7498a3c15d13f899904
2019-08-21examples: Add osmo-sgsn_custom-sccp.cfgPau Espin Pedrol1-0/+38
Change-Id: Id3a3ccbf168fbbc28153cbf7f0249294eee34d3d
2019-08-20gprs_gmm.c: Use osmo_rai_name() in log linePau Espin Pedrol1-3/+2
Change-Id: Ieab9b7696c93de9a5d3d42f614072a6f2181e37d
2019-08-20gprs/gprs_gmm: implement T3314. Timeout to reset MM state READY->STANDBYAlexander Couzens5-2/+98
When a MS MM state is READY its exact location is known (PCU). On Gb, T3314 (aka TS 23.060 "READY timer") sets the MM state from READY to STANDBY, where only the RA is known. Introduce a second set of timer variables, because state timer can run while another packet state timer is timing out. Related: OS#1941 Change-Id: I4ce23ebe50d141076c20c9c56990b7103cd25e55
2019-08-20tests: Introduce vty-transcript-test testsPau Espin Pedrol2-4/+88
Add a few commands to make sure it's working fine, and print all available timers with default values. Change-Id: Ifd092b9561d49be1f62769d95ba49f6e4aeb4066
2019-08-20Replace own timer infra with libosmocore osmo_tdefPau Espin Pedrol5-125/+131
VTY command "show timer" is also available now. Change-Id: Ia0cf5f0a49737fbc419e2ccc86312d01c6e0056e
2019-08-20tests: Verify that timers can be set over VTYPau Espin Pedrol1-0/+9
Change-Id: I486fc2a56e235a539836894d2042c1ca6e514ab9
2019-08-20gprs_gmm: Avoid spaces in fsm events and enum stringsPau Espin Pedrol2-17/+17
FSM doesn't expect receiving event names containing spaces (log lines generated are confusing). Similar for enums, it's better using code names to match easily and make log lines more clear. Change-Id: I16ede8bf8352b09bc772fd7b43fad2c2274b3ec1
2019-08-20Introduce and use log macros when no mm ctx availablePau Espin Pedrol4-14/+46
Change-Id: Iba22060d8646bc8ec6227684ccb91d98cb4c7be2
2019-08-20gprs_gmm.c: Call mmctx_set_(p)mm_state only on related ran_typePau Espin Pedrol1-14/+27
For new readers it's very confusing why PMM states and MM states are in the same enum, but handled with different functions, and sometimes called one right after the other with different enums. Calling them when on a different ran_type makes the function early return, so let's better conditionally call the function to make it clear in the flow when the function is expected to do something. Change-Id: I65ad9e180177bc9fc7c4a037cd85cfe33b161f73
2019-08-19gprs_gmm.c: Fix typo in log messagePau Espin Pedrol1-1/+1
Change-Id: I357f0af89f5d14d304c3e889a49a5f6c23b7fb7a
2019-08-19sgsn: use sccp_simple_client API to setup ss7 id 0 instead of 1Pau Espin Pedrol1-5/+5
Implementation of osmo_sccp_simple_client() API internally uses ss7 id 1, which is confusing since there's no 0 in use in osmo-sgsn. Let's explicitly use the 0 one so it is configured by "cs7 instance 0" in the VTY. Related: OS#4157 Change-Id: I0e23a6a76ebcba0b1b424e3d3b20d06c1da44cbe
2019-08-15gprs_gmm.c: Flag mmctx_set_(p)mm_state() functions staticPau Espin Pedrol1-2/+2
Change-Id: I061144b6994ee40d5b32eb321dd4f3d3786d028d
2019-08-15gprs_sgsn.h: Flag MM_CTX_T_GERAN_Iu as not supportedPau Espin Pedrol2-1/+5
Change-Id: I3b53a530ab25434e2b2f4d80ad70a8a5f22bfcac
2019-08-15gprs_gmm.c: Use correct function to set MM_IDLE state during cleanupPau Espin Pedrol1-1/+1
Change-Id: Ic6912269d0d69c86f19e57f3271ebda1328e968f
2019-08-15gprs_gmm: Introduce assert to guard against unexpected conditionPau Espin Pedrol1-0/+5
This may well be the culprit of OS#3957, were already freed llme is accessed from mmctx context later on, upon some timer is triggered in mmctx. Related: OS#3957 Change-Id: I8e1eaeb9b3ebee8e45704b4fe007190c7db609e4
2019-08-13gprs_sgsn.c: Remove recently introduced assertPau Espin Pedrol1-2/+0
Recent commit added an assert to make sure unexpected conditions were happening in sgsn_mm_ctx_cleanup_free(). Old code was passing mm->gb.tlli to gprs_llgmm_assign with "new tlli" being all-1's (aka unassign mm->gb.tlli). The commit changed the code to use gprs_llgmm_unassign, which uses llme->tlli instead of mm->gb.tlli, and the assert was used to make sure no behavior change occured with the commit. It seems TTCN3 test TC_attach_auth_id_timeout triggers that assert, and after closer debug it seems mm->gb.tlli == llme->old_tlli, which makes sense since there's a mm->gb.tlli_new which is expected to be llme->tlli. When TLLI changes in GMM (Attach Request or RA Update), it is stored into mm->gb.tlli_new and assigned on the LLC layer using gprs_llgm_assign(), and upon completion signalling from MS, (after handling response to initial request) it is assigned to mm->gb.tlli (and value kept in mm->gb.tlli_new). So mm->gb.tlli and mm->gb.tlli_new usually contain the same value unless a new TLLI is allocated, and during the span of Request->Response->Complete it is kept different, the LLC layer having assigned the value of mm->gb.tlli_new. So, old code (before the commit adding the assert) was wrongly using mm->gb.tlli instead of mm->gb.tlli_new at the moment of unassigning (but not really problematic in practice since behavior is the same as long as "old TLLI" value is not all-1's. So we are fine and correct using gprs_llgm_unassign() (which passes llme->tlli as "old TLLI") instead of what used to be done before. In any case, the expected behavior is to free the llme object and get rid of everything... Fixes: 788863cda53298c24110d0fe0f8cd3309cdec747 Change-Id: I482acdbdf05ce0cb0a5804206672512854067f5b
2019-08-13gprs_gmm: Clarify comment during TLLI assignmentPau Espin Pedrol1-1/+1
TS 04.64 sec LLGMM-ASSIGN specifies: """ If TLLI Old all 1's and TLLI New all 1's then TLLI Old and TLLI New are assigned, and TLLI New shall be used when (re-)transmitting LLC frames. Both TLLI Old and TLLI New shall be accepted when received from the peer. It shall be treated as a TLLI change according to subclause 8.3.2. """ Change-Id: I3a17715bf2dba7b03c1335ad106307eb4d5f564a
2019-08-12gprs_sgsn.c: Warn upon llme free unexpected scenariosPau Espin Pedrol1-1/+3
May be useful to detect unexpected conditions which could end up in memory leaks. Related: OS#3957 Change-Id: I0d175501083ce458ff1c07ad38761d2cbf4ea470
2019-08-12Introduce define TLLI_UNASSIGNEDPau Espin Pedrol4-15/+18
Change-Id: Ib8be5af2a5e92a7403505b73ce4c1751832de40d
2019-08-12gprs_gmm.c: Drop unneeded bracketsPau Espin Pedrol1-4/+2
Change-Id: Ie8ba2b9da695de8730834abb591df64295bb6172
2019-08-12gprs_gmm.c: Improve doc on nullable parametersPau Espin Pedrol1-2/+1
Change-Id: Iefb9b6dc34d87b4088c7535ef0a246103fe3f7e9
2019-08-12gprs_llc.h: Improve documentation of some structsPau Espin Pedrol1-2/+3
Change-Id: I1b45f45addc87c74f3ae109e544143a1335180de
2019-08-12gprs_gmm: Introduce macros to access msgb's associated IU UE ctxPau Espin Pedrol1-22/+20
Change-Id: I4d1d47af332d4557e8a3a70c1055bcc172166016
2019-08-08Bump version: 1.4.1 → Espin Pedrol1-0/+66
Change-Id: Ife43559f395b9602f0b131a672f8d87d6ee48ea2
2019-08-08Require newer versions of dependenciesPau Espin Pedrol2-17/+17
New APIs only available since libgtp 1.4.0 are needed, and in turn that libgtp version requires newer libosmocore 1.1.0. osmo-sgsn itself requires libosmocore 1.2.0 since it uses GSM23003_TMSI_SGSN_MASK. Change-Id: I1c67d3e7dda093b4869756c7a63dc7a4549084ae
2019-08-05Remove undefined param passed to {logging,osmo_stats}_vty_add_cmdsPau Espin Pedrol3-5/+5
Since March 15th 2017, libosmocore API logging_vty_add_cmds() had its parameter removed (c65c5b4ea075ef6cef11fff9442ae0b15c1d6af7). However, definition in C file doesn't contain "(void)", which means number of parameters is undefined and thus compiler doesn't complain. Let's remove parameters from all callers before enforcing "(void)" on it. API osmo_stats_vty_add_cmds never had a param list but has seem problem (no "void"), so some users decided to pass a parameter to it. Change-Id: Ic4af704958819e6f65ac01be33ef5b3d69628ad0 Related: OS#4138
2019-07-30configuration.adoc: Add a section about encryptionDaniel Willmann1-0/+18
Change-Id: I3a2b84d386f55447e9eed35e59fdc0272e5147d1 Related: OS#1720
2019-07-30configuration.adoc: Small fixesDaniel Willmann1-14/+25
Fix some typos, correct data compression command, add example to turn off compression. Change-Id: I6beff8c66eacf12f1081d51dd6b124bdd4478558 Related: OS#1720
2019-07-29osmo-gbproxy.cfg: fix conflict with osmo-sgsn.cfgOliver Smith1-0/+1
Listen on by default, so there is no conflict on This allows starting both services with their default configuration, like we are doing it in the Osmocom-Debian-install-* jenkins jobs. Related: OS#3369 Change-Id: I6e3053de8885a7954296d820c6a069d06276e4df
2019-07-26osmo-sgsn: Fix outdated information in usermanualDaniel Willmann2-18/+9
Quite a few features that are listed as not-implemented in the overview section are actually implemented now. Change-Id: I8d499a25293b69babc2aebb2d697438f8ba8141f Related: OS#1720
2019-07-26Add/fix help string for version optionDaniel Willmann3-2/+3
osmo-sgsn was missing the help text of the -V option gb_proxy still thought of itself as OpenBSC Omit the name of the program in the help text to avoid such issues in the future. Related: OS#1720 Change-Id: Ib57694b6bff7c98a269dc4b4dbb7173349a57b81
2019-07-24osmo-gtphub.cfg: fix conflict with osmo-sgsn.cfgOliver Smith1-1/+1
Change bind-to-sgsns from to, so osmo-gtphub's default config does not conflict with the osmo-sgsn default config. The value of bind-to-ggsns does not clash with osmo-ggsn's config, so it was left unchanged. Related: OS#3369 Change-Id: Id892e1f4ab2daabbe9824b819b5fed985373b97a
2019-07-24manuals: Update vty/counter documentationDaniel Willmann2-65/+26
Change-Id: Id7245eb1011d1f04d5dfa1503a96d100bc98344c Related: OS#1700
2019-07-22turn -Werror=null-dereference into a warningEric Wild1-1/+1
There is unfortunately no way to suppres this witha pragma, and gcc 9 uncovers quite a few new instaces with enabled LTO that can't/won't be fixed "error: potential null pointer dereference" Related: OS#4123 Change-Id: I4d1219bf84d3b8dcaf925a60cf54abe733fba263