1. 16 Apr, 2020 1 commit
  2. 11 Apr, 2020 1 commit
    • Eric's avatar
      configure.ac: fix libtool issue with clang and sanitizer · 08358b27
      Eric authored
      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: Ib98b84ac156f52ecdbb7ae49eaaea35442527b22
      08358b27
  3. 14 Feb, 2020 2 commits
    • Oliver Smith's avatar
      mslookup_client_mdns_test: no automatic skip · 5424dcb8
      Oliver Smith authored
      Exit with error code if multicast is disabled. The test is disabled by
      default already, so when explicitly enabling it, we should not
      automatically skip it.
      
      Related: OS#4385
      Change-Id: I82022c23fa9c40535f922b12d917efd7e229912b
      5424dcb8
    • Oliver Smith's avatar
      mslookup_client_mdns_test: disable by default · f0e90e6b
      Oliver Smith authored
      Only build and run the test, if --enable-mslookup-client-mdns-test is
      passed to ./configure. Enable that option in jenkins.sh.
      
      Related: OS#4385
      Change-Id: Ie0cd4b0c55a1fbb00c215aeec7dcd0c15805add3
      f0e90e6b
  4. 08 Feb, 2020 1 commit
    • axilirator's avatar
      db: fix possible SQLite3 allocated memory leak in db_open() · 15ad7bef
      axilirator authored
      From https://sqlite.org/c3ref/exec.html:
      
        To avoid memory leaks, the application should invoke sqlite3_free()
        on error message strings returned through the 5th parameter of
        sqlite3_exec() after the error message string is no longer needed.
        If the 5th parameter to sqlite3_exec() is not NULL and no errors
        occur, then sqlite3_exec() sets the pointer in its 5th parameter
        to NULL before returning.
      
      Change-Id: Ic9ed9bad3165bc4a637fe963f51e923f012e19ac
      Fixes: CID#208182
      15ad7bef
  5. 31 Jan, 2020 1 commit
  6. 29 Jan, 2020 1 commit
  7. 14 Jan, 2020 3 commits
  8. 13 Jan, 2020 8 commits
    • Oliver Smith's avatar
      mslookup_client_mdns.c: fix dereferencing null · 89afb7f7
      Oliver Smith authored
      Fixes: CID#207545
      Change-Id: I0f7fbbdb663304bd5214cba4a6e4abe1dd165cfa
      89afb7f7
    • Oliver Smith's avatar
      mdns_msg.c: always call va_end · b1775162
      Oliver Smith authored
      Fixes: CID#207546
      Change-Id: I39829e78619a6412618e1140ff9b1185bad975bd
      b1775162
    • Oliver Smith's avatar
      mslookup_client.c: fix dereferencing null pointer · f55f6059
      Oliver Smith authored
      Fixes: CID#207547
      Change-Id: If19e1e68fad76a3d65788ac208da7dde1f8745c1
      f55f6059
    • neels's avatar
      fix missing braces in LOGP_GSUP_FWD · fbe49295
      neels authored
      Change-Id: I8634ea8822c8ccba4081014c5540f2b6a229fc7e
      fbe49295
    • Oliver Smith's avatar
      contrib/dgsm/ add example esme and dialplan · e53a34a7
      Oliver Smith authored
      Add example scripts for the distributed GSM network:
      
      esme_dgsm.py: connect to the SMPP port of OsmoMSC A and forward SMS to the SMPP
      port of OsmoMSC B. The IP and port of OsmoMSC B is retrieved by the receiver's
      MSISDN using osmo-mslookup-client.
      
      contrib/dgsm/freeswitch_dialplan_dgsm.py: resolve the destination SIP servers
      of calls with osmo-mslookup-client and bridge the calls accordingly.
      
      For a detailed overview of the D-GSM and mslookup related files, please see the
      elaborate comment at the top of mslookup.c (already added in an earlier patch).
      
      Related: OS#4254
      Related: OS#4255
      Change-Id: I26e8dd8d9a08187fccb3e74ee91366bc24f6c608
      e53a34a7
    • neels's avatar
      add osmo-mslookup-client program (#2) · 52ef60fe
      neels authored
      Standalone program using libosmo-mslookup to easily integrate with programs
      that want to connect services (SIP, SMS,...) to the current location of a
      subscriber. Also useful for manual testing.
      
      For a detailed overview of the D-GSM and mslookup related files, please see the
      elaborate comment at the top of mslookup.c (already added in an earlier patch).
      
      Resubmit of 637bbfcd after revert in
      41fe3625.
      
      Change-Id: Ie39d30e20461ab10ae3584863d8bfc6b76a12f37
      52ef60fe
    • Oliver Smith's avatar
      add mDNS lookup method to libosmo-mslookup (#2) · 3a9f2679
      Oliver Smith authored
      Add the first actually useful lookup method to the mslookup library: multicast
      DNS.
      
      The server side is added in a subsequent commit, when the mslookup server is
      implemented for the osmo-hlr program.
      
      Use custom DNS encoding instead of libc-ares (which we use in OsmoSGSN
      already), because libc-ares is only a DNS client implementation and we will
      need both client and server.
      
      Resubmit of f10463c5 after being
      reverted in 110a49f6. This new version
      skips the mslookup_client_mdns test if multicast is not supported in the
      build environment. I have verified that it doesn't break the build
      anymore in my own OBS namespace.
      
      Related: OS#4237, OS#4361
      Patch-by: osmith, nhofmeyr
      Change-Id: I3c340627181b632dd6a0d577aa2ea2a7cd035c0c
      3a9f2679
    • Oliver Smith's avatar
      Makefile.am: fix pkgconfig_DATA · 5436c77a
      Oliver Smith authored
      Fix building debian packages:
      	dh_install: Cannot find (any matches for) "usr/lib/*/pkgconfig/libosmo-mslookup.pc" (tried in "." and "debian/tmp")
      	dh_install: libosmo-mslookup-dev missing files: usr/lib/*/pkgconfig/libosmo-mslookup.pc
      	dh_install: missing files, aborting
      
      Fixes: bf7deda0 ("add libosmo-mslookup abstract client")
      Change-Id: Ib0bce2d09b41834f7331969eaf7c57a9787f7efb
      5436c77a
  9. 12 Jan, 2020 2 commits
  10. 11 Jan, 2020 1 commit
  11. 10 Jan, 2020 4 commits
    • neels's avatar
      add osmo-mslookup-client program · 637bbfcd
      neels authored
      Standalone program using libosmo-mslookup to easily integrate with programs
      that want to connect services (SIP, SMS,...) to the current location of a
      subscriber. Also useful for manual testing.
      
      For a detailed overview of the D-GSM and mslookup related files, please see the
      elaborate comment at the top of mslookup.c (already added in an earlier patch).
      
      Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7
      637bbfcd
    • Oliver Smith's avatar
      add mDNS lookup method to libosmo-mslookup · f10463c5
      Oliver Smith authored
      Add the first actually useful lookup method to the mslookup library: multicast
      DNS.
      
      The server side is added in a subsequent commit, when the mslookup server is
      implemented for the osmo-hlr program.
      
      Use custom DNS encoding instead of libc-ares (which we use in OsmoSGSN
      already), because libc-ares is only a DNS client implementation and we will
      need both client and server.
      
      Related: OS#4237
      Patch-by: osmith, nhofmeyr
      Change-Id: I03a0ffa1d4dc1b24ac78a5ad0975bca90a49c728
      f10463c5
    • Oliver Smith's avatar
      add libosmo-mslookup abstract client · bf7deda0
      Oliver Smith authored
      mslookup is a key concept in Distributed GSM, which allows querying the current
      location of a subscriber in a number of cooperating but independent core
      network sites, by arbitrary service names and by MSISDN/IMSI.
      
      Add the abstract mslookup client library. An actual lookup method (besides
      mslookup_client_fake.c) is added in a subsequent patch.
      
      For a detailed overview of this and upcoming patches, please see the elaborate
      comment at the top of mslookup.c.
      
      Add as separate library, libosmo-mslookup, to allow adding D-GSM capability to
      arbitrary client programs.
      
      osmo-hlr will be the only mslookup server implementation, added in a subsequent
      patch.
      
      osmo-hlr itself will also use this library and act as an mslookup client, when
      requesting the home HLR for locally unknown IMSIs.
      
      Related: OS#4237
      Patch-by: osmith, nhofmeyr
      Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1
      bf7deda0
    • Alexander Couzens's avatar
      hlr: respect the num_auth_vectors requested · 81b92bbe
      Alexander Couzens authored
      Previous the hlr always returned the maximum possible auth vectors (5)
      to the client. Even when only asked for a single auth vector.
      
      Change-Id: I20c2b648456bc7ba1fc1321a7d42852158a3523c
      81b92bbe
  12. 03 Jan, 2020 1 commit
  13. 10 Dec, 2019 1 commit
    • Oliver Smith's avatar
      tests/auc: change back to python3 · 276c5a77
      Oliver Smith authored
      Change the interpreter of the python script back to python3, as it was
      when the script was initially added in
      Idff9d757ab956179aa41ada2a223fd9f439aafbd. In the meantime, it had been
      changed to python2 to make it work with build slaves that were missing
      python3, but this is not necessary anymore.
      
      This should be merged shortly after osmo-python-tests was migrated to
      python3, and the jenkins build slaves were (automatically) updated to
      have the new osmo-python-tests installed.
      
      Related: OS#2819
      Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7
      Change-Id: Ifbb8f8f5428657a1c2d4d6d1217f8e374be43aba
      276c5a77
  14. 03 Dec, 2019 2 commits
  15. 01 Dec, 2019 1 commit
    • laforge's avatar
      AUC: Add support for setting the AMF separation bit to '1' for EUTRAN · 06f5af22
      laforge authored
      Despite LTE/EUTRAN using the same authentication procedure (UMTS AKA)
      as 3G, there's one difference: The "operator defined" 16bit AMF field
      is reduced to 15 bits, with the first bit now being used as 'separation
      bit'.  That bit should be '0' for 2G/3G (as it is right now) and '1'
      for authentication vectores generated for authentication over
      EUTRAN/EPS.
      
      Depends: libosmocore I93850710ab55a605bf61b95063a69682a2899bb1 (OSMO_GSUP_RAT_TYPES_IE)
      Change-Id: Ic766bc40f6126bb479bd0a05b0e96bec3e240008
      06f5af22
  16. 27 Nov, 2019 1 commit
    • neels's avatar
      db v4: add column last_lu_seen_ps · 07e1602d
      neels authored
      Location Updating procedures from both CS and PS overwrite the same
      last_lu_seen field of a subscriber. For upcoming D-GSM it will be important to
      distinguish those, because only CS attaches qualify for MSISDN lookup.
      
      Add column last_lu_seen_ps, and upon PS LU, do not overwrite last_lu_seen, so
      that last_lu_seen now only reflects CS LU.
      
      In the VTY, dump both LU dates distinctively.
      
      Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba
      07e1602d
  17. 25 Nov, 2019 7 commits
    • neels's avatar
      test_nodes.vty: tweak: add some '?' checks · abdfdb8a
      neels authored
      I added these "by accident" when implementing D-GSM related VTY tests, now
      submitting them separately.
      
      Change-Id: I92a4245cae806270b00330403cc114017ab7af53
      abdfdb8a
    • neels's avatar
      remove gsup_test · 7355d0dd
      neels authored
      The test doesn't do much: it encodes an Insert Subscriber Data request for the
      sole purpose to ensure the msgb is allocated large enough. A bug like that is
      easily avoided statically.
      
      Also, the lu functions will get refactored soon, it doesn't make sense to me to
      drag this test along.
      
      Change-Id: I42e1c72bf4cce8034f968cd4392773bf2b643c1b
      7355d0dd
    • neels's avatar
      Makefile convenience: add VTY_TEST var to run only one test · 6b305b4c
      neels authored
      VTY transcript tests run all *.vty test scripts, and it is not so
      trivial to figure out the test-db creation and cmdline to run only one
      of them when debugging. Add VTY_TEST var, useful to pick one test on the
      cmdline:
      
        cd tests
        make vty-test VTY_TEST=test_nodes.vty
      
      Not all VTY tests leave files behind that match hlr_vty_test.db-*, so
      make sure that make does not fail it they can't be deleted (rm -f).
      
      Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375
      6b305b4c
    • neels's avatar
      add osmo_gsup_msgb_alloc() · a7d0f87e
      neels authored
      Throughout osmo-hlr's code, the GSUP msgb allocation is duplicated as:
      
        msgb_alloc_headroom(1024+16, 16, "foo");
      
      Instead, use one common function to keep the magic numbers in one place.
      
      Change-Id: I40e99b5bc4fd8f750da7643c03b2119ac3bfd95e
      a7d0f87e
    • neels's avatar
      db upgrade: remove some code dup · 981e1266
      neels authored
      Instead of a switch() for each version number with identical switch cases
      except for the function name, use an array of function pointers and loop.
      
      Also print a success message after each individual version upgrade, instead of
      only one in the end (see change in db_upgrade_test.ok).
      
      Change-Id: I1736af3d9a3f02e29db836966ac15ce49f94737b
      981e1266
    • neels's avatar
      fix upgrade test in presence of ~/.sqliterc · 7143f3a0
      neels authored
      db_upgrade_test.sh:
      
      - If an ~/.sqliterc file exists, it causes output of '-- Loading resources from
        ~/.sqliterc'. Use -batch option to omit that.
      
      - To make sure that column headers are off when required, add -noheaders in
        some places.
      
      Change-Id: I279a39984563594a4a3914b2ce3d803ad9468fe8
      7143f3a0
    • Oliver Smith's avatar
      gitignore: add tests/db_upgrade/*.dump · f0968798
      Oliver Smith authored
      Change-Id: I0dca7a94883bbe69151d919ae204edfff12288ab
      f0968798
  18. 20 Nov, 2019 1 commit
    • neels's avatar
      move headers to include/osmocom/hlr · 2f75803e
      neels authored
      Apply the same headers structure that we keep in most Osmocom source trees:
      Keep noinst_HEADERS in include/osmocom/hlr and include them using
        #include <osmocom/hlr/*.h>
      
      The only header kept in src/ is db_bootstrap.h, because it is generated during
      build time. If it was built in include/osmocom/hlr, we would need db.o to
      depend on db_bootstrap.h in a different subdir, which automake can't do well.
      
      Change-Id: Ic912fe27f545b85443c5fb713d8c3c8aac23c9ad
      2f75803e
  19. 12 Nov, 2019 1 commit
    • neels's avatar
      db.c: code dup: add db_run_statements() for arrays of statements · 7f4dd116
      neels authored
      The db bootstrap as well as the upgrade code all execute a number of
      statements, and have massive code dup around each statement execution. Instead
      have one db_run_statements() that takes an array of strings and runs all.
      
      Change-Id: I2721dfc0a9aadcc7f5ac81a1c0fa87452098996f
      7f4dd116