Commit Graph

53 Commits

Author SHA1 Message Date
Oliver Smith 29532c2a06 === Split osmo-gbproxy from osmo-sgsn ===
Adjust the build system, packaging etc. to split osmo-gbproxy into its
own git repository. Remove tests and configs that aren't related to
osmo-gbproxy.

Related: OS#4992
2021-01-29 16:57:29 +01:00
Alexander Couzens 78e56f15c4 configure.ac: define a c standard instead of using the compilers default
Change-Id: I9867adbed211db0a7b42ac3557f56c3042a67936
2021-01-08 02:32:33 +00:00
Harald Welte d09ffc2b89 gbproxy: Delete gbproxy_test
The test is actually performing invalid operations such as
sending empty NS packets without even a BSSGP header - and assumes
that gbproxy should route those.

Given that we have a much more comprehensive tset suite in
GBProxy_Tests.ttcn in osmo-ttch3-hacks.git, it makes sense to remove
the testsuite.  It may contain many more wrong assumptions, or
assumptions that no longer hold true with the "gbproxy 2020".

Change-Id: I053aebab6bf5d0ee955f2221bf27925b36140cf3
2020-12-07 18:22:20 +01:00
Daniel Willmann 3696dce679 gbproxy: Change generic LOG messages so BVCI/NSEI fmt is consistent
We actually need to alter our compiler flags to avoid -Werror=trigraphs
creating trouble:

gb_proxy.c: In function ‘block_unblock_peer’:
gb_proxy.c:875:37: error: trigraph ??) ignored, use -trigraphs to enable [-Werror=trigraphs]
  875 |   LOGP(DGPRS, LOGL_ERROR, "BVC(%05u/??) Cannot find BSS\n",
      |

Fixes: SYS#5233
Change-Id: I93296353dd964602699480faae1248096e331c6a
2020-12-02 22:42:42 +01:00
Daniel Willmann 45cf0d1453 configure.ac: Require python3 for ext_tests
The python scripts already use #!/usr/bin/env python3 so it was pure
coincidence that the tests are working.

Change-Id: I96ac31e7862fe102e5baee0c2e25458ff0451a50
2020-11-09 10:54:14 +00:00
Pau Espin e77e5bc8a9 Support setting rt-prio and cpu-affinity mask through VTY
Change-Id: I1af1b154d14de6d6d6fba08f15f167f4b2ed9aa2
Depends: libosmocore.git Change-Id If76a4bd2cc7b3c7adf5d84790a944d78be70e10a
Depends: osmo-gsm-masnuals.git Change-Id Icd75769ef630c3fa985fc5e2154d5521689cdd3c
Related: SYS#4986
2020-08-18 13:50:00 +02:00
Pau Espin 570c407567 configure.ac: Fix trailing whitespace
Change-Id: I5abdce5daef43dad772bf52576b47c0867d65c98
2020-08-18 13:45:09 +02:00
Oliver Smith a40ccf6b3c contrib: integrate RPM spec
Remove OpenSUSE bug report link, set version to @VERSION@, make it build
with CentOS 8 etc.

Related: OS#4550
Change-Id: I824b67f2d590ac2aa9f2e4fa4387a5283cf22521
2020-05-19 16:49:33 +02:00
Eric Wild 9a69cf3685 configure.ac: fix libtool issue with clang and sanitizer
As pointed out at https://github.com/libexpat/libexpat/issues/312
libtool does not play nice with clang sanitizer builds at all.
For those builds LD shoud be set to clang too (and LDFLAGS needs the
sanitizer flags as well), because the clang compiler driver knows how
linking to the sanitizer libs works, but then at a later stage libtool
fails to actually produce the shared libraries and the build fails. This
is fixed by this patch.

Addtionally LD_LIBRARY_PATH has no effect on conftest runs during
configure time, so the rpath needs to be set to the asan library path to
ensure the configure run does not fail due to a missing asan library,
i.e.:

SANS='-fsanitize=memory -fsanitize-recover=all -shared-libsan'
export CC=clang-10
ASANPATH=$(dirname `$CC -print-file-name=libclang_rt.asan-x86_64.so`)
export LDFLAGS="-Wl,-rpath,$ASANPATH $SANS $LDFLAGS"

Change-Id: I7402b019c191304f639806a3c29e6bb698b398ed
2020-04-11 01:04:28 +02:00
Eric Wild a9a289fbd0 tests: dlopen does not imply availability of dlsym..
Check for both.

Change-Id: If41a20bf499f791432f5f207e40688e97fb6e9f7
2020-04-11 01:04:08 +02:00
Pau Espin 379e75aac2 Bump version: 1.5.0.91-5997-dirty → 1.6.0
Change-Id: I99e6950db3f54c6291dd259bed9b5c46cc26c465
2020-01-03 19:17:56 +01:00
Pau Espin a3646fb494 Move out sgsn to its own subdir
Change-Id: I16fccc0eadf588599b9e5578d0f4dbaf9df81737
2019-09-02 14:03:04 +02:00
Pau Espin 13fdd51440 Move out gtphub to its own subdir
Change-Id: I707d5e9b775179e732d281ce3d245de83d648eea
2019-09-02 14:03:04 +02:00
Pau Espin 1ddefb12e4 Move out gbproxy to its own subdir
Change-Id: I2cc98d3a276d953609bbbbaa9782a0112687791e
2019-09-02 14:03:04 +02:00
Pau Espin d91102f53a Require newer versions of dependencies
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-08 16:44:05 +02:00
Eric Wild d855b30f07 turn -Werror=null-dereference into a warning
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-22 19:57:02 +00:00
Harald Welte e250eaaf2e Bump version: 1.3.0.120-88220-dirty → 1.4.0
Change-Id: I9d37bb897d34ad973e93706003bdecc0cf6be816
2019-01-23 18:32:41 +01:00
Max d53a215d24 Drop unused osmo-sgsn.pc
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
2018-12-10 18:05:58 +00:00
Oliver Smith 4a1d805431 build manuals moved here from osmo-gsm-manuals.git
Moved to doc/manuals/, with full commit history, in preceding merge commit.
Now incorporate in the build system.

Build with:

$ autoreconf -fi
$ ./configure --enable-manuals
$ make

Shared files from osmo-gsm-manuals.git are found automatically if
- the repository is checked out in ../osmo-gsm-manuals; or
- if it osmo-gsm-manuals was installed with "make install"; or
- OSMO_GSM_MANUALS_DIR is set.

Related: OS#3385
Change-Id: I0477d7c871413bd90b365d3064bac3cba23a0883
2018-11-27 18:10:43 +01:00
Harald Welte d8f894550e Remove local libgsupclient; Use libosmo-gsup-client from osmo-hlr
osmo-hlr has recently (as of Change-Id
Iad227bb477d64da30dd6bfbbe1bd0c0a55be9474) a working shared library
implementation of libosmo-gsup-client.

We can remove the local implementation in osmo-sgsn and use the
system-installed shared library instead.

Change-Id: I6f542945403cf2e3ddac419186b09ec0e2d43b69
2018-10-30 18:30:36 +01:00
Pau Espin 6a1273382c Install systemd services with autotools
Change-Id: I103bf3468d53578045593eac31b61f7e0248495e
2018-09-13 11:52:30 +02:00
Harald Welte 2a7a41a5af migrate to oap_client in libosmogsm
libosmogsm in libosmocore.git from Change-Id
Ie36729996abd30b84d1c30a09f62ebc6a9794950 onwards contains oap_client.c,
so we don't need our local copy here in this repo anymore.

Change-Id: I7b194f98ef3f925b6178d8a8dbd9fcf2f0c6e132
Requires: libosmocore.git Change-Id Ie36729996abd30b84d1c30a09f62ebc6a9794950
2018-07-30 18:35:34 +02:00
Pau Espin 54936e9899 Bump version: 1.2.0.58-85ca87-dirty → 1.3.0
Change-Id: I466089b40fed02153e2850cb4a748ee6568b130b
2018-05-03 19:01:44 +02:00
Neels Hofmeyr f1474f5fc8 configure: add --enable-werror
Provide a sane means of adding the -Werror compiler flag.

Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"',
but that actually *overwrites* all the other CFLAGS we might want to have set.

Maintain these exceptions from -Werror:
a) deprecation (allow upstream to mark deprecation without breaking builds);
b) "#warning" pragmas (allow to remind ourselves of errors without breaking
   builds)

As a last configure step before generating the output files, print the complete
CFLAGS and CPPFLAGS by means of AC_MSG_RESULT.

Change-Id: Ifea235feb073a276302436936e908d9125c77a82
2018-03-13 00:03:52 +00:00
Alexander Couzens 79663b3dbd mandatory depend on libc-ares and libgtp
Both library are required to build osmo-sgsn.
The optional dependency was correct when osmo-sgsn
was part of openbsc.

Change-Id: Id608165ae490cb6c84aac1fe70412b2cb2b2587b
2018-02-08 09:42:39 +00:00
Pau Espin cec01d30a7 configure.ac: Enable Wall in CFLAGS
Change-Id: I042b4918bc74955cc5162fad8c16d989402c29a1
2018-01-23 16:17:21 +01:00
Max 6a922c529f Remove obsolete ./configure option
The '--enable-vty-tests' is just alias to '--enable-external-tests'
anyway.

Change-Id: I6230cfcf10247b601e16e7b872305499815520a9
2017-12-28 13:00:51 +01:00
Max ca7be8a5c2 Migrate from OpenSSL to osmo_get_rand_id()
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-27 11:10:42 +00:00
Max 8a58bcdaad Remove unneeded .py scripts
The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for
vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py
are not SGSN-specific: leftovers from repository split which are now
available in osmo-python-tests as well.

Change-Id: I3ef4ca790878921a5846f64942a8de8a6ff9c11c
2017-12-19 18:21:13 +01:00
Alexander Couzens 6a5f21c2aa configure.ac: remove unused libcdk check
libcdk isn't used

Change-Id: Iea2d61b34e9242bf59a1eb242c5cf1d82f625f2e
2017-12-16 20:31:17 +01:00
Alexander Couzens 404bc49cbb configure.ac: remove pcap check
libpcap isn't used in osmo-sgsn

Change-Id: I47880dba1f6855f31b5b6481eeb1027abc2a2671
2017-12-16 20:31:17 +01:00
Pau Espin 266b61abc6 tests: Fix selection of python version
According to documentation (and personal experience), AM_PATH_PYTHON
selects the highest version of python, no matter if major version is
different, which means if both python2 and 3 are available, 3 will be
chosen an PYTHON will point to "/.../python" which is python3. Apparently,
the macro cannot be easily used to pick highest python2 version.

As {vty,ctrl}_test_runner.py require python2 and are incompatible with
python3, let's instead rely on the system having a "python2" binary
available, which is the case in most distros.

Change-Id: If8e57924ed2c8da7ab7692f58a4bb5c5a970484f
2017-11-28 20:08:19 +01:00
Neels Hofmeyr 4984c497fd add --enable-sanitize config option
Change-Id: I3be01e0682b479a71c545f718b68c441a1011b0f
2017-11-18 10:16:52 +00:00
Philipp Maier d394c6c8de configure: fix libosmo-sigtran dependency
the configure script requires libosmo-sigtran even when IU is not
enabled.

move the line that checks for libosmo-sigtran into the conditional
branch for IU

Change-Id: I72819462db0b4656fabaa80731342d06ae91fcdf
2017-10-25 13:12:38 +00:00
Max ab65401d37 Use extended logging for PDP contexts
Log additional details (IMSI, NSAPI etc) on PDP context
creation/deletion by using appropriate LOGP() wrappers.

Change-Id: I91a126952ae75ae9ba1f42aac4d26413384bba5d
Related: SYS#3610
2017-10-02 08:38:12 +00:00
Max a8aa4923e7 Cleanup configure checks
* remove unused sqlite3 check
* remove unused NAT/SMPP/BSC/MGCP test checks

Change-Id: I83ae896f57cfb4cb139a42fbf3d77d4b11313f65
2017-10-02 08:37:57 +00:00
Pau Espin 5878db0e5e Remove unneeded dep libdbi
This dependency is not needed and it's most probably a left over from
openbsc git repository split.

Change-Id: I84b0e2851dc89dca39e87215c71e93457acb884f
2017-09-25 18:46:28 +02:00
Neels Hofmeyr 4b4c586f03 move include/openbsc to include/osmocom/sgsn
Change-Id: I281ef585fffc2644682c8282224fb1c2da5ca795
2017-09-06 16:47:47 +02:00
Neels Hofmeyr a759e3a07a move openbsc.pc to osmo-sgsn.pc
Change-Id: Iad28d85b2a6d175cbe5d506aa82e7e4d94111eff
2017-09-06 16:47:47 +02:00
Neels Hofmeyr a2ea72915c configure.ac: set name to osmo-sgsn, fix ML addr
Change-Id: I47e9f2307b42d171f2ceeda1e129e2311f611883
2017-09-06 16:47:47 +02:00
Neels Hofmeyr 62507c5b8d split off osmo-sgsn: remove files, apply build
Change-Id: I5d27ff93e56cd13e0e70edd15e2080201e35e91f
2017-08-30 14:14:58 +02:00
Neels Hofmeyr 85012f544b move to osmo-mgw.git: osmo-bsc_mgcp and libmgcp as libosmo-legacy-mgcp
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-30 14:12:37 +02:00
Neels Hofmeyr 5e40da646b move libiu to osmo-iuh/libosmo-ranap
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-30 14:12:37 +02:00
Philipp Maier 68760a8659 Implement AoIP, port to M3UA SIGTRAN (large addition and refactoring)
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-30 14:12:37 +02:00
Max 938cf56464 Use release helper from libosmocore
See
https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_release
for details.

Change-Id: I869395d5c9ab5ec1a487aff15418d1517f47e831
Related: OS#1861
2017-08-30 14:12:37 +02:00
Harald Welte c3187151ec increase libsmpp34 version requirement to 1.12
Only 1.12 contains some of the #defines that we're using with recent
commits.

Change-Id: I3743b10a1a5d2f1d42a61204273c1d00dc22b600
2017-08-27 17:40:55 +02:00
Neels Hofmeyr d489ea3810 Implement IuCS (large refactoring and addition)
osmo-nitb becomes osmo-msc
add DIUCS debug log constant
add iucs.[hc]
add msc vty, remove nitb vty
add libiudummy, to avoid linking Iu deps in tests
Use new msc_tx_dtap() instead of gsm0808_submit_dtap()
libmgcp: add mgcpgw client API
bridge calls via mgcpgw

Enable MSC specific CTRL commands, bsc_base_ctrl_cmds_install() still needs to
be split up.

Change-Id: I5b5b6a9678b458affa86800afb1ec726e66eed88
2017-08-27 17:40:53 +02:00
Neels Hofmeyr 684caa4152 cosmetic: make osmo-python-tests dependency more accurate
Change-Id: I4f84a13b7fa6ec4173bdc155e6114d4d7328b619
2017-08-27 17:40:52 +02:00
Neels Hofmeyr 3dc2c6438e Add msc_vlr test suite for MSC+VLR end-to-end tests
Change-Id: If0e7cf20b9d1eac12126955b2f5f02bd8f1192cd
2017-08-27 17:40:52 +02:00
Harald Welte 44b1d6ca24 Use libvlr in libmsc (large refactoring)
Original libvlr code is by Harald Welte <laforge@gnumonks.org>,
polished and tweaked by Neels Hofmeyr <nhofmeyr@sysmocom.de>.

This is a long series of trial-and-error development collapsed in one patch.
This may be split in smaller commits if reviewers prefer that. If we can keep
it as one, we have saved ourselves the additional separation work.

SMS:

The SQL based lookup of SMS for attached subscribers no longer works since the
SQL database no longer has the subscriber data. Replace with a round-robin on
the SMS recipient MSISDNs paired with a VLR subscriber RAM lookup whether the
subscriber is currently attached.

If there are many SMS for not-attached subscribers in the SMS database, this
will become inefficient: a DB hit returns a pending SMS, the RAM lookup will
reveal that the subscriber is not attached, after which the DB is hit for the
next SMS. It would become more efficient e.g. by having an MSISDN based hash
list for the VLR subscribers and by marking non-attached SMS recipients in the
SMS database so that they can be excluded with the SQL query already.

There is a sanity limit to do at most 100 db hits per attempt to find a pending
SMS. So if there are more than 100 stored SMS waiting for their recipients to
actually attach to the MSC, it may take more than one SMS queue trigger to
deliver SMS for subscribers that are actually attached.

This is not very beautiful, but is merely intended to carry us over to a time
when we have a proper separate SMSC entity.

Introduce gsm_subscriber_connection ref-counting in libmsc.

Remove/Disable VTY and CTRL commands to create subscribers, which is now a task
of the OsmoHLR. Adjust the python tests accordingly.

Remove VTY cmd subscriber-keep-in-ram.

Use OSMO_GSUP_PORT = 4222 instead of 2222. See
I4222e21686c823985be8ff1f16b1182be8ad6175.

So far use the LAC from conn->bts, will be replaced by conn->lac in
Id3705236350d5f69e447046b0a764bbabc3d493c.

Related: OS#1592 OS#1974
Change-Id: I639544a6cdda77a3aafc4e3446a55393f60e4050
2017-08-27 17:40:52 +02:00