Fill in defintions for all enum fields defined as of libosmocore.git
51bbb34a16359941f17a0b80d8fe9b6d73d12307.
Change-Id: I2648fbfb0f133069470a829d80fdbe80b7e6e1ef
%d and %i has the same meaning when used in format string for printf.
The linter will warn when using %i. %i was only added to provide
symmetry between scanf() and printf().
Change-Id: Icd5f5f9b0d2ed8fd82afa406787acb4bd95358bf
gprs_gmm.c is huge. Further split the general validation
and parsing of the message into an own function.
Change-Id: I413da1b6b4b7c0c4781393acd8564661bc74ce2d
gprs_gmm_attach_req_ies() isn't specific for the attach request.
It also did not cover the full message because of a fixed message length
when comparing both messages.
A diff of the old and new GMM message is required to figure out
if the MS/UE is retransmitting an old message or starting
a new procedure.
Change-Id: Ie698d3a6894a5796663c22c8bfd12b47acda57e6
Previous the SGSN would not support multiple BSS within the
same routing area.
Add support paging of a whole routing area.
Change-Id: I181da9f656e394ccfcb8999021a5b7e13ca0419f
Before this patch, if Rx path at RAB Ass Req failed, the PDP ctx in the
middle of being activated was left untouched.
Explicitly communicate the failure to both sides (UE and GGSN).
Related: OS#6508
Related: SYS#7119
Change-Id: I111cc4b17100d2e1ef756b654dc9e98415b3a8bb
Simply use the existing omos-iuh library helper to decode the IP
address, which is more robust than existing adhoc code in osmo-sgsn.
The library version already supports decoding ITU X.213 IANA binary IPv4
addresses padded to 20 bytes.
Related: OS#6508
Related: SYS#7119
Change-Id: I9c48b676068574338f60b6ed7ad8b61ba748b52e
This follows the removal of the libsccp.a and the pkg-config
libosmo-sccp.pc from libosmo-sccp.git
Related: libosmo-sccp I299a32a2f8f61477cf49c8126567fef2092d5407
Change-Id: I2fc827cf15b7f78173e5ee489abe2c6d12b82c2f
Similarly to 282de031, this commit turns errors like:
DGPRS ERROR PDP(---/0) Stopping PDP timer 3395 but 0 is running
into warnings with a more accurate reason:
DGPRS ERROR PDP(---/0) Stopping *inactive* PDP timer 3395
Change-Id: I64932d1cbd93667ab2e94e04691d6601435dba81
Related: 282de031 "gmm: mmctx_timer_stop(): warn about timer not running"
The new modern osmo_routing_area_id is more flexible
and allow to access PLMN, LAC more convient.
Depends: Iaef54cac541913534af00f40483723e9952a6807 (libosmocore)
Change-Id: Ia41eb8f51d3836b1bc65325ff1ec6bdb16e20c7e
TS 44.064 section 8.3.3 (and other sections) talk about special
unassigned value of "all 1's", but I couldn't find any reference to a
"all 0's" specific value/meaning.
In practice in the code this may not be super important since those
values may not ve checked due to the FSM state, but in any case they are
initially set to all 1's, so it makes total sense to re-set them to the
same unassigned value instead of a randomly chosen all 0's value.
Change-Id: I660c8d0ef08b34f8cb74fd51b5c59e5628d687ae
If an MS which had an MMCTX at the SGSN sent RAU update with an
unexpected Old RA field, the RAU was rejected and LLME (LLC layer)
unassigned (freed), because no MMCTX was found matching the wrong old
RA.
However, an MMCTX may actually exist pointing to that LLME, and hence
when the LLME is freed, it stayed unnoticed with a dangling pointer to
the freed LLME in ctx->gb.llme.
Let's try to harder to avoid this kind of bugs which make osmo-sgsn
crash.
Once we properly split the code into separate independent layers (LLC,
MMCTX, etc.) each holding their own structs, this kind of bugs shouldn't
happen anymore.
Related: OS#6441
Change-Id: I5a4328c6e945b85dd815215724feecadba59c435
We use 'struct ipa_client_conn' from libosmo-abis:
src/sgsn/sgsn_vty.c:56:#include <osmocom/abis/ipa.h>
but do not call any of its API directly, so linking against it
is not necessary. Remove it from $LDADD, but keep in $CFLAGS.
Change-Id: I11168a7b25942d6c70566441fb0a1d26c3ae5c43
Related: OS#6535
Neither we include its headers nor call any of its functions.
It's actually a dependency of libosmo-sccp, which is required
for '--enable-iu', so keep it in contrib/jenkins.sh.
Change-Id: Ia3395fd335d3a693c314b29b8e92968eef55da9a
Related: OS#6535
The gtp header of ggsn have been moved to osmocom/gtp/gtp.h for a while.
Use the full path to prevent clashs with older versions
Change-Id: I764644110c0f332b18117e1e8311ddc55eafd5fa
GGSN informed us that it received an Error Indication when sending DL data to the RNC.
This probably means the RNC lost its state, aka crashed or was rebooted.
Mark the subscriber as PMM-IDLE, release Iu and point GTPU back to SGSN.
Then page the UE so it hopefully re-creates the state at the RNC.
Related: OS#6512
Related: OS#6519
Related: SYS#5435
Depends: osmo-ggsn.git Change-Id Ic80a9a928c55b6ff85be96014920bb42793cb943
Change-Id: I76d4c387730fdbfb9e7e0dd23a5afb9e762228b1
When the UE/RNC closes the Iu conn (while keeping the PDP Context
activated), the SGSN updates the GGSN to point the GTPU tunnel to
itself. Unfortunately, only the IP address was being updated while the
TEID was kept the same (the one from the RNC).
As a result, when new MT data arrived at the GGSN, it would forward it
over GTPU to the SGSN using the incorrect RNC TEID, which the libgtp
stack at osmo-sgsn would silently drop due to not being known (because
it was >PDP_MAX=1024).
The issue can be triggered in test SGSN_Tests_Iu.TC_pmm_idle_rx_mt_data.
Related: OS#5773
Related: SYS#5435
Change-Id: I782aa43c71569922a945bd44544bb1388bf8c878
This is required as per TS 28.060 to tell the GGSN that the remote
Address/TEID it is receiving it's the one of the RNC.
Upon receiving a GTPU Error Indication, the GGSN knowing it's using
DirectTunnel, can then update the SGSN with UpdatePDPContextReq with
Direct Tunnel Flags DTI=1 EI=1 and then the SGSN can decide whether
reconfigure the Direct Tunnel or switch to 2-leg tunnel until the
connection with RNC/UE can be reestablished.
Depends: osmo-ggsn.git Change-Id Ia3e360a35d30858eab1e438dc2508fd756c2e22e
Related: SYS#5435
Change-Id: Iefe73eeea41df0c55db673194c9e9547504cbf0d
Scenario: UE activates a PDP context, then after a while goes PMM IDLE
(Iu conn is destroyed but PDP is kept).
When UE connects through Iu again, it sends eg. RAU or ServiceRequest
with pdp_status bitmask statis the active NSAPIs.
If some NSAPI (PDP context) is enabled at SGSN but doesn't show up in
the bitmask, SGSN will destroy the PDP context with GGSN
(DeletePDPContextReq) towards GGSN prior to re-creating it.
When SGSN receives the DeletePDPContextResp, it would forward a
DeactivatePDPContextReq to the UE for a PDP context which was not known
by the UE anymore, this is wrong.
With this patch, the state of the NSAPI/PDP at the UE side is tracked,
and used to know whether when the PDP gets deleted on the GGSN side then
it needs to also be deleted on the Iu side.
Change-Id: I0ccd9228d71c29248b5f510356dbfdb09565dc30
Be consistent with osmo-ggsn, and set the state dir to
/var/lib/osmocom/osmo-sgsn. Without this patch, it defaults to the
current directory, which means in case of running with the systemd
service, /var/lib/osmocom.
Copy osmo-sgsn.cfg and osmo-sgsn-accept-all.cfg to the tests dir and do
not set the state-dir there. Usually the user that runs the VTY and CTRL
tests is not allowed to write to /var/lib/osmocom. (I've also tried
generating these on the fly, but that breaks in 'make distcheck', as I
would need to write to the source dir or would need to change
osmo-python-tests etc. to read the config file from another directory.)
Related: osmo-ggsn I5b51529b4f8bd2462e54f58a1ce2e2d7c76ff46a
Depends: osmo-python-tests Ic312d546da1c21f68a80b6a188616ef9bc84f4c6
Change-Id: I309807ff0bc125d4653222b2b4ba69ded3bbff70
Remove SysV init scripts. These are not really maintained anymore and
this makes it consistent with other Osmocom projects.
Avoids synchronizing with SysV scripts on debian:
# systemctl enable osmo-gtphub
Synchronizing state of osmo-gtphub.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable osmo-gtphub
Change-Id: I9008944369314a4cbb345bfbf01bdb57aa7590fb
Prepare to change the state-dir in the default config in a follow-up
commit. Create the directory if it does not exist.
Change-Id: I8db4898cdaa2fcbd6bbf7c543764b9cdf828de83
Do not attempt to change permissions/ownership if the package gets
upgraded from a version higher than the next release.
Do not fail if the user deleted the config file.
Be verbose when changing permissions.
Related: OS#4107
Change-Id: I2b01a7625cf66fbb7d203f939ddcc1cbab43cf33
As was reported in OS#6442, nano3g S16 is unhappy when CS and PS
domains use different UEA configuration for simultaneous RANAP
connections. Bring osmo-sgsn in sync with osmo-msc to avoid this.
Change-Id: I4eb9451b4267fc1436ed90a55ff200cf36f16bf6
Related: OS#6442
* Explicitly chown /var/lib/osmocom to osmocom:osmocom, instead of
relying on systemd to do it when the service starts up. This does not
work with the systemd versions in debian 10 and almalinux 8.
* deb: Use "useradd" instead of the interactive "adduser" perl script
from Debian. This makes it consistent with how we do it in rpm, and
avoids the dependency on "adduser".
* deb: Consistently use tabs through the file, instead of mixing tabs
and spaces.
* deb: Remove support for the "dpkg-statoverride --list" logic. This
seems to be a rather obscure feature to override permissions for
certain files or directories, for which it does not seem to be a good
idea to make the postinst script less maintainable. Something similar
can be achieved by using your own Osmocom config file in a different
path with different permissions.
Related: OS#4107
Change-Id: I406ff0d625b02991d580c8382aa4be04dba45a00
This turns errors like:
DMM ERROR MM(262420000000038/e2ff704e) Stopping MM timer 3350 but 0 is running
into warnings with a more accurate reason:
DMM NOTICE MM(262420000000037/e2ff704e) Stopping *inactive* MM timer 3350
Change-Id: I56ecad9d8f1049974b0896f6d0e7fc61580155ec
Add the missing "%if 0%{?suse_version}" around %service_del/add
commands, as these are only available on opensuse.
Fix for:
error: line 106: Too many names: %preun -n osmo-gtphub %service_del_preun osmo-gtphub.service
Fixes: a07e6d9c (".deb/.rpm: add osmocom user during package install")
Change-Id: I89802f926bfccc0f7b4bb1ff64115b232b1db022
Create osmocom user & group during package installation.
Fix the configuration dir/files permission to match.
Related: OS#4107
Tweaked-By: Oliver Smith <osmith@sysmocom.de>
Change-Id: I55ce205d4b314d01b2641c8f3d52455c051d6282
This also makes sure it doesn't compile against older libosmogsm gsup
versions which would break ABI.
Change-Id: I0d03d368e73ab62ec631420769f6af91f2ff9987
Related: OS#6091
Depends: libosmocore.git Change-Id 70be3560659c58f24b8db529c4fc85da4bb0ec04