AgeCommit message (Collapse)AuthorFilesLines
2020-08-14Bump version: → 1.5.1rel-1.5.1Harald Welte1-0/+10
This is just to make osmo-gtphub build against modern libosmocore, which creates a naming clash about 'struct osmo_sockaddr'. Related: OS#4710 Change-Id: I46043906d7f39d989f57bbdb5417e10d155a4d4d
2020-08-14gtphub_test: Fix compilation with gcc-10Harald Welte1-1/+1
/usr/bin/ld: ../../src/gtphub/gtphub.o:/home/laforge/projects/git/osmo-sgsn/src/gtphub/gtphub.c:50: multiple definition of `osmo_gtphub_ctx'; gtphub_test.o:/home/laforge/projects/git/osmo-sgsn/tests/gtphub/gtphub_test.c:57: first defined here collect2: error: ld returned 1 exit status See also https://alioth-lists.debian.net/pipermail/debian-mobcom-maintainers/Week-of-Mon-20200413/000653.html Change-Id: I19c1eef6649d2747f0b624f5292d7ae47c4ca839
2020-08-14gtphub: rename sgsn's oww osmo_sockaddr into sgsn_sockaddrAlexander Couzens4-95/+95
The osmo_ prefix should be only used for official struct/apis of libosmocore. This commit was done via `sed -i 's/osmo_sockaddr/sgsn_sockaddr/g'`. In prepartion of introducing a different api of osmo_sockaddr to libosmocore. Change-Id: Ibb1ddce9ff1ffe7494de5cdb8ea1843c45fe4566
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
2019-07-18sgsn_mm_ctx_find_ggsn_ctx(): fix: always set gsm_causeVadim Yanitskiy1-1/+2
GCC 9 complains that variable 'gsm_cause' in do_act_pdp_req() may be uninitialized. This may happen if sgsn_mm_ctx_find_ggsn_ctx() would return NULL due to no static GGSN configured. Change-Id: I09c608045dd35b9898b82e236a306ab9a6c2c0b9
2019-07-17Spelling fixesRuben Undheim6-11/+11
Change-Id: Id1511c5022a239db5d0b44ec7adf048cca307751
2019-07-10contrib/jenkins.sh: run "make maintainer-clean"Oliver Smith1-0/+1
Related: OS#3047 Change-Id: Ic887518bd149f325a92c3517ee90c655b1368fd8
2019-06-19manuals: Add script to regenerate vty/counter documentationDaniel Willmann2-0/+18
Change-Id: I8ee63a3da532285def8de7fe5e90873152adb21e Related: OS#1700
2019-06-17replace magic tmsi constant with defineEric Wild2-3/+3
Depends: libosmocore I52b9f6b5f3e96d85a390ba2af21d7814df8aaeec Change-Id: Icf9f466efce520779c926b47b6e6d6c9815120eb
2019-06-13sgsn: Have authentication required on by defaultPau Espin Pedrol4-20/+11
Previous commit introduced command "authentication (optional|required)", which is only meaningful if auth-policy is remote. Upon adding the cmd, it changed the default logic for remote policy to not require authentication, which broke TTCN3 tests because sgsn no longer tries to authenticate the users. Since it's actually good to enable authentication by default where possible, let's enable it by default when on auth-policy remote. In order to do so, let's simply not care about the value of variable require_authentication if auth_policy is not REMOTE. As a result, we drop parts of the previous patch and remove unneeded checks (which are only partially useful based on order of commands during VTY read). Fixes: 794f446a284ed1ac6d31eb79a8f4c874d66fc34e Change-Id: Ic707a95af178b44f08809df3d3bc8354bf34273c
2019-06-06osmo-sgsn: add VTY parameter to toggle authenticationVadim Yanitskiy4-1/+45
It may be useful to have 'remote' authorization policy, but do not require authentication in GERAN at the same time, e.g. in combination with 'subscriber-create-on-demand' feature of OsmoHLR. This change introduces a new VTY parameter similar to the one that we already have in OsmoMSC: authentication (optional|required) Please note that 'required' only applies if 'auth-policy' is 'remote'. Change-Id: I9909145e7e0af587c28827e16301a61b13eedaa9
2019-06-06sgsn_libgtp: Use new per-GSN libgtp API instead of deprecated APIPau Espin Pedrol1-1/+1
Depends: osmo-ggsn.git I653cbdc185165592d985e3efab6e3f1add97877b Related: OS#2873 Change-Id: Iaaffe0ec4d9590309c62b62c446677c6f6732f2a
2019-06-05doc/manuals/vty: regenerate sgsn_vty_reference.xmlVadim Yanitskiy1-7/+21
Change-Id: I3dfe3598055457cc9724a371590e676f1920652b
2019-05-29debian: create -doc subpackage with pdf manualsOliver Smith4-2/+18
I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I9c09a0cb5c65fa2e2cd9817edb4656b2a1a35bb9
2019-05-29sgsn: Fix echo timer not started upon first pdp ctx createdPau Espin Pedrol1-7/+9
Commit 176a4d2f33865a5c0433f8679f5e68f209d7b874 moved echo timer related code to its own function but did some mistakes when moving the logic from several places into its own function. As a result, echo timer was only enabled after the 2nd pdp ctx was created, instead of the expected 1st. First, let's be consistent and always call the function *after* changing state, since that's what the function expects. This fixes the issue. Finally make the logic in the function more intuitive by checking in the if clause the only case where actually the echo timer should be enabled: Only if policy specifies so and we have at least 1 pdp ctx against that ggsn. Fixes: 176a4d2f33865a5c0433f8679f5e68f209d7b874 Change-Id: I826030978edb61ea5a172c2b72f63758206a6246
2019-05-28Document max retransmit times for T3395Pau Espin Pedrol1-2/+5
Spec also states same value is used for T3390, which we don't yet implement. Change-Id: I1a2276bd42d1ea5706cf9cc26d3e44baa6fbf066
2019-05-27sgsn: vty: Improve log warning content with spec sectionPau Espin Pedrol1-1/+1
Change-Id: I68e87f29711a282a97a43b175f13b3c70112ab60
2019-05-12Fix IMSI padding in imsi-aclMax1-1/+4
In I73fd54ad3a4ab8be5aff0fee5c722597ad766e9d incorrect fix was added which only initialize first element of array. Fix this by using explicit index to initialize entire array. Change-Id: I26e4aa44f159d1b5b91dda4a586fd4e809711245
2019-05-11gprs_gmm: send Service Reject when no PDP ctxs are available.efistokl3-1/+43
Look at PDP Context Status IE: if there are any PDP contexts which are ACTIVE on MS side and there are no PDP contexts which are ACTIVE on the network side, then send Service Reject with the cause "NO PDP ACTIVATED". This forces MS to reactivate the PDP contexts. 3GPP TS 24.008 Section Service request procedure not accepted by the network. Cause # 40. Fixes: OS#3937 Change-Id: If610cbef17c25ec44e65d4f1b2340d102c560437
2019-05-02Echo zero byte XID-Field of Type L3_PARKeith1-0/+8
After Activate PDP Context request, Motorola KRZR sends a zero length XID-Field of Type L3 Parameters If this is not echoed back, the phone will send Deactivate PDP Context request with SM Cause: LLC or SNDCP failure(A/Gb only) (25) Closes: OS#3426 Change-Id: Ibd75f7b943c84ed7264481fa2e4bc3cb2f6745d4
2019-04-30gbproxy: parse dtap GSM48_MT_GSM_DEACT_PDP_REQ|ACKAlexander Couzens1-0/+8
Fix a warning "Unhandled GSM 04.08 message type ...". Fixes: OS#3466 Change-Id: I20bf4db8da746e0b994bfe3f8178188831b67ed3
2019-04-27gprs_sndcp_comp_free: Replace ifelse with switch and better handling of errorPau Espin Pedrol1-2/+9
gprs_sndcp_dcomp_term asserts if compclass is not SNDCP_XID_DATA_COMPRESSION, so this way by checking in the caller too we easily now if the unexpected value is in compclass or in algo.dcomp. Change-Id: I4600e6a137f42f20fdf69637e4a9048b265c1748
2019-04-24gb_proxy: cosmetic: Use 'bool' in data structures where applicableHarald Welte5-35/+36
If we ever only use 0/1 in an 'int', we should have used 'bool'. Change-Id: I63876f52d5de87e4c99d92669270fd1f487e217c
2019-04-24gb_proxy.h: Add missing comments; improve commentsHarald Welte1-13/+46
When the patching and routing features were introduced, a lot of the new structures were not documented at the same level as the pre-existing code. Let's fix that. Change-Id: I61bdd3b1cec037bce825c234a8a274b70629adc8
2019-04-24LLC: Store the XID inside the LLC Entity, not LLC Mgmg EntityHarald Welte3-26/+25
For every logical session between a MS and the SGSN, there is one LLME (LLC Management Entity) and a set of LLEs (Logical Link Entities): One for each SAPI. The XID procedure used to establish LLC configuration values such as N201 (MTU) parameters happens on each LLE separately. The negotiated parameters only affect that one LLE (SAPI) and are not global. Still, the OsmoSGSN LLC code has the "struct llist_head *xid" member as part of the gprs_llc_llme, and not as part of the gprs_llc_lle. This list is a cache of the XID fields we have sent with the last XID request, which is used in processing the response from the MS. If two XID handshakes were to occur concurrently on two LLEs, the state between them would get messed up. It must be maintained separately for each LLE. Closes: OS#3955 Change-Id: Iaeb54ca5ac58391be45e56c2e721f531969f3a9e
2019-04-24gprs_llc: Correctly refuse any ABM command (SABM, DISC) with DMHarald Welte1-0/+22
According to Section of 3GPP TS 04.64 The DM unnumbered response shall be used by an LLE to report to its peer that the LLE is in a state such that ABM operation cannot be performed. An LLE shall transmit a DM response to any valid command received that it cannot action. Closes: OS#3953 Change-Id: Ie8b8e16d5a68f19f21dc4fdb5703c8a794e0173c
2019-04-23LLC: Avoid NOTICE message on LLC NULLHarald Welte1-0/+3
A MS sending LLC NULL frames on cell change is a perfectly normal event, and we shouldn't log any cryptic NOTICE messages about it. Change-Id: I6be0b9c8813dfb40a7955422fd8e7cebf94d189c
2019-04-23LLC: Don't blindly assume all LLC frames have data payloadHarald Welte1-3/+8
In reality, only UI, I, SABM, UA and XID frames carry payload. All other frames will have llhp.data == NULL. Let's therefore not do any msgb adjustments unless we actually know there is a user payload field. Change-Id: I51bbd0f2c618d477a037af343ff41de1c8a5a3ae Closes: OS#3952
2019-04-23LLC XID: Fix string representation of N201_UHarald Welte1-1/+1
Change-Id: I8799e3a3c47377aeeb9923d9d73f5d0b73cd8d0b
2019-04-16gprs_gmm: reintroduce calling gsm48_gmm_authorize when not handling GMM ↵Alexander Couzens1-1/+6
Attach Requests A security command is part of multiple procedures to ensure integrity (optional also encryption) between MS and RNC. It should be used for all Iu connections once. With the rewrite of the GMM Attach FSM the use of the security command procedure was broken for all procedures e.g. Service Request except GMM Attach Request. Relates: OS#3920 Change-Id: I50e8e316f06ae1a6171a6b07e4e2f0761322b779
2019-04-08gsm0408_rcv_gmm: send Iu-ReleaseCommand upon receiving Attach Complete.efistokl1-0/+7
UE expects to receive Iu-ReleaseCommand after Attach Complete. If it doesn't receive it, then it sends Iu-ReleaseRequest after a timeout which makes the "PS Activation" process long. Change-Id: Ib5053e3cd655d08ff3fd0fefa48325fabb1797c8 Related: OS#3908
2019-02-26gbproxy_test: Fix test expectations of gprs_ns_rcvmsg()Harald Welte2-334/+340
gprs_ns_rcvmsg() in old libosmocore returns "number of bytes transmitted by any response PDU we sent as a result of the received message", while modern libosmocore simply retunrs '0' for any successfully received message. Let's make sure any non-negative responses lead to a reproducible test output with both old and new libosmocore. Change-Id: I7a48d14aed19825b87a02ccf9ee9cbfe0853342c
2019-02-14GMM: permit VLR_ANSWERED event in attach FSMMax1-1/+7
This fixes following error: DMM gprs_gmm.c:1126 GMM_ATTACH_REQ_FSM(gb_gmm_req)[0x5589e78dded0]{WaitAttachComplete}: Event VLR answered not permitted There seems to be a race condition in FSM when MS establishes MM context which isn't immediately followed up by PDP context (for example when no APN is configured in MS). This does not affect actual functionality because in this case MS won't be able to use GPRS anyway but it's still nice to get our FSM fixed even in this corner case. Change-Id: I14d234632224e20faf865d2273c83cfff31abf61
2019-02-13Improve 'show subscriber cache' vty commandMax1-10/+13
* don't use spaces when printing hex data like RAND, SRES etc to increase the chance that it'll fit onto single line which will improve readability * don't print non-existent QoS value Change-Id: I0a09063f30c1116803994117f49df9d02bcc9181
2019-01-23Bump version: → Welte2-11/+158
Change-Id: I9d37bb897d34ad973e93706003bdecc0cf6be816
2018-12-20make gsup ipa name configurable in osmo-sgsn.cfgStefan Sperling3-2/+36
Add a 'gsup ipa-name' VTY command which overrides the default IPA name used by the SGSN on the GSUP link towards the HLR. This is required for GSUP routing in multi-SGSN networks. The 'gsup ipa-name' option can only be set via the config file because changing the IPA name at run-time conflicts with active GSUP connections and routes configured in the HLR. The osmo-sgsn program must be restarted if its IPA name needs to change. Related: OS#3356 Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
2018-12-12remove pointless declaration of struct gsm_networkStefan Sperling3-11/+2
We were passing a NULL pointer of type struct gsm_network * to ctrl_interface_setup_dynip(). Remove the pointless declaration of this struct. Also, replace the sgsn_controlif_setup() helper function with a direct call to ctrl_interface_setup_dynip(). The helper fnuction was just a thin wrapper around the latter. Change-Id: Ib4151afa5bff01e63b462cca517fb60ac0503759 Related: OS#3356
2018-12-11Use explicit parameter for sgsn_auth_init()Max4-4/+4
This is necessary to properly test ACLs in follow-up patches. Change-Id: Ibeba371234680f33ad35afbfffce9dca185228c1
2018-12-10Use explicit length checkMax1-3/+1
Use OSMO_MIN macro to check for MSISDN length. This makes the code cleaner and will, hopefully, aid static analysis tools. Change-Id: Ic0fbeb8d248c74e54bfb51ba2cdea55c4f386ac7 Fixes: CID57879
2018-12-10Drop unused osmo-sgsn.pcMax4-15/+0
We do not install any libraries so we don't need it: most likely it's a forgotten leftover from pre-split repo time. Change-Id: Ifabb26d1e6384659789061bc2abe23cb5ceca4cb