AgeCommit message (Collapse)AuthorFilesLines
2020-12-01gmm: fix build without define PTMSI_ALLOCPau Espin Pedrol1-3/+7
Change-Id: Idcac01c4634af81ef884dc2b1b20dec3f8d12236
2020-11-30gbproxy: Separate function to move gbproxy_peer to different nseDaniel Willmann3-3/+9
Change-Id: I0a8b1e4b78384ea99d50109f050ca501b18ba5d9 Related: SYS#5226
2020-11-30gbproxy: Only send paging to each matching NSE onceDaniel Willmann1-13/+34
Fixes: SYS#5226 Change-Id: Ia33e7816b354266b9d2659ef96b798db60c134f3
2020-11-30gbproxy: Ensure BVC0 is reset before handling PtP BVCsDaniel Willmann3-6/+125
Change-Id: I9c67f973f7bca00e8eb22a024ef2282c007dd84b Related: SYS#5226
2020-11-30gbproxy: Add NSE peer that can have multiple gbproxy_peersDaniel Willmann9-285/+495
We want this level of indirection to support multiple BVCs per NSE. The current code assumes that an NSE only has one BVC which breaks messages on the signalling BVC which should only be sent once to an NSE regardless of the number of BVCs it contains. Change-Id: I97cc6c8f8c0f1b91577ab8f679c4ae217cc88076 Related: SYS#5226
2020-11-30gbproxy: Remove test testing NSVCI changeDaniel Willmann2-255/+2
This was overlooked in commit 82182d which already removed lots of NS-specific code in gbproxy_test.c From that commit message: """ Since NS2 has a different abstraction we mock up the prim send/recv functions and don't test NS like the old tests did. """ Change-Id: Ic1d7e646e633c9fa62812f5005ed10c0108a06f2 Related: SYS#5226
2020-11-27gb_proxy_peer: Add some FIXMEs regarding invalid assumptionsHarald Welte1-0/+5
Change-Id: Ibf3d4a3bd58e706dfa44e8cc9ff4823a7759dea5
2020-11-27gbproxy: Pass TLLI as LSP towards NS to facilitate load sharingHarald Welte1-0/+9
Change-Id: I6aef26c126b330a393fc2be5f558b6d5f1d9f7f4
2020-11-25sgsn: generate coredump and exit upon SIGABRT receivedPau Espin Pedrol1-5/+14
Previous code relied on abort() switching sigaction to SIG_FDL + retriggering SIGABRT in case the signal handler returns, which would then generate the coredump + terminate the process. However, if a SIGABRT is received from somewhere else (kill -SIGABRT), then the process would print the talloc report and continue running, which is not desired. Change-Id: I65f70a53b6982bff9ea4bd6ff786d8a2f8181eac Fixes: OS#4865
2020-11-25gtphub: generate coredump and exit upon SIGABRT receivedPau Espin Pedrol1-5/+13
Previous code relied on abort() switching sigaction to SIG_FDL + retriggering SIGABRT in case the signal handler returns, which would then generate the coredump + terminate the process. However, if a SIGABRT is received from somewhere else (kill -SIGABRT), then the process would print the talloc report and continue running, which is not desired. Change-Id: I1cab4a716cf2fda6353f698888edbcec6228d78b Fixes: OS#4865
2020-11-25gbproxy: generate coredump and exit upon SIGABRT receivedPau Espin Pedrol1-5/+14
Previous code relied on abort() switching sigaction to SIG_FDL + retriggering SIGABRT in case the signal handler returns, which would then generate the coredump + terminate the process. However, if a SIGABRT is received from somewhere else (kill -SIGABRT), then the process would print the talloc report and continue running, which is not desired. Change-Id: I97559b29328101c7cf340aaf1052c0c406634065 Fixes: OS#4865
2020-11-24gprs_gb_parse: Add function to determine TLLI from encoded BSSGPHarald Welte2-0/+43
This will be needed to use the TLLI as link selector parameter in osmo-gbproxy in an upcoming patch. Depends: libosmocore.git I397b32a6e6ea3e9d218446138cceafa9b27685dd Change-Id: Ia6d5300e63ad23987cbdca824db620305bd583d7
2020-11-24gbproxy: Implement paging to entire BSS areaHarald Welte1-2/+13
When we receive a PAGING for PS or CS with destination to the entire BSS area, we need to iterate over all peers and send one copy of the paging to each of them. Change-Id: Iecf244238500a354d5a5b40c76f0c0bb8f8c2511
2020-11-24gbproxy: Properly implement paging to LAC/RACHarald Welte1-12/+29
There may very well be many PCUs connected within the same RAC or LAC. This means we'll need to iterate the list of peers and dispatch it to each matching peer. Change-Id: I2c44959661fb53730586f4347cbfbbcece065e13
2020-11-11Use osmo_fd_*_{disable,enable}Harald Welte1-4/+4
Change-Id: Ia207cd2ee68d657ee88cb0152a5b1faa4161c967 Depends: libosmocore.git Idb89ba7bc7c129a6304a76900d17f47daf54d17d
2020-11-11osmo-gbproxy: Implement nsvc-state ctrl commandDaniel Willmann1-6/+14
Change-Id: I0beb572103803f3ee4ecb28d9bf2e3139e0f8aa4
2020-11-09configure.ac: Require python3 for ext_testsDaniel Willmann1-3/+3
The python scripts already use #!/usr/bin/env python3 so it was pure coincidence that the tests are working. Change-Id: I96ac31e7862fe102e5baee0c2e25458ff0451a50
2020-11-09osmo-gbproxy: Free msgb in ns2 prim callbackDaniel Willmann2-3/+2
Commit cce88282388f in libosmocore changed the msg ownership model - the callback that the user registers is now responsible for freeing the msg. Change-Id: Iee940aba7d94afefb5957dbe5f0b04dcf951b31c Related: SYS#4998
2020-11-06Let libosmocore handle VTY parent node trackingDaniel Willmann3-94/+4
* is_config_node is deprecated, so don't set it * go_parent_cb is only used if we want to do special stuff upon exiting a node, in osmo-sgsn and gtphub only osmo_ss7_vty_go_parent() needs to be called Change-Id: I2008dd9026922d29ee703c59e70d3fecced0ee18
2020-11-06gbproxy: Get the peer if paging by BVCI on SIG_BVCDaniel Willmann1-0/+1
Currently the code reports routing the message to a BVCI but never even tries to get the peer for it. Change-Id: Ic72f0f03e5886ab76404915fc60a2796e6881a7a Related: SYS#4998
2020-11-06gbproxy: Add todo for BVC RESET logicDaniel Willmann2-3/+10
When we receive a signalling BVC RESET from the SGSN we want to reset the signalling BVCs for every peer. Change-Id: I98c1a53d0e4b9a988e9ddec97ce0c67ded6f6326 Related: SYS#4998
2020-11-06gbproxy: Whitespace fixesDaniel Willmann1-2/+2
Change-Id: Id70c15050b6314fdcd452e89e358d657e1f86e57
2020-11-06Port gbproxy to NS2Alexander Couzens10-4930/+3264
Since NS2 has a different abstraction we mock up the prim send/recv functions and don't test NS like the old tests did. Related: SYS#4998 Change-Id: Iecfd0408a35a11638d254c1db3c1d477b1a11524
2020-10-23process_ms_ctx_status: Fix crash deleting PDP Ctx if GTP side was already ↵Pau Espin Pedrol1-1/+4
released sgsn_delete_pdp_ctx() should never be called without checking if the GTP side is available, since it may happen that it has already been released by the time the mmctx tells us the pdp ctx is gone on the MS side. Fixes: OS#4817 Change-Id: Ie618874545172ec98355174a2ee041fc4a8bec16
2020-10-23process_ms_ctx_status: refactor to avoid code duplicationPau Espin Pedrol1-15/+10
Change-Id: I1d1a1284c1563b3a5598e79d8ffd544288de4d62
2020-10-23sgsn_delete_pdp_ctx: Add documentation and assert assumptionsPau Espin Pedrol1-1/+6
This function is only expected to be called if the GTP side of the PDP ctx is still alive, since it will tear down the GTP side and then finish the pending MS side if needed. The asserts are added to ease debugging since it was noted that a few callers were using this function without properly checking the status of the pdp ctx. Related: OS#4817 Change-Id: I4248e2e9846fec5ae2c8557384da2deb86668c50
2020-10-20VTY: Add gtp state-dir commandKeith2-0/+15
The SGSN initialises GTP with gtp_statedir of "./" which may not be the desired path for writing the gsn_restart file. When starting from systemd for example, we might write to the system root. This patch allows override via the config file. Closes: OS#4820 Change-Id: Ib3ffb7fd6ea1d9b0286111d8c2cba9da5394ca58
2020-10-19Fix crash rx DeactPdpReq while waiting for DeactPdpAck after gtp side is freedPau Espin Pedrol1-1/+5
Scenario: 1- For an unknwon reason, sgsn sends DeletePdpCtxReq on GTP towards GGSN. 2- GGSN answers with Error Indication to that pdp ctx which calls gtp_freepdp() 3- gtp_freepdp() calls libgtp callback cb_delete_context() before freeing the pointer, in osmo-sgsn callback points to cb_delete_context(), which removes pctx->ggsn and tries to drop the pdp on the NS side by sending a DeactPdpReq. 4- While waiting for DeactPdpAck, the MS/PCU sends a DeactPdpReq, and code was unconditionalyl trying to release the gtp side without checking if it was alreay released, using pctx->ggsn==NULL and crashing. This is basically the same logic already in place in regular path gsm48_rx_gsm_deact_pdp_ack. Related: OS#4817 Change-Id: I02587a3dc812823d893fc00b904142b75fd190b9
2020-10-19Log error if pdp ctx is freed while holding an active timerPau Espin Pedrol1-0/+5
Change-Id: Iae520be36377b27a12441defa722fd41a3cdba0a
2020-10-19Use osmo_fd_setup() whenever applicableHarald Welte2-19/+4
Change-Id: I68d14b1c19dd8f1764fdf65afe1a957278255e40
2020-10-12contrib/jenkins: Enable parallel make in make distcheckPau Espin Pedrol1-2/+2
Change-Id: I423c4b1d854fa6ec7df504353ce666766ba0c787 Related: OS#4421
2020-10-03gtphub: fix compilation with gcc 10.2.0Alexander Couzens1-1/+1
gtphub.c:2915:2: error: ‘snprintf’ argument 4 may overlap destination object ‘buf’ [-Werror=restrict] 2915 | snprintf(pos, len, " port %s", portbuf); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Be better safe and use the stack instead of byte counting in the buffer. Change-Id: Ied9665ce6bd2633797bbc3a2171e911ada357a22
2020-10-02gtphub_test: fix compilation error on gcc 10.2.0Alexander Couzens1-0/+2
Ensure dump && hex can't be zero. gtphub_test.c: In function ‘_reply_is.constprop’: gtphub_test.c:535:3: error: ‘%s’ directive argument is null [-Werror=format-overflow=] Change-Id: Id27bf46855a228935fe706584f9b27cf3facf623
2020-10-02gprs_sndcp: fix use after freePhilipp Maier1-2/+2
When compression is turned on, an extra buffer "expnd" is allocated in the context of msg. This means that when msg is freed, expnd is freed as well and there is no need for freein it explcicitly, which, when it is done after freeng msg, causes talloc to abort. Change-Id: I8959b75e241ffabf9fa34c4cf014721584372b26
2020-09-25gbproxy-usermanual: Explain BSSGP/BVC handlingDaniel Willmann3-5/+121
Related: SYS#5005 Change-Id: I383fcd3864a94177f13909c6b8c15648900d3201
2020-09-21Fix Radio Priority in MM Attach and PDP Context ActivationKeith2-1/+2
3GPP TS 24.008 Section Radio Priority states that the Radio Priority IE is 3 bits as follows: -------------------------------------------- 0 0 1 priority level 1 (highest) 0 1 0 priority level 2 0 1 1 priority level 3 1 0 0 priority level 4 (lowest) All other values are interpreted as priority level 4 by this version of the protocol. -------------------------------------------- However at least the MediaTek MT6753 and MT6592 have been observed to interpret a value of 0 0 0 in an undetermined way resulting in lack of access to RACH in the cell. Fixes: OS#4506 Change-Id: I810cd541eb5764ee3f2c238bcd3a10836228d0b5
2020-09-20gmm: on invalid RA id reject the MS with an implicit detachAlexander Couzens1-10/+20
As long the SGSN doesn't support PS handover treat unknown RA as invalid and do an implicit detach. Fixes ttcn3 crash when an RAU happen within an Attach Request Change-Id: I6a0b335d51f58c26349f7e0a62b2107d7d351d07
2020-09-18gprs_llc: _bssgp_tx_dl_ud: ensure the LLME is valid before using itAlexander Couzens1-13/+17
In rare cases the LLME is NULL even when the mmctx is valid. Ensure not accessing a NULL pointer. Change-Id: Id9fdfb0d88264671546f8dfc4655032ff27bf43e
2020-08-21Change default SCTP conn NULL-> to localhost->localhostPau Espin Pedrol1-2/+2
"" is changed to "localhost" to let local NSS decide whether to use IPv4 or IPv6. In newish systems, IPv6 ::1 will be selected since IPv6 takes precedence over IPv4. Similarly, the default source addr needs to be changed from NULL to "localhost" since for some yet unknwon reason, getaddrinfo(AF_UNSPEC, NULL) returns first IPv4 "" and later "::", which is inconsistent with getaddrinfo("localhost") result, resulting in src=IPv4( and dst=IPv6(::1), which is incompatible and will fail. In any case, since the default remote address is a local one and it's the client side, there's no real logical change since the kernel would anyway should have taken a local address anyway. Change-Id: I2f599e1aa449d44136ef20ba5f516ca9b61f3223
2020-08-18Support setting rt-prio and cpu-affinity mask through VTYPau Espin Pedrol5-9/+49
Change-Id: I1af1b154d14de6d6d6fba08f15f167f4b2ed9aa2 Depends: libosmocore.git Change-Id If76a4bd2cc7b3c7adf5d84790a944d78be70e10a Depends: osmo-gsm-masnuals.git Change-Id Icd75769ef630c3fa985fc5e2154d5521689cdd3c Related: SYS#4986
2020-08-18doc: Update VTY reference xml filePau Espin Pedrol1-87/+188
Change-Id: I787bbc254ef10766fe8d480ffd93a16d9926a50e
2020-08-18configure.ac: Fix trailing whitespacePau Espin Pedrol1-1/+1
Change-Id: I5abdce5daef43dad772bf52576b47c0867d65c98
2020-08-13debian/control: change maintainer to the Osmocom team / mailing listVadim Yanitskiy1-1/+1
Change-Id: Ic6956c4d5cc9913c06b9e293dc5bb156f6510285
2020-07-27Send a BVC-RESET to all persistent Gb interfaces at start-upHarald Welte1-0/+20
3GPP TS 48.018 Section 8.4: > After any failure affecting the NSE, the party (BSS or SGSN) where > the failure resided shall reset the signalling BVC. After sending or > receiving a BVC-RESET PDU for the signalling BVC, the BSS shall stop all > traffic and initiate the BVC-RESET procedure for all BVCs corresponding > to PTP functional entities of the underlying network service entity. The > BSS must complete the BVC-RESET procedure for signalling BVC before > starting PTP BVC-RESET procedures. TODO: We should not just trigger a single outbound BVC-RESET message, but we should re-transmit them until we get a response. This would likely entail adding FSMs to libosmogb, which we will leave for a later point - it's anticipated that the NS + BSSGP code is undergoing quite some changes in the coming months anyway, so leave it for then. Change-Id: I0b46035b40709c38bb9ab9493c11031a577e3ee0 Closes: OS#4629 Depends: libosmocore.git I353adc1aa72377f7d4b3336d2ff47791fb73d62c
2020-07-18gtphub: 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
2020-06-26sgsn_libgtp: Avoid ps-paging MS on GMM Suspended statePau Espin Pedrol1-5/+3
The MS notifies movement to GMM SUSPEND state because it is for instance handling a call and cannot use PDCH anymore. Once it releases the TCH it will ASAP move to either dedicated mode or trigger RAU, which means it will get out of SUSPEND state. So it doesn't make sense to try paging the MS when in that state. This change makes test TC_suspend_nopaging pass. Related: OS#4616 Change-Id: Ia245899eb9f16c7f839785def4ceb721a1c3a11b
2020-06-26gprs_gmm_fsm.c: Add missing license headerPau Espin Pedrol1-0/+22
The file was created by myself on September 2019, 31c4657c971e40407163034526aafeb9b5a83460. Change-Id: I94299b9ccf760ad13429e149067f06ed60d37de3
2020-06-22*.spec.in: Use %config(noreplace) to retain current config fileHarald Welte1-3/+3
Change-Id: I4e7f0a44d5e2d132b24ca0f38dc6f520b59112da
2020-06-18sgsn_libgtp: Improve ps-paging loggingPau Espin Pedrol1-1/+7
Change-Id: I0c3d48d54295824c3ba5b0fa9e3c035983556326
2020-06-18use new osmo_mobile_identity API everywhereNeels Hofmeyr7-120/+137
Depends: If4f7be606e54cfa1c59084cf169785b1cbda5cf5 (libosmocore) Change-Id: I4cacb10bac419633ca0c14f244f9903f7f517b49