Changes of Revision 4

osmo-hlr.spec Changed
x
 
1
@@ -15,13 +15,14 @@
2
 
3
 Name:           osmo-hlr
4
 Requires: osmocom-latest
5
-Version:  1.5.0
6
+Version: 1.6.0
7
 Release:        0
8
 Summary:        Osmocom Home Location Register for GSUP protocol towards OsmoSGSN and OsmoCSCN
9
 License:        AGPL-3.0-or-later AND GPL-2.0-or-later
10
 Group:          Productivity/Telephony/Servers
11
 URL:            https://osmocom.org/projects/osmo-hlr
12
-Source:  osmo-hlr_1.5.0.tar.xz
13
+Source: osmo-hlr_1.6.0.tar.xz
14
+Source1: rpmlintrc
15
 BuildRequires:  autoconf
16
 BuildRequires:  automake
17
 BuildRequires:  libtool
18
@@ -30,11 +31,11 @@
19
 %if 0%{?suse_version}
20
 BuildRequires:  systemd-rpm-macros
21
 %endif
22
-BuildRequires:  pkgconfig(libosmoabis) >= 1.3.0
23
-BuildRequires:  pkgconfig(libosmocore) >= 1.7.0
24
-BuildRequires:  pkgconfig(libosmoctrl) >= 1.7.0
25
-BuildRequires:  pkgconfig(libosmogsm) >= 1.7.0
26
-BuildRequires:  pkgconfig(libosmovty) >= 1.7.0
27
+BuildRequires:  pkgconfig(libosmoabis) >= 1.4.0
28
+BuildRequires:  pkgconfig(libosmocore) >= 1.8.0
29
+BuildRequires:  pkgconfig(libosmoctrl) >= 1.8.0
30
+BuildRequires:  pkgconfig(libosmogsm) >= 1.8.0
31
+BuildRequires:  pkgconfig(libosmovty) >= 1.8.0
32
 BuildRequires:  pkgconfig(sqlite3)
33
 BuildRequires:  pkgconfig(talloc) >= 2.0.1
34
 # only needed for populate_hlr_db.pl
35
@@ -78,13 +79,13 @@
36
 This subpackage contains libraries and header files for developing
37
 applications that want to make use of libosmo-gsup-client.
38
 
39
-%package -n libosmo-mslookup0
40
+%package -n libosmo-mslookup1
41
 Requires: osmocom-latest
42
 Summary:        Osmocom MS lookup library
43
 License:        GPL-2.0-or-later
44
 Group:          System/Libraries
45
 
46
-%description -n libosmo-mslookup0
47
+%description -n libosmo-mslookup1
48
 This shared library contains routines for looking up mobile subscribers.
49
 
50
 %package -n libosmo-mslookup-devel
51
@@ -92,7 +93,7 @@
52
 Summary:        Development files for the Osmocom MS lookup library
53
 License:        GPL-2.0-or-later
54
 Group:          Development/Libraries/C and C++
55
-Requires:       libosmo-mslookup0 = %{version}
56
+Requires:       libosmo-mslookup1 = %{version}
57
 
58
 %description -n libosmo-mslookup-devel
59
 This shared library contains routines for looking up mobile subscribers.
60
@@ -113,7 +114,7 @@
61
 subscriber.
62
 
63
 %prep
64
-%setup -q
65
+%setup -n osmo-hlr -q
66
 
67
 %build
68
 echo "%{version}" >.tarball-version
69
@@ -152,8 +153,8 @@
70
 
71
 %post   -n libosmo-gsup-client0 -p /sbin/ldconfig
72
 %postun -n libosmo-gsup-client0 -p /sbin/ldconfig
73
-%post   -n libosmo-mslookup0 -p /sbin/ldconfig
74
-%postun -n libosmo-mslookup0 -p /sbin/ldconfig
75
+%post   -n libosmo-mslookup1 -p /sbin/ldconfig
76
+%postun -n libosmo-mslookup1 -p /sbin/ldconfig
77
 
78
 %files
79
 %license COPYING
80
@@ -185,8 +186,8 @@
81
 %{_libdir}/libosmo-gsup-client.so
82
 %{_libdir}/pkgconfig/libosmo-gsup-client.pc
83
 
84
-%files -n libosmo-mslookup0
85
-%{_libdir}/libosmo-mslookup.so.0*
86
+%files -n libosmo-mslookup1
87
+%{_libdir}/libosmo-mslookup.so.1*
88
 
89
 %files -n libosmo-mslookup-devel
90
 %dir %{_includedir}/osmocom
91
osmo-hlr_1.5.0.dsc -> osmo-hlr_1.6.0.dsc Changed
35
 
1
@@ -1,26 +1,26 @@
2
 Format: 3.0 (native)
3
 Source: osmo-hlr
4
-Binary: osmo-hlr, osmo-hlr-dbg, libosmo-gsup-client0, libosmo-gsup-client-dev, libosmo-mslookup0, libosmo-mslookup-dev, osmo-mslookup-utils, osmo-hlr-doc
5
+Binary: osmo-hlr, osmo-hlr-dbg, libosmo-gsup-client0, libosmo-gsup-client-dev, libosmo-mslookup1, libosmo-mslookup-dev, osmo-mslookup-utils, osmo-hlr-doc
6
 Architecture: any all
7
-Version: 1.5.0
8
+Version: 1.6.0
9
 Maintainer: Osmocom team <openbsc@lists.osmocom.org>
10
 Homepage: https://projects.osmocom.org/projects/osmo-hlr
11
 Standards-Version: 3.9.6
12
 Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-hlr
13
 Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-hlr
14
-Build-Depends: debhelper (>= 9), pkg-config, dh-autoreconf, autotools-dev, python3-minimal, libosmocore-dev (>= 1.7.0), libosmo-abis-dev (>= 1.3.0), libosmo-netif-dev (>= 1.2.0), libsqlite3-dev, sqlite3, osmo-gsm-manuals-dev (>= 1.3.0)
15
+Build-Depends: debhelper (>= 9), pkg-config, dh-autoreconf, autotools-dev, python3-minimal, libosmocore-dev (>= 1.8.0), libosmo-abis-dev (>= 1.4.0), libosmo-netif-dev (>= 1.3.0), libsqlite3-dev, sqlite3, osmo-gsm-manuals-dev (>= 1.4.0)
16
 Package-List:
17
  libosmo-gsup-client-dev deb net optional arch=any
18
  libosmo-gsup-client0 deb libs optional arch=any
19
  libosmo-mslookup-dev deb net optional arch=any
20
- libosmo-mslookup0 deb libs optional arch=any
21
+ libosmo-mslookup1 deb libs optional arch=any
22
  osmo-hlr deb net optional arch=any
23
  osmo-hlr-dbg deb debug extra arch=any
24
  osmo-hlr-doc deb doc optional arch=all
25
  osmo-mslookup-utils deb utils optional arch=any
26
 Checksums-Sha1:
27
- 0670110acba6b51b9e1f9f27cafb4cb0c7b1581a 171872 osmo-hlr_1.5.0.tar.xz
28
+ 962367515c78ae0f2098293f3ea9985ce7dd5eea 172096 osmo-hlr_1.6.0.tar.xz
29
 Checksums-Sha256:
30
- 8cf694124d443619b05a12838e308b137a5b7a0c10766db01860cd8731c1dbb5 171872 osmo-hlr_1.5.0.tar.xz
31
+ 91eabd5b6343ea90cf12fc000ed6c959b854f10ceca4724b0cd6a1ab6d05028c 172096 osmo-hlr_1.6.0.tar.xz
32
 Files:
33
- b80a9edb0732c6c5b4c9b315a729bd8e 171872 osmo-hlr_1.5.0.tar.xz
34
+ 5dfae2988995f37d795ee3b5d5942751 172096 osmo-hlr_1.6.0.tar.xz
35
osmo-hlr_1.5.0.tar.xz/.tarball-version -> osmo-hlr_1.6.0.tar.xz/.tarball-version Changed
5
 
1
@@ -1 +1 @@
2
-1.5.0
3
\ No newline at end of file
4
+1.6.0
5
osmo-hlr_1.5.0.tar.xz/configure.ac -> osmo-hlr_1.6.0.tar.xz/configure.ac Changed
26
 
1
@@ -41,11 +41,11 @@
2
 
3
 PKG_CHECK_MODULES(TALLOC, talloc >= 2.0.1)
4
 
5
-PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.7.0)
6
-PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.7.0)
7
-PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.7.0)
8
-PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.7.0)
9
-PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.3.0)
10
+PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.8.0)
11
+PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.8.0)
12
+PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.8.0)
13
+PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.8.0)
14
+PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.4.0)
15
 
16
 PKG_CHECK_MODULES(SQLITE3, sqlite3)
17
 
18
@@ -93,6 +93,7 @@
19
 if test x"$werror" = x"yes"
20
 then
21
    WERROR_FLAGS="-Werror"
22
+   WERROR_FLAGS+=" -Werror=implicit-int -Werror=int-conversion -Werror=old-style-definition"
23
    WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations"
24
    WERROR_FLAGS+=" -Wno-error=cpp" # "#warning"
25
    CFLAGS="$CFLAGS $WERROR_FLAGS"
26
osmo-hlr_1.5.0.tar.xz/contrib/osmo-hlr.spec.in -> osmo-hlr_1.6.0.tar.xz/contrib/osmo-hlr.spec.in Changed
97
 
1
@@ -14,6 +14,7 @@
2
 # published by the Open Source Initiative.
3
 
4
 Name:           osmo-hlr
5
+Requires: osmocom-latest
6
 Version:        @VERSION@
7
 Release:        0
8
 Summary:        Osmocom Home Location Register for GSUP protocol towards OsmoSGSN and OsmoCSCN
9
@@ -29,11 +30,11 @@
10
 %if 0%{?suse_version}
11
 BuildRequires:  systemd-rpm-macros
12
 %endif
13
-BuildRequires:  pkgconfig(libosmoabis) >= 1.3.0
14
-BuildRequires:  pkgconfig(libosmocore) >= 1.7.0
15
-BuildRequires:  pkgconfig(libosmoctrl) >= 1.7.0
16
-BuildRequires:  pkgconfig(libosmogsm) >= 1.7.0
17
-BuildRequires:  pkgconfig(libosmovty) >= 1.7.0
18
+BuildRequires:  pkgconfig(libosmoabis) >= 1.4.0
19
+BuildRequires:  pkgconfig(libosmocore) >= 1.8.0
20
+BuildRequires:  pkgconfig(libosmoctrl) >= 1.8.0
21
+BuildRequires:  pkgconfig(libosmogsm) >= 1.8.0
22
+BuildRequires:  pkgconfig(libosmovty) >= 1.8.0
23
 BuildRequires:  pkgconfig(sqlite3)
24
 BuildRequires:  pkgconfig(talloc) >= 2.0.1
25
 # only needed for populate_hlr_db.pl
26
@@ -52,6 +53,7 @@
27
 services (like supplementary services).
28
 
29
 %package -n libosmo-gsup-client0
30
+Requires: osmocom-latest
31
 Summary:        Osmocom GSUP (General Subscriber Update Protocol) client library
32
 License:        GPL-2.0-or-later
33
 Group:          System/Libraries
34
@@ -62,6 +64,7 @@
35
 and External USSD Entities (EUSEs) using this library to implement clients.
36
 
37
 %package -n libosmo-gsup-client-devel
38
+Requires: osmocom-latest
39
 Summary:        Development files for the Osmocom GSUP client library
40
 License:        GPL-2.0-or-later
41
 Group:          Development/Libraries/C and C++
42
@@ -75,19 +78,21 @@
43
 This subpackage contains libraries and header files for developing
44
 applications that want to make use of libosmo-gsup-client.
45
 
46
-%package -n libosmo-mslookup0
47
+%package -n libosmo-mslookup1
48
+Requires: osmocom-latest
49
 Summary:        Osmocom MS lookup library
50
 License:        GPL-2.0-or-later
51
 Group:          System/Libraries
52
 
53
-%description -n libosmo-mslookup0
54
+%description -n libosmo-mslookup1
55
 This shared library contains routines for looking up mobile subscribers.
56
 
57
 %package -n libosmo-mslookup-devel
58
+Requires: osmocom-latest
59
 Summary:        Development files for the Osmocom MS lookup library
60
 License:        GPL-2.0-or-later
61
 Group:          Development/Libraries/C and C++
62
-Requires:       libosmo-mslookup0 = %{version}
63
+Requires:       libosmo-mslookup1 = %{version}
64
 
65
 %description -n libosmo-mslookup-devel
66
 This shared library contains routines for looking up mobile subscribers.
67
@@ -97,6 +102,7 @@
68
 
69
 
70
 %package -n osmo-mslookup-client
71
+Requires: osmocom-latest
72
 Summary:        Standalone program using libosmo-mslookup
73
 License:        GPL-2.0-or-later
74
 Group:          Development/Libraries/C and C++
75
@@ -146,8 +152,8 @@
76
 
77
 %post   -n libosmo-gsup-client0 -p /sbin/ldconfig
78
 %postun -n libosmo-gsup-client0 -p /sbin/ldconfig
79
-%post   -n libosmo-mslookup0 -p /sbin/ldconfig
80
-%postun -n libosmo-mslookup0 -p /sbin/ldconfig
81
+%post   -n libosmo-mslookup1 -p /sbin/ldconfig
82
+%postun -n libosmo-mslookup1 -p /sbin/ldconfig
83
 
84
 %files
85
 %license COPYING
86
@@ -179,8 +185,8 @@
87
 %{_libdir}/libosmo-gsup-client.so
88
 %{_libdir}/pkgconfig/libosmo-gsup-client.pc
89
 
90
-%files -n libosmo-mslookup0
91
-%{_libdir}/libosmo-mslookup.so.0*
92
+%files -n libosmo-mslookup1
93
+%{_libdir}/libosmo-mslookup.so.1*
94
 
95
 %files -n libosmo-mslookup-devel
96
 %dir %{_includedir}/osmocom
97
osmo-hlr_1.5.0.tar.xz/contrib/systemd/osmo-hlr.service -> osmo-hlr_1.6.0.tar.xz/contrib/systemd/osmo-hlr.service Changed
13
 
1
@@ -5,8 +5,11 @@
2
 Service
3
 Type=simple
4
 Restart=always
5
+StateDirectory=osmocom
6
+WorkingDirectory=%S/osmocom
7
 ExecStart=/usr/bin/osmo-hlr -c /etc/osmocom/osmo-hlr.cfg -l /var/lib/osmocom/hlr.db
8
 RestartSec=2
9
+ProtectHome=true
10
 
11
 Install
12
 WantedBy=multi-user.target
13
osmo-hlr_1.5.0.tar.xz/debian/changelog -> osmo-hlr_1.6.0.tar.xz/debian/changelog Changed
44
 
1
@@ -1,3 +1,42 @@
2
+osmo-hlr (1.6.0) unstable; urgency=medium
3
+
4
+   Vadim Yanitskiy 
5
+  * db_auc: hexparse_stmt(): check value returned by osmo_hexparse()
6
+
7
+   Max 
8
+  * Set working directory in systemd service file
9
+  * Ignore .deb build byproducts
10
+  * Debian: bump copyright year to match current
11
+  * Debian: reformat package description
12
+  * systemd: enable basic hardening
13
+  * Debian: install osmo-hlr-dgsm.cfg as example config
14
+  * hlr_vty.c: fix typo
15
+  * ctrl: take both address and port from vty config
16
+
17
+   Harald Welte 
18
+  * Support building with -Werror=strict-prototypes / -Werror=old-style-definition
19
+  * Add -Werror=implicit-int -Werror=int-conversion -Werror=old-style-definition
20
+
21
+   arehbein 
22
+  * osmo-hlr: Transition to use of 'telnet_init_default'
23
+
24
+   Oliver Smith 
25
+  * osmo_mdns_rfc_record_decode: check ret of talloc
26
+  * osmo_mdns_rfc_record_decode: proper free on err
27
+  * mslookup: use apn functions from libosmocore
28
+  * osmo_mdns_rfc_record/question_encode: remove ctx
29
+
30
+   Keith 
31
+  * Vty: Fixup config shown/written from vty
32
+
33
+   Neels Hofmeyr 
34
+  * fix memleak of proxy_subscr_listentry
35
+
36
+   Alexander Couzens 
37
+  * Add vty `reject-cause` to set the reject cause
38
+
39
+ -- Pau Espin Pedrol <pespin@sysmocom.de>  Tue, 07 Feb 2023 16:49:14 +0100
40
+
41
 osmo-hlr (1.5.0) unstable; urgency=medium
42
 
43
    Oliver Smith 
44
osmo-hlr_1.5.0.tar.xz/debian/control -> osmo-hlr_1.6.0.tar.xz/debian/control Changed
57
 
1
@@ -7,12 +7,12 @@
2
                dh-autoreconf,
3
                autotools-dev,
4
                python3-minimal,
5
-               libosmocore-dev (>= 1.7.0),
6
-               libosmo-abis-dev (>= 1.3.0),
7
-               libosmo-netif-dev (>= 1.2.0),
8
+               libosmocore-dev (>= 1.8.0),
9
+               libosmo-abis-dev (>= 1.4.0),
10
+               libosmo-netif-dev (>= 1.3.0),
11
                libsqlite3-dev,
12
                sqlite3,
13
-               osmo-gsm-manuals-dev (>= 1.3.0)
14
+               osmo-gsm-manuals-dev (>= 1.4.0)
15
 Standards-Version: 3.9.6
16
 Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-hlr
17
 Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-hlr
18
@@ -22,8 +22,9 @@
19
 Architecture: any
20
 Depends: osmocom-latest, ${shlibs:Depends}, ${misc:Depends}
21
 Description: Osmocom Home Location Register
22
- OsmoHLR is a Osmocom implementation of HLR (Home Location Registrar) which works over GSUP
23
- protocol. The subscribers are store in sqlite DB. It supports both 2G and 3G authentication.
24
+ OsmoHLR is a Osmocom implementation of HLR (Home Location Registrar) which
25
+ works over GSUP protocol. The subscribers are store in sqlite DB.
26
+ It supports both 2G and 3G authentication.
27
 
28
 Package: osmo-hlr-dbg
29
 Architecture: any
30
@@ -58,7 +59,7 @@
31
   .
32
   This package contains the development headers.
33
 
34
-Package: libosmo-mslookup0
35
+Package: libosmo-mslookup1
36
 Section: libs
37
 Architecture: any
38
 Multi-Arch: same
39
@@ -72,7 +73,7 @@
40
 Architecture: any
41
 Multi-Arch: same
42
 Depends: osmocom-latest, ${misc:Depends},
43
-    libosmo-mslookup0 (= ${binary:Version}),
44
+    libosmo-mslookup1 (= ${binary:Version}),
45
     libosmocore-dev
46
 Pre-Depends: ${misc:Pre-Depends}
47
 Description: Development headers of Osmocom MS lookup library
48
@@ -84,7 +85,7 @@
49
 Architecture: any
50
 Section: utils
51
 Depends: osmocom-latest, ${shlibs:Depends},
52
-    libosmo-mslookup0 (= ${binary:Version}),
53
+    libosmo-mslookup1 (= ${binary:Version}),
54
          ${misc:Depends}
55
 Multi-Arch: same
56
 Description: Utilities for Osmocom MS lookup
57
osmo-hlr_1.5.0.tar.xz/debian/copyright -> osmo-hlr_1.6.0.tar.xz/debian/copyright Changed
10
 
1
@@ -3,7 +3,7 @@
2
 Source: http://cgit.osmocom.org/osmo-hlr/
3
 
4
 Files: *
5
-Copyright: 2016-2017 Sysmocom s. f. m. c. GmbH <info@sysmocom.de>
6
+Copyright: 2016-2022 Sysmocom s. f. m. c. GmbH <info@sysmocom.de>
7
 License: AGPL-3+
8
 
9
 License: AGPL-3+
10
osmo-hlr_1.6.0.tar.xz/debian/libosmo-mslookup1.install Changed
2
 
1
(renamed from debian/libosmo-mslookup0.install)
2
osmo-hlr_1.5.0.tar.xz/debian/osmo-hlr.install -> osmo-hlr_1.6.0.tar.xz/debian/osmo-hlr.install Changed
8
 
1
@@ -5,5 +5,5 @@
2
 /usr/share/doc/osmo-hlr/sql/hlr.sql
3
 /usr/share/doc/osmo-hlr/sql/hlr_data.sql
4
 /usr/share/doc/osmo-hlr/examples/osmo-hlr.cfg
5
+/usr/share/doc/osmo-hlr/examples/osmo-hlr-dgsm.cfg
6
 /usr/share/osmocom/osmo-hlr-post-upgrade.sh
7
-/var/lib/osmocom
8
osmo-hlr_1.5.0.tar.xz/include/osmocom/hlr/dgsm.h -> osmo-hlr_1.6.0.tar.xz/include/osmocom/hlr/dgsm.h Changed
9
 
1
@@ -25,6 +25,7 @@
2
 #include <osmocom/gsupclient/cni_peer_id.h>
3
 #include <osmocom/gsupclient/gsup_req.h>
4
 
5
+#define OSMO_DGSM_DEFAULT_RESULT_TIMEOUT_MS    2000
6
 #define LOG_DGSM(imsi, level, fmt, args...) \
7
    LOGP(DDGSM, level, "(IMSI-%s) " fmt, imsi, ##args)
8
 
9
osmo-hlr_1.5.0.tar.xz/include/osmocom/hlr/hlr.h -> osmo-hlr_1.6.0.tar.xz/include/osmocom/hlr/hlr.h Changed
26
 
1
@@ -23,6 +23,7 @@
2
 #pragma once
3
 
4
 #include <stdbool.h>
5
+#include <osmocom/gsm/protocol/gsm_04_08_gprs.h>
6
 #include <osmocom/core/linuxlist.h>
7
 #include <osmocom/gsm/ipa.h>
8
 #include <osmocom/core/tdef.h>
9
@@ -48,7 +49,6 @@
10
 
11
    /* Control Interface */
12
    struct ctrl_handle *ctrl;
13
-   const char *ctrl_bind_addr;
14
 
15
    /* Local bind addr */
16
    char *gsup_bind_addr;
17
@@ -56,6 +56,8 @@
18
 
19
    struct llist_head euse_list;
20
    struct hlr_euse *euse_default;
21
+   enum gsm48_gmm_cause reject_cause;
22
+   enum gsm48_gmm_cause no_proxy_reject_cause;
23
 
24
    /* NCSS (call independent) session guard timeout value */
25
    int ncss_guard_timeout;
26
osmo-hlr_1.5.0.tar.xz/include/osmocom/hlr/hlr_vty.h -> osmo-hlr_1.6.0.tar.xz/include/osmocom/hlr/hlr_vty.h Changed
8
 
1
@@ -45,5 +45,5 @@
2
 
3
 int hlr_vty_is_config_node(struct vty *vty, int node);
4
 int hlr_vty_go_parent(struct vty *vty);
5
-void hlr_vty_init(void);
6
+void hlr_vty_init(void *hlr_ctx);
7
 void dgsm_vty_init(void);
8
osmo-hlr_1.5.0.tar.xz/include/osmocom/mslookup/mdns_rfc.h -> osmo-hlr_1.6.0.tar.xz/include/osmocom/mslookup/mdns_rfc.h Changed
19
 
1
@@ -99,15 +99,12 @@
2
    uint8_t *rdata;
3
 };
4
 
5
-char *osmo_mdns_rfc_qname_encode(void *ctx, const char *domain);
6
-char *osmo_mdns_rfc_qname_decode(void *ctx, const char *qname, size_t qname_len);
7
-
8
 void osmo_mdns_rfc_header_encode(struct msgb *msg, const struct osmo_mdns_rfc_header *hdr);
9
 int osmo_mdns_rfc_header_decode(const uint8_t *data, size_t data_len, struct osmo_mdns_rfc_header *hdr);
10
 
11
-int osmo_mdns_rfc_question_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_question *qst);
12
+int osmo_mdns_rfc_question_encode(struct msgb *msg, const struct osmo_mdns_rfc_question *qst);
13
 struct osmo_mdns_rfc_question *osmo_mdns_rfc_question_decode(void *ctx, const uint8_t *data, size_t data_len);
14
 
15
-int osmo_mdns_rfc_record_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_record *rec);
16
+int osmo_mdns_rfc_record_encode(struct msgb *msg, const struct osmo_mdns_rfc_record *rec);
17
 struct osmo_mdns_rfc_record *osmo_mdns_rfc_record_decode(void *ctx, const uint8_t *data, size_t data_len,
18
                             size_t *record_len);
19
osmo-hlr_1.5.0.tar.xz/src/ctrl.c -> osmo-hlr_1.6.0.tar.xz/src/ctrl.c Changed
24
 
1
@@ -749,7 +749,7 @@
2
    return 1;
3
 }
4
 
5
-static int hlr_ctrl_cmds_install()
6
+static int hlr_ctrl_cmds_install(void)
7
 {
8
    int rc = 0;
9
 
10
@@ -771,11 +771,8 @@
11
 struct ctrl_handle *hlr_controlif_setup(struct hlr *hlr)
12
 {
13
    int rc;
14
-   struct ctrl_handle *hdl = ctrl_interface_setup_dynip2(hlr,
15
-                                 hlr->ctrl_bind_addr,
16
-                                 OSMO_CTRL_PORT_HLR,
17
-                                 hlr_ctrl_node_lookup,
18
-                                 _LAST_CTRL_NODE_HLR);
19
+   struct ctrl_handle *hdl = ctrl_interface_setup2(hlr, OSMO_CTRL_PORT_HLR, hlr_ctrl_node_lookup,
20
+                           _LAST_CTRL_NODE_HLR);
21
    if (!hdl)
22
        return NULL;
23
 
24
osmo-hlr_1.5.0.tar.xz/src/db_auc.c -> osmo-hlr_1.6.0.tar.xz/src/db_auc.c Changed
13
 
1
@@ -95,7 +95,10 @@
2
        LOGAUC(imsi, LOGL_ERROR, "Error reading %s\n", col_name);
3
        return -EIO;
4
    }
5
-   osmo_hexparse((void *)text, dst, dst_len);
6
+
7
+   if (osmo_hexparse((void *)text, dst, dst_len) != col_len)
8
+       return -EINVAL;
9
+
10
    return 0;
11
 }
12
 
13
osmo-hlr_1.5.0.tar.xz/src/dgsm.c -> osmo-hlr_1.6.0.tar.xz/src/dgsm.c Changed
19
 
1
@@ -170,7 +170,7 @@
2
 
3
    g_hlr->mslookup.server.local_attach_max_age = 60 * 60;
4
 
5
-   g_hlr->mslookup.client.result_timeout_milliseconds = 2000;
6
+   g_hlr->mslookup.client.result_timeout_milliseconds = OSMO_DGSM_DEFAULT_RESULT_TIMEOUT_MS;
7
 
8
    g_hlr->gsup_unit_name.unit_name = "HLR";
9
    g_hlr->gsup_unit_name.serno = "unnamed-HLR";
10
@@ -191,7 +191,7 @@
11
    dgsm_mdns_client_config_apply();
12
 }
13
 
14
-void dgsm_stop()
15
+void dgsm_stop(void)
16
 {
17
    g_hlr->mslookup.allow_startup = false;
18
    mslookup_server_mdns_config_apply();
19
osmo-hlr_1.5.0.tar.xz/src/dgsm_vty.c -> osmo-hlr_1.6.0.tar.xz/src/dgsm_vty.c Changed
23
 
1
@@ -447,8 +447,8 @@
2
        llist_for_each_entry(msc, &g_hlr->mslookup.server.local_site_services, entry) {
3
            if (!osmo_ipa_name_cmp(&mslookup_server_msc_wildcard, &msc->name))
4
                continue;
5
-           vty_out(vty, " msc %s%s", osmo_ipa_name_to_str(&msc->name), VTY_NEWLINE);
6
-           config_write_msc_services(vty, "  ", msc);
7
+           vty_out(vty, "  msc ipa-name %s%s", osmo_ipa_name_to_str(&msc->name), VTY_NEWLINE);
8
+           config_write_msc_services(vty, "   ", msc);
9
        }
10
 
11
        /* If the server is disabled, still output the above to not lose the service config. */
12
@@ -475,6 +475,10 @@
13
            vty_out(vty, "  mdns domain-suffix %s%s",
14
                g_hlr->mslookup.client.mdns.domain_suffix,
15
                VTY_NEWLINE);
16
+       if (g_hlr->mslookup.client.result_timeout_milliseconds != OSMO_DGSM_DEFAULT_RESULT_TIMEOUT_MS)
17
+           vty_out(vty, "  timeout %u%s",
18
+               g_hlr->mslookup.client.result_timeout_milliseconds,
19
+               VTY_NEWLINE);
20
    }
21
 
22
    return CMD_SUCCESS;
23
osmo-hlr_1.5.0.tar.xz/src/hlr.c -> osmo-hlr_1.6.0.tar.xz/src/hlr.c Changed
61
 
1
@@ -324,7 +324,7 @@
2
                          " Returning slightly inaccurate cause 'IMSI Unknown' via GSUP");
3
            return rc;
4
        case -ENOENT:
5
-           osmo_gsup_req_respond_err(req, GMM_CAUSE_IMSI_UNKNOWN, "IMSI unknown");
6
+           osmo_gsup_req_respond_err(req, g_hlr->reject_cause, "IMSI unknown");
7
            return rc;
8
        default:
9
            osmo_gsup_req_respond_err(req, GMM_CAUSE_NET_FAIL, "failure to look up IMSI in db");
10
@@ -568,12 +568,12 @@
11
    return 0;
12
 }
13
 
14
-static void print_usage()
15
+static void print_usage(void)
16
 {
17
    printf("Usage: osmo-hlr\n");
18
 }
19
 
20
-static void print_help()
21
+static void print_help(void)
22
 {
23
    printf("  -h --help                  This text.\n");
24
    printf("  -c --config-file filename  The config file to use.\n");
25
@@ -759,6 +759,8 @@
26
    g_hlr->db_file_path = talloc_strdup(g_hlr, HLR_DEFAULT_DB_FILE_PATH);
27
    g_hlr->mslookup.server.mdns.domain_suffix = talloc_strdup(g_hlr, OSMO_MDNS_DOMAIN_SUFFIX_DEFAULT);
28
    g_hlr->mslookup.client.mdns.domain_suffix = talloc_strdup(g_hlr, OSMO_MDNS_DOMAIN_SUFFIX_DEFAULT);
29
+   g_hlr->reject_cause = GMM_CAUSE_IMSI_UNKNOWN;
30
+   g_hlr->no_proxy_reject_cause = GMM_CAUSE_IMSI_UNKNOWN;
31
 
32
    /* Init default (call independent) SS session guard timeout value */
33
    g_hlr->ncss_guard_timeout = NCSS_GUARD_TIMEOUT_DEFAULT;
34
@@ -775,7 +777,7 @@
35
    osmo_stats_init(hlr_ctx);
36
    vty_init(&vty_info);
37
    ctrl_vty_init(hlr_ctx);
38
-   hlr_vty_init();
39
+   hlr_vty_init(hlr_ctx);
40
    dgsm_vty_init();
41
    osmo_cpu_sched_vty_init(hlr_ctx);
42
    handle_options(argc, argv);
43
@@ -816,8 +818,7 @@
44
    }
45
 
46
    /* start telnet after reading config for vty_get_bind_addr() */
47
-   rc = telnet_init_dynif(hlr_ctx, NULL, vty_get_bind_addr(),
48
-                  OSMO_VTY_PORT_HLR);
49
+   rc = telnet_init_default(hlr_ctx, NULL, OSMO_VTY_PORT_HLR);
50
    if (rc < 0)
51
        return rc;
52
 
53
@@ -830,7 +831,6 @@
54
    }
55
    proxy_init(g_hlr->gs);
56
 
57
-   g_hlr->ctrl_bind_addr = ctrl_vty_get_bind_addr();
58
    g_hlr->ctrl = hlr_controlif_setup(g_hlr);
59
 
60
    dgsm_start(hlr_ctx);
61
osmo-hlr_1.5.0.tar.xz/src/hlr_db_tool.c -> osmo-hlr_1.6.0.tar.xz/src/hlr_db_tool.c Changed
10
 
1
@@ -51,7 +51,7 @@
2
    .db_upgrade = false,
3
 };
4
 
5
-static void print_help()
6
+static void print_help(void)
7
 {
8
    printf("\n");
9
    printf("Usage: osmo-hlr-db-tool -l <hlr.db> create|import-nitb-db <nitb.db>\n");
10
osmo-hlr_1.5.0.tar.xz/src/hlr_vty.c -> osmo-hlr_1.6.0.tar.xz/src/hlr_vty.c Changed
128
 
1
@@ -25,7 +25,10 @@
2
  *
3
  */
4
 
5
+#include <errno.h>
6
+
7
 #include <osmocom/core/talloc.h>
8
+#include <osmocom/gsm/protocol/gsm_04_08_gprs.h>
9
 #include <osmocom/vty/vty.h>
10
 #include <osmocom/vty/stats.h>
11
 #include <osmocom/vty/command.h>
12
@@ -40,6 +43,36 @@
13
 #include <osmocom/hlr/hlr_ussd.h>
14
 #include <osmocom/hlr/gsup_server.h>
15
 
16
+static const struct value_string gsm48_gmm_cause_vty_names = {
17
+   { GMM_CAUSE_IMSI_UNKNOWN,   "imsi-unknown" },
18
+   { GMM_CAUSE_ILLEGAL_MS,     "illegal-ms" },
19
+   { GMM_CAUSE_PLMN_NOTALLOWED,    "plmn-not-allowed" },
20
+   { GMM_CAUSE_LA_NOTALLOWED,  "la-not-allowed" },
21
+   { GMM_CAUSE_ROAMING_NOTALLOWED, "roaming-not-allowed" },
22
+   { GMM_CAUSE_NO_SUIT_CELL_IN_LA, "no-suitable-cell-in-la" },
23
+   { GMM_CAUSE_NET_FAIL,       "net-fail" },
24
+   { GMM_CAUSE_CONGESTION,     "congestion" },
25
+   { GMM_CAUSE_GSM_AUTH_UNACCEPT,  "auth-unacceptable" },
26
+   { GMM_CAUSE_PROTO_ERR_UNSPEC,   "proto-error-unspec" },
27
+   { 0, NULL },
28
+};
29
+
30
+/* TS 24.008 4.4.4.7 */
31
+static const struct value_string gsm48_gmm_cause_vty_descs = {
32
+   { GMM_CAUSE_IMSI_UNKNOWN,   " #02: (IMSI unknown in HLR)" },
33
+   { GMM_CAUSE_ILLEGAL_MS,     " #03  (Illegal MS)" },
34
+   { GMM_CAUSE_PLMN_NOTALLOWED,    " #11: (PLMN not allowed)" },
35
+   { GMM_CAUSE_LA_NOTALLOWED,  " #12: (Location Area not allowed)" },
36
+   { GMM_CAUSE_ROAMING_NOTALLOWED, " #13: (Roaming not allowed in this location area)" },
37
+   { GMM_CAUSE_NO_SUIT_CELL_IN_LA, " #15: (No Suitable Cells In Location Area continue search in PLMN)." },
38
+   { GMM_CAUSE_NET_FAIL,       " #17: (Network Failure)" },
39
+   { GMM_CAUSE_CONGESTION,     " #22: (Congestion)" },
40
+   { GMM_CAUSE_GSM_AUTH_UNACCEPT,  " #23: (GSM authentication unacceptable UMTS)" },
41
+   { GMM_CAUSE_PROTO_ERR_UNSPEC,   "#111: (Protocol error, unspecified)" },
42
+   { 0, NULL },
43
+};
44
+
45
+
46
 struct cmd_node hlr_node = {
47
    HLR_NODE,
48
    "%s(config-hlr)# ",
49
@@ -73,6 +106,15 @@
50
 static int config_write_hlr(struct vty *vty)
51
 {
52
    vty_out(vty, "hlr%s", VTY_NEWLINE);
53
+
54
+   if (g_hlr->reject_cause != GMM_CAUSE_IMSI_UNKNOWN)
55
+       vty_out(vty, " reject-cause not-found %s%s",
56
+           get_value_string_or_null(gsm48_gmm_cause_vty_names,
57
+                        (uint32_t) g_hlr->reject_cause), VTY_NEWLINE);
58
+   if (g_hlr->no_proxy_reject_cause != GMM_CAUSE_IMSI_UNKNOWN)
59
+       vty_out(vty, " reject-cause no-proxy %s%s",
60
+           get_value_string_or_null(gsm48_gmm_cause_vty_names,
61
+                        (uint32_t) g_hlr->no_proxy_reject_cause), VTY_NEWLINE);
62
    if (g_hlr->store_imei)
63
        vty_out(vty, " store-imei%s", VTY_NEWLINE);
64
    if (g_hlr->db_file_path && strcmp(g_hlr->db_file_path, HLR_DEFAULT_DB_FILE_PATH))
65
@@ -158,7 +200,7 @@
66
 {
67
    if (vty->type != VTY_FILE) {
68
        vty_out(vty, "gsup/ipa-name: The GSUP IPA name cannot be changed at run-time; "
69
-           "It can only be set in the configuraton file.%s", VTY_NEWLINE);
70
+           "It can only be set in the configuration file.%s", VTY_NEWLINE);
71
        return CMD_WARNING;
72
    }
73
 
74
@@ -358,6 +400,21 @@
75
    return CMD_SUCCESS;
76
 }
77
 
78
+
79
+DEFUN(cfg_reject_cause, cfg_reject_cause_cmd,
80
+      "reject-cause TYPE CAUSE", "") /* Dynamically Generated */
81
+{
82
+   int cause_code = get_string_value(gsm48_gmm_cause_vty_names, argv1);
83
+   OSMO_ASSERT(cause_code >= 0);
84
+
85
+   if (strcmp(argv0, "not-found") == 0)
86
+       g_hlr->reject_cause = (enum gsm48_gmm_cause) cause_code;
87
+   if (strcmp(argv0, "no-proxy") == 0)
88
+       g_hlr->no_proxy_reject_cause = (enum gsm48_gmm_cause) cause_code;
89
+
90
+   return CMD_SUCCESS;
91
+}
92
+
93
 DEFUN(cfg_store_imei, cfg_store_imei_cmd,
94
    "store-imei",
95
    "Save the IMEI in the database when receiving Check IMEI requests. Note that an MSC does not necessarily send"
96
@@ -450,8 +507,22 @@
97
    }
98
 }
99
 
100
-void hlr_vty_init(void)
101
+void hlr_vty_init(void *hlr_ctx)
102
 {
103
+   cfg_reject_cause_cmd.string =
104
+       vty_cmd_string_from_valstr(hlr_ctx,
105
+                      gsm48_gmm_cause_vty_names,
106
+                      "reject-cause (not-found|no-proxy) (", "|", ")",
107
+                      VTY_DO_LOWER);
108
+
109
+   cfg_reject_cause_cmd.doc =
110
+       vty_cmd_string_from_valstr(hlr_ctx,
111
+                      gsm48_gmm_cause_vty_descs,
112
+                      "GSUP/GMM cause to be sent\n"
113
+                      "in the case the IMSI could not be found in the database\n"
114
+                      "in the case no remote HLR reponded to mslookup GSUP request\n",
115
+                      "\n", "", 0);
116
+
117
    logging_vty_add_cmds();
118
    osmo_talloc_vty_add_cmds();
119
    osmo_stats_vty_add_cmds();
120
@@ -478,6 +549,7 @@
121
    install_element(HLR_NODE, &cfg_ussd_defaultroute_cmd);
122
    install_element(HLR_NODE, &cfg_ussd_no_defaultroute_cmd);
123
    install_element(HLR_NODE, &cfg_ncss_guard_timeout_cmd);
124
+   install_element(HLR_NODE, &cfg_reject_cause_cmd);
125
    install_element(HLR_NODE, &cfg_store_imei_cmd);
126
    install_element(HLR_NODE, &cfg_no_store_imei_cmd);
127
    install_element(HLR_NODE, &cfg_subscr_create_on_demand_cmd);
128
osmo-hlr_1.5.0.tar.xz/src/lu_fsm.c -> osmo-hlr_1.6.0.tar.xz/src/lu_fsm.c Changed
19
 
1
@@ -136,7 +136,7 @@
2
    }
3
 
4
    if (db_subscr_get_by_imsi(g_hlr->dbc, update_location_req->gsup.imsi, &lu->subscr) < 0) {
5
-       lu_failure(lu, GMM_CAUSE_IMSI_UNKNOWN, "Subscriber does not exist");
6
+       lu_failure(lu, g_hlr->reject_cause, "Subscriber does not exist");
7
        return;
8
    }
9
 
10
@@ -314,7 +314,7 @@
11
    .cleanup = lu_fsm_cleanup,
12
 };
13
 
14
-static __attribute__((constructor)) void lu_fsm_init()
15
+static __attribute__((constructor)) void lu_fsm_init(void)
16
 {
17
    OSMO_ASSERT(osmo_fsm_register(&lu_fsm) == 0);
18
 }
19
osmo-hlr_1.5.0.tar.xz/src/mslookup/Makefile.am -> osmo-hlr_1.6.0.tar.xz/src/mslookup/Makefile.am Changed
10
 
1
@@ -1,7 +1,7 @@
2
 # This is _NOT_ the library release version, it's an API version.
3
 # Please read chapter "Library interface versions" of the libtool documentation
4
 # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html
5
-LIBVERSION=0:0:0
6
+LIBVERSION=1:0:0
7
 
8
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)/include
9
 AM_CFLAGS = -fPIC -Wall $(PCSC_CFLAGS) $(TALLOC_CFLAGS) $(LIBOSMOCORE_CFLAGS)
10
osmo-hlr_1.5.0.tar.xz/src/mslookup/mdns_msg.c -> osmo-hlr_1.6.0.tar.xz/src/mslookup/mdns_msg.c Changed
19
 
1
@@ -40,7 +40,7 @@
2
    qst.domain = req->domain;
3
    qst.qtype = req->type;
4
    qst.qclass = OSMO_MDNS_RFC_CLASS_IN;
5
-   if (osmo_mdns_rfc_question_encode(ctx, msg, &qst) != 0)
6
+   if (osmo_mdns_rfc_question_encode(msg, &qst) != 0)
7
        return -EINVAL;
8
 
9
    return 0;
10
@@ -106,7 +106,7 @@
11
        rec.rdlength = ans_record->length;
12
        rec.rdata = ans_record->data;
13
 
14
-       if (osmo_mdns_rfc_record_encode(ctx, msg, &rec) != 0)
15
+       if (osmo_mdns_rfc_record_encode(msg, &rec) != 0)
16
            return -EINVAL;
17
    }
18
 
19
osmo-hlr_1.5.0.tar.xz/src/mslookup/mdns_rfc.c -> osmo-hlr_1.6.0.tar.xz/src/mslookup/mdns_rfc.c Changed
201
 
1
@@ -27,92 +27,10 @@
2
 #include <osmocom/core/msgb.h>
3
 #include <osmocom/core/bitvec.h>
4
 #include <osmocom/core/logging.h>
5
+#include <osmocom/gsm/apn.h>
6
 #include <osmocom/mslookup/mdns_rfc.h>
7
 
8
 /*
9
- * Encode/decode IEs
10
- */
11
-
12
-/*! Encode a domain string as qname (RFC 1035 4.1.2).
13
- * \paramin domain  multiple labels separated by dots, e.g. "sip.voice.1234.msisdn".
14
- * \returns allocated buffer with length-value pairs for each label (e.g. 0x03 "sip" 0x05 "voice" ...), NULL on error.
15
- */
16
-char *osmo_mdns_rfc_qname_encode(void *ctx, const char *domain)
17
-{
18
-   char *domain_dup;
19
-   char *domain_iter;
20
-   char bufOSMO_MDNS_RFC_MAX_NAME_LEN + 2 = ""; /* len(qname) is len(domain) +1 */
21
-   struct osmo_strbuf sb = { .buf = buf, .len = sizeof(buf) };
22
-   char *label;
23
-
24
-   if (strlen(domain) > OSMO_MDNS_RFC_MAX_NAME_LEN)
25
-       return NULL;
26
-
27
-   domain_iter = domain_dup = talloc_strdup(ctx, domain);
28
-   while ((label = strsep(&domain_iter, "."))) {
29
-       size_t len = strlen(label);
30
-
31
-       /* Empty domain, dot at start, two dots in a row, or ending with a dot */
32
-       if (!len)
33
-           goto error;
34
-
35
-       OSMO_STRBUF_PRINTF(sb, "%c%s", (char)len, label);
36
-   }
37
-
38
-   talloc_free(domain_dup);
39
-   return talloc_strdup(ctx, buf);
40
-
41
-error:
42
-   talloc_free(domain_dup);
43
-   return NULL;
44
-}
45
-
46
-/*! Decode a domain string from a qname (RFC 1035 4.1.2).
47
- * \paramin qname  buffer with length-value pairs for each label (e.g. 0x03 "sip" 0x05 "voice" ...)
48
- * \paramin qname_max_len  amount of bytes that can be read at most from the memory location that qname points to.
49
- * \returns allocated buffer with domain string, multiple labels separated by dots (e.g. "sip.voice.1234.msisdn"),
50
- *     NULL on error.
51
- */
52
-char *osmo_mdns_rfc_qname_decode(void *ctx, const char *qname, size_t qname_max_len)
53
-{
54
-   const char *next_label, *qname_end = qname + qname_max_len;
55
-   char bufOSMO_MDNS_RFC_MAX_NAME_LEN + 1;
56
-   int i = 0;
57
-
58
-   if (qname_max_len < 1)
59
-       return NULL;
60
-
61
-   while (*qname) {
62
-       size_t len;
63
-
64
-       if (i >= qname_max_len)
65
-           return NULL;
66
-
67
-       len = *qname;
68
-       next_label = qname + len + 1;
69
-
70
-       if (next_label >= qname_end || i + len > OSMO_MDNS_RFC_MAX_NAME_LEN)
71
-           return NULL;
72
-
73
-       if (i) {
74
-           /* Two dots in a row is not allowed */
75
-           if (bufi - 1 == '.')
76
-               return NULL;
77
-
78
-           bufi = '.';
79
-           i++;
80
-       }
81
-
82
-       memcpy(buf + i, qname + 1, len);
83
-       i += len;
84
-       qname = next_label;
85
-   }
86
-   bufi = '\0';
87
-
88
-   return talloc_strdup(ctx, buf);
89
-}
90
-
91
-/*
92
  * Encode/decode message sections
93
  */
94
 
95
@@ -151,20 +69,17 @@
96
 /*! Encode question section (RFC 1035 4.1.2).
97
  * \paramin msgb  mesage buffer to which the encoded data will be appended.
98
  */
99
-int osmo_mdns_rfc_question_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_question *qst)
100
+int osmo_mdns_rfc_question_encode(struct msgb *msg, const struct osmo_mdns_rfc_question *qst)
101
 {
102
-   char *qname;
103
-   size_t qname_len;
104
-   uint8_t *qname_buf;
105
+   uint8_t *buf;
106
+   size_t buf_len;
107
 
108
    /* qname */
109
-   qname = osmo_mdns_rfc_qname_encode(ctx, qst->domain);
110
-   if (!qname)
111
+   buf_len = strlen(qst->domain) + 1;
112
+   buf = msgb_put(msg, buf_len);
113
+   if (osmo_apn_from_str(buf, buf_len, qst->domain) < 0)
114
        return -EINVAL;
115
-   qname_len = strlen(qname) + 1;
116
-   qname_buf = msgb_put(msg, qname_len);
117
-   memcpy(qname_buf, qname, qname_len);
118
-   talloc_free(qname);
119
+   msgb_put_u8(msg, 0x00);
120
 
121
    /* qtype and qclass */
122
    msgb_put_u16(msg, qst->qtype);
123
@@ -182,21 +97,25 @@
124
    if (data_len < 6)
125
        return NULL;
126
 
127
-   /* qname */
128
    ret = talloc_zero(ctx, struct osmo_mdns_rfc_question);
129
    if (!ret)
130
        return NULL;
131
-   ret->domain = osmo_mdns_rfc_qname_decode(ret, (const char *)data, qname_len);
132
-   if (!ret->domain) {
133
-       talloc_free(ret);
134
-       return NULL;
135
-   }
136
+
137
+   /* qname */
138
+   ret->domain = talloc_size(ret, qname_len - 1);
139
+   if (!ret->domain)
140
+       goto error;
141
+   if (!osmo_apn_to_str(ret->domain, data, qname_len - 1))
142
+       goto error;
143
 
144
    /* qtype and qclass */
145
    ret->qtype = osmo_load16be(data + qname_len);
146
    ret->qclass = osmo_load16be(data + qname_len + 2);
147
 
148
    return ret;
149
+error:
150
+   talloc_free(ret);
151
+   return NULL;
152
 }
153
 
154
 /*
155
@@ -206,20 +125,17 @@
156
 /*! Encode one resource record (RFC 1035 4.1.3).
157
  * \paramin msgb  mesage buffer to which the encoded data will be appended.
158
  */
159
-int osmo_mdns_rfc_record_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_record *rec)
160
+int osmo_mdns_rfc_record_encode(struct msgb *msg, const struct osmo_mdns_rfc_record *rec)
161
 {
162
-   char *name;
163
-   size_t name_len;
164
    uint8_t *buf;
165
+   size_t buf_len;
166
 
167
    /* name */
168
-   name = osmo_mdns_rfc_qname_encode(ctx, rec->domain);
169
-   if (!name)
170
+   buf_len = strlen(rec->domain) + 1;
171
+   buf = msgb_put(msg, buf_len);
172
+   if (osmo_apn_from_str(buf, buf_len, rec->domain) < 0)
173
        return -EINVAL;
174
-   name_len = strlen(name) + 1;
175
-   buf = msgb_put(msg, name_len);
176
-   memcpy(buf, name, name_len);
177
-   talloc_free(name);
178
+   msgb_put_u8(msg, 0x00);
179
 
180
    /* type, class, ttl, rdlength */
181
    msgb_put_u16(msg, rec->type);
182
@@ -237,15 +153,26 @@
183
 struct osmo_mdns_rfc_record *osmo_mdns_rfc_record_decode(void *ctx, const uint8_t *data, size_t data_len,
184
                               size_t *record_len)
185
 {
186
-   struct osmo_mdns_rfc_record *ret = talloc_zero(ctx, struct osmo_mdns_rfc_record);
187
+   struct osmo_mdns_rfc_record *ret;
188
    size_t name_len;
189
 
190
-   /* name */
191
-   ret->domain = osmo_mdns_rfc_qname_decode(ret, (const char *)data, data_len - 10);
192
+   /* name length: represented as a series of labels, and terminated by a
193
+    * label with zero length (RFC 1035 3.3). A label with zero length is a
194
+    * NUL byte. */
195
+   name_len = strnlen((const char *)data, data_len - 10) + 1;
196
+   if (dataname_len)
197
+       return NULL;
198
+
199
+   /* allocate ret + ret->domain */
200
+   ret = talloc_zero(ctx, struct osmo_mdns_rfc_record);
201
osmo-hlr_1.5.0.tar.xz/src/mslookup/osmo-mslookup-client.c -> osmo-hlr_1.6.0.tar.xz/src/mslookup/osmo-mslookup-client.c Changed
19
 
1
@@ -53,7 +53,7 @@
2
    "\n");
3
 }
4
 
5
-static void print_help()
6
+static void print_help(void)
7
 {
8
    print_version();
9
    printf(
10
@@ -555,7 +555,7 @@
11
    return 0;
12
 }
13
 
14
-void socket_close()
15
+void socket_close(void)
16
 {
17
    struct socket_client *c, *n;
18
    llist_for_each_entry_safe(c, n, &globals.socket_clients, entry)
19
osmo-hlr_1.5.0.tar.xz/src/mslookup_server.c -> osmo-hlr_1.6.0.tar.xz/src/mslookup_server.c Changed
10
 
1
@@ -49,7 +49,7 @@
2
    result->age = age;
3
 }
4
 
5
-const struct mslookup_service_host *mslookup_server_get_local_gsup_addr()
6
+const struct mslookup_service_host *mslookup_server_get_local_gsup_addr(void)
7
 {
8
    static struct mslookup_service_host gsup_bind = {};
9
    struct mslookup_service_host *host;
10
osmo-hlr_1.5.0.tar.xz/src/mslookup_server_mdns.c -> osmo-hlr_1.6.0.tar.xz/src/mslookup_server_mdns.c Changed
10
 
1
@@ -121,7 +121,7 @@
2
    talloc_free(server);
3
 }
4
 
5
-void mslookup_server_mdns_config_apply()
6
+void mslookup_server_mdns_config_apply(void)
7
 {
8
    /* Check whether to start/stop/restart mDNS server */
9
    bool should_run;
10
osmo-hlr_1.5.0.tar.xz/src/proxy.c -> osmo-hlr_1.6.0.tar.xz/src/proxy.c Changed
38
 
1
@@ -29,6 +29,7 @@
2
 #include <osmocom/gsupclient/gsup_client.h>
3
 #include <osmocom/gsupclient/gsup_req.h>
4
 
5
+#include <osmocom/hlr/hlr.h>
6
 #include <osmocom/hlr/logging.h>
7
 #include <osmocom/hlr/proxy.h>
8
 #include <osmocom/hlr/remote_hlr.h>
9
@@ -80,7 +81,19 @@
10
 static void proxy_pending_req_remote_hlr_connect_result(struct osmo_gsup_req *req, struct remote_hlr *remote_hlr)
11
 {
12
    if (!remote_hlr || !remote_hlr_is_up(remote_hlr)) {
13
-       osmo_gsup_req_respond_err(req, GMM_CAUSE_IMSI_UNKNOWN, "Proxy: Failed to connect to home HLR");
14
+       /* Do not respond with an error to a CHECK_IMEI_REQUEST as osmo-msc will send a LU Reject Cause #6
15
+        * Just respond ACK and deal with the IMSI check that comes next. */
16
+       if (req->gsup.message_type == OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST) {
17
+           /* Accept all IMEIs */
18
+           struct osmo_gsup_message gsup_reply = (struct osmo_gsup_message){
19
+               .message_type = OSMO_GSUP_MSGT_CHECK_IMEI_RESULT,
20
+               .imei_result  = OSMO_GSUP_IMEI_RESULT_ACK,
21
+           };
22
+           osmo_gsup_req_respond(req, &gsup_reply, false, true);
23
+           return;
24
+       }
25
+       osmo_gsup_req_respond_err(req, g_hlr->no_proxy_reject_cause,
26
+                     "Proxy: Failed to connect to home HLR");
27
        return;
28
    }
29
 
30
@@ -190,6 +203,7 @@
31
 int _proxy_subscr_del(struct proxy_subscr_listentry *e)
32
 {
33
    llist_del(&e->entry);
34
+   talloc_free(e);
35
    return 0;
36
 }
37
 
38
osmo-hlr_1.5.0.tar.xz/tests/auc/auc_test.c -> osmo-hlr_1.6.0.tar.xz/tests/auc/auc_test.c Changed
10
 
1
@@ -509,7 +509,7 @@
2
 }
3
 
4
 /* Test a variety of invalid authentication data combinations */
5
-void test_gen_vectors_bad_args()
6
+void test_gen_vectors_bad_args(void)
7
 {
8
    struct osmo_auth_vector vec;
9
    uint8_t auts14;
10
osmo-hlr_1.5.0.tar.xz/tests/auc/gen_ts_55_205_test_sets/main_template.c -> osmo-hlr_1.6.0.tar.xz/tests/auc/gen_ts_55_205_test_sets/main_template.c Changed
10
 
1
@@ -100,7 +100,7 @@
2
 
3
 FUNCTIONS
4
 
5
-int main()
6
+int main(int argc, char **argv)
7
 {
8
    printf("3GPP TS 55.205 Test Sets\n");
9
    void *tall_ctx = talloc_named_const(NULL, 1, "test");
10
osmo-hlr_1.5.0.tar.xz/tests/db/db_test.c -> osmo-hlr_1.6.0.tar.xz/tests/db/db_test.c Changed
46
 
1
@@ -246,7 +246,7 @@
2
    return db_subscr_lu(dbc, subscr_id, &vlr_nr, is_ps, NULL);
3
 }
4
 
5
-static void test_subscr_create_update_sel_delete()
6
+static void test_subscr_create_update_sel_delete(void)
7
 {
8
    int64_t id0, id1, id2, id_short;
9
    comment_start();
10
@@ -541,7 +541,7 @@
11
    return &aud;
12
 }
13
 
14
-static void test_subscr_aud()
15
+static void test_subscr_aud(void)
16
 {
17
    int64_t id;
18
 
19
@@ -783,7 +783,7 @@
20
 
21
 /* Make each key too short in this test. Note that we can't set them longer than the allowed size without changing the
22
  * table structure. */
23
-static void test_subscr_aud_invalid_len()
24
+static void test_subscr_aud_invalid_len(void)
25
 {
26
    int64_t id;
27
 
28
@@ -845,7 +845,7 @@
29
    comment_end();
30
 }
31
 
32
-static void test_subscr_sqn()
33
+static void test_subscr_sqn(void)
34
 {
35
    int64_t id;
36
 
37
@@ -918,7 +918,7 @@
38
    comment_end();
39
 }
40
 
41
-static void test_ind()
42
+static void test_ind(void)
43
 {
44
    comment_start();
45
 
46
osmo-hlr_1.5.0.tar.xz/tests/mslookup/mdns_test.c -> osmo-hlr_1.6.0.tar.xz/tests/mslookup/mdns_test.c Changed
201
 
1
@@ -32,148 +32,6 @@
2
    size_t qname_max_len; /* default: strlen(qname) + 1 */
3
 };
4
 
5
-static const struct qname_enc_dec_test qname_enc_dec_test_data = {
6
-   {
7
-       /* OK: typical mslookup domain */
8
-       .domain = "hlr.1234567.imsi",
9
-       .qname = "\x03" "hlr" "\x07" "1234567" "\x04" "imsi",
10
-   },
11
-   {
12
-       /* Wrong format: double dot */
13
-       .domain = "hlr..imsi",
14
-       .qname = NULL,
15
-   },
16
-   {
17
-       /* Wrong format: double dot */
18
-       .domain = "hlr",
19
-       .qname = "\x03hlr\0\x03imsi",
20
-   },
21
-   {
22
-       /* Wrong format: dot at end */
23
-       .domain = "hlr.",
24
-       .qname = NULL,
25
-   },
26
-   {
27
-       /* Wrong format: dot at start */
28
-       .domain = ".hlr",
29
-       .qname = NULL,
30
-   },
31
-   {
32
-       /* Wrong format: empty */
33
-       .domain = "",
34
-       .qname = NULL,
35
-   },
36
-   {
37
-       /* OK: maximum length */
38
-       .domain =
39
-           "123456789." "123456789." "123456789." "123456789." "123456789."
40
-           "123456789." "123456789." "123456789." "123456789." "123456789."
41
-           "123456789." "123456789." "123456789." "123456789." "123456789."
42
-           "123456789." "123456789." "123456789." "123456789." "123456789."
43
-           "123456789." "123456789." "123456789." "123456789." "123456789."
44
-           "12345"
45
-           ,
46
-       .qname =
47
-           "\t123456789\t123456789\t123456789\t123456789\t123456789"
48
-           "\t123456789\t123456789\t123456789\t123456789\t123456789"
49
-           "\t123456789\t123456789\t123456789\t123456789\t123456789"
50
-           "\t123456789\t123456789\t123456789\t123456789\t123456789"
51
-           "\t123456789\t123456789\t123456789\t123456789\t123456789"
52
-           "\x05" "12345"
53
-   },
54
-   {
55
-       /* Error: too long domain */
56
-       .domain =
57
-           "123456789." "123456789." "123456789." "123456789." "123456789."
58
-           "123456789." "123456789." "123456789." "123456789." "123456789."
59
-           "123456789." "123456789." "123456789." "123456789." "123456789."
60
-           "123456789." "123456789." "123456789." "123456789." "123456789."
61
-           "123456789." "123456789." "123456789." "123456789." "123456789."
62
-           "12345toolong"
63
-           ,
64
-       .qname = NULL,
65
-   },
66
-   {
67
-       /* Error: too long qname */
68
-       .domain = NULL,
69
-       .qname =
70
-           "\t123456789\t123456789\t123456789\t123456789\t123456789"
71
-           "\t123456789\t123456789\t123456789\t123456789\t123456789"
72
-           "\t123456789\t123456789\t123456789\t123456789\t123456789"
73
-           "\t123456789\t123456789\t123456789\t123456789\t123456789"
74
-           "\t123456789\t123456789\t123456789\t123456789\t123456789"
75
-           "\t123456789\t123456789\t123456789\t123456789\t123456789"
76
-   },
77
-   {
78
-       /* Error: wrong token length in qname */
79
-       .domain = NULL,
80
-       .qname = "\x03" "hlr" "\x07" "1234567" "\x05" "imsi",
81
-   },
82
-   {
83
-       /* Error: wrong token length in qname */
84
-       .domain = NULL,
85
-       .qname = "\x02" "hlr" "\x07" "1234567" "\x04" "imsi",
86
-   },
87
-   {
88
-       /* Wrong format: token length at end of qname */
89
-       .domain = NULL,
90
-       .qname = "\x03hlr\x03",
91
-   },
92
-   {
93
-       /* Error: overflow in label length */
94
-       .domain = NULL,
95
-       .qname = "\x03" "hlr" "\x07" "1234567" "\x04" "imsi",
96
-       .qname_max_len = 17,
97
-   },
98
-};
99
-
100
-void test_enc_dec_rfc_qname(void *ctx)
101
-{
102
-   char quote_buf300;
103
-   int i;
104
-
105
-   fprintf(stderr, "-- %s --\n", __func__);
106
-
107
-   for (i = 0; i < ARRAY_SIZE(qname_enc_dec_test_data); i++) {
108
-       const struct qname_enc_dec_test *t = &qname_enc_dec_test_datai;
109
-       char *res;
110
-
111
-       if (t->domain) {
112
-           fprintf(stderr, "domain: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), t->domain, -1));
113
-           fprintf(stderr, "exp: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), t->qname, -1));
114
-           res = osmo_mdns_rfc_qname_encode(ctx, t->domain);
115
-           fprintf(stderr, "res: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), res, -1));
116
-           if (t->qname == res || (t->qname && res && strcmp(t->qname, res) == 0))
117
-               fprintf(stderr, "=> OK\n");
118
-           else
119
-               fprintf(stderr, "=> ERROR\n");
120
-           if (res)
121
-               talloc_free(res);
122
-           fprintf(stderr, "\n");
123
-       }
124
-
125
-       if (t->qname) {
126
-           size_t qname_max_len = t->qname_max_len;
127
-           if (qname_max_len)
128
-               fprintf(stderr, "qname_max_len: %lu\n", qname_max_len);
129
-           else
130
-               qname_max_len = strlen(t->qname) + 1;
131
-
132
-           fprintf(stderr, "qname: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), t->qname, -1));
133
-           fprintf(stderr, "exp: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), t->domain, -1));
134
-           res = osmo_mdns_rfc_qname_decode(ctx, t->qname, qname_max_len);
135
-           fprintf(stderr, "res: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), res, -1));
136
-           if (t->domain == res || (t->domain && res && strcmp(t->domain, res) == 0))
137
-               fprintf(stderr, "=> OK\n");
138
-           else
139
-               fprintf(stderr, "=> ERROR\n");
140
-           if (res)
141
-               talloc_free(res);
142
-           fprintf(stderr, "\n");
143
-       }
144
-   }
145
-}
146
-
147
 #define PRINT_HDR(hdr, name) \
148
    fprintf(stderr, "header %s:\n" \
149
           ".id = %i\n" \
150
@@ -216,7 +74,7 @@
151
    },
152
 };
153
 
154
-void test_enc_dec_rfc_header()
155
+void test_enc_dec_rfc_header(void)
156
 {
157
    int i;
158
 
159
@@ -241,7 +99,7 @@
160
    }
161
 }
162
 
163
-void test_enc_dec_rfc_header_einval()
164
+void test_enc_dec_rfc_header_einval(void)
165
 {
166
    struct osmo_mdns_rfc_header out = {0};
167
    struct msgb *msg = msgb_alloc(4096, "dns_test");
168
@@ -289,7 +147,7 @@
169
        struct msgb *msg = msgb_alloc(4096, "dns_test");
170
 
171
        PRINT_QST(&in, "in");
172
-       assert(osmo_mdns_rfc_question_encode(ctx, msg, &in) == 0);
173
+       assert(osmo_mdns_rfc_question_encode(msg, &in) == 0);
174
        fprintf(stderr, "encoded: %s\n", osmo_hexdump(msgb_data(msg), msgb_length(msg)));
175
        out = osmo_mdns_rfc_question_decode(ctx, msgb_data(msg), msgb_length(msg));
176
        assert(out);
177
@@ -353,7 +211,7 @@
178
        size_t record_len;
179
 
180
        PRINT_REC(&in, "in");
181
-       assert(osmo_mdns_rfc_record_encode(ctx, msg, &in) == 0);
182
+       assert(osmo_mdns_rfc_record_encode(msg, &in) == 0);
183
        fprintf(stderr, "encoded: %s\n", osmo_hexdump(msgb_data(msg), msgb_length(msg)));
184
        out = osmo_mdns_rfc_record_decode(ctx, msgb_data(msg), msgb_length(msg), &record_len);
185
        fprintf(stderr, "record_len: %lu\n", record_len);
186
@@ -578,7 +436,7 @@
187
    }
188
 }
189
 
190
-int main()
191
+int main(int argc, char **argv)
192
 {
193
    void *ctx = talloc_named_const(NULL, 0, "main");
194
    osmo_init_logging2(ctx, NULL);
195
@@ -589,7 +447,6 @@
196
    log_set_print_category_hex(osmo_stderr_target, 0);
197
    log_set_use_color(osmo_stderr_target, 0);
198
 
199
-   test_enc_dec_rfc_qname(ctx);
200
    test_enc_dec_rfc_header();
201
osmo-hlr_1.5.0.tar.xz/tests/mslookup/mdns_test.err -> osmo-hlr_1.6.0.tar.xz/tests/mslookup/mdns_test.err Changed
87
 
1
@@ -1,85 +1,3 @@
2
--- test_enc_dec_rfc_qname --
3
-domain: "hlr.1234567.imsi"
4
-exp: "\3hlr\a1234567\4imsi"
5
-res: "\3hlr\a1234567\4imsi"
6
-=> OK
7
-
8
-qname: "\3hlr\a1234567\4imsi"
9
-exp: "hlr.1234567.imsi"
10
-res: "hlr.1234567.imsi"
11
-=> OK
12
-
13
-domain: "hlr..imsi"
14
-exp: NULL
15
-res: NULL
16
-=> OK
17
-
18
-domain: "hlr"
19
-exp: "\3hlr"
20
-res: "\3hlr"
21
-=> OK
22
-
23
-qname: "\3hlr"
24
-exp: "hlr"
25
-res: "hlr"
26
-=> OK
27
-
28
-domain: "hlr."
29
-exp: NULL
30
-res: NULL
31
-=> OK
32
-
33
-domain: ".hlr"
34
-exp: NULL
35
-res: NULL
36
-=> OK
37
-
38
-domain: ""
39
-exp: NULL
40
-res: NULL
41
-=> OK
42
-
43
-domain: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345"
44
-exp: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\512345"
45
-res: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\512345"
46
-=> OK
47
-
48
-qname: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\512345"
49
-exp: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345"
50
-res: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345"
51
-=> OK
52
-
53
-domain: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345toolong"
54
-exp: NULL
55
-res: NULL
56
-=> OK
57
-
58
-qname: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\
59
-exp: NULL
60
-res: NULL
61
-=> OK
62
-
63
-qname: "\3hlr\a1234567\5imsi"
64
-exp: NULL
65
-res: NULL
66
-=> OK
67
-
68
-qname: "\2hlr\a1234567\4imsi"
69
-exp: NULL
70
-res: NULL
71
-=> OK
72
-
73
-qname: "\3hlr\3"
74
-exp: NULL
75
-res: NULL
76
-=> OK
77
-
78
-qname_max_len: 17
79
-qname: "\3hlr\a1234567\4imsi"
80
-exp: NULL
81
-res: NULL
82
-=> OK
83
-
84
 -- test_enc_dec_rfc_header --
85
 header in:
86
 .id = 1337
87
osmo-hlr_1.5.0.tar.xz/tests/mslookup/mslookup_client_mdns_test.c -> osmo-hlr_1.6.0.tar.xz/tests/mslookup/mslookup_client_mdns_test.c Changed
81
 
1
@@ -80,14 +80,14 @@
2
    return n;
3
 }
4
 
5
-static void server_init()
6
+static void server_init(void)
7
 {
8
    fprintf(stderr, "%s\n", __func__);
9
    server_mc = osmo_mdns_sock_init(ctx, TEST_IP, TEST_PORT, server_recv, NULL, 0);
10
    OSMO_ASSERT(server_mc);
11
 }
12
 
13
-static void server_stop()
14
+static void server_stop(void)
15
 {
16
    fprintf(stderr, "%s\n", __func__);
17
    OSMO_ASSERT(server_mc);
18
@@ -98,7 +98,7 @@
19
 struct osmo_mslookup_client* client;
20
 struct osmo_mslookup_client_method* client_method;
21
 
22
-static void client_init()
23
+static void client_init(void)
24
 {
25
    fprintf(stderr, "%s\n", __func__);
26
    client = osmo_mslookup_client_new(ctx);
27
@@ -117,7 +117,7 @@
28
    osmo_mslookup_client_request_cancel(client, request_handle);
29
 }
30
 
31
-static void client_query()
32
+static void client_query(void)
33
 {
34
    struct osmo_mslookup_id id = {.type = OSMO_MSLOOKUP_ID_IMSI,
35
                      .imsi = "123456789012345"};
36
@@ -134,7 +134,7 @@
37
    osmo_mslookup_client_request(client, &query, &handling);
38
 }
39
 
40
-static void client_stop()
41
+static void client_stop(void)
42
 {
43
    fprintf(stderr, "%s\n", __func__);
44
    osmo_mslookup_client_free(client);
45
@@ -154,7 +154,7 @@
46
    osmo_timers_update(); \
47
 } while (0)
48
 
49
-static void fake_time_start()
50
+static void fake_time_start(void)
51
 {
52
    struct timespec *clock_override;
53
 
54
@@ -167,7 +167,7 @@
55
    osmo_clock_override_enable(CLOCK_MONOTONIC, true);
56
    fake_time_passes(0, 0);
57
 }
58
-static void test_server_client()
59
+static void test_server_client(void)
60
 {
61
    fprintf(stderr, "-- %s --\n", __func__);
62
    server_init();
63
@@ -190,7 +190,7 @@
64
    client_stop();
65
 }
66
 
67
-bool is_multicast_enabled()
68
+bool is_multicast_enabled(void)
69
 {
70
    bool ret = true;
71
    struct addrinfo *ai;
72
@@ -222,7 +222,7 @@
73
 /*
74
  * Run all tests
75
  */
76
-int main()
77
+int main(int argc, char **argv)
78
 {
79
    if (!is_multicast_enabled()) {
80
        fprintf(stderr, "ERROR: multicast is disabled! (OS#4361)");
81
osmo-hlr_1.5.0.tar.xz/tests/mslookup/mslookup_client_test.c -> osmo-hlr_1.6.0.tar.xz/tests/mslookup/mslookup_client_test.c Changed
19
 
1
@@ -147,7 +147,7 @@
2
    osmo_timers_update(); \
3
 } while (0)
4
 
5
-static void fake_time_start()
6
+static void fake_time_start(void)
7
 {
8
    struct timespec *clock_override;
9
 
10
@@ -169,7 +169,7 @@
11
    LOGP(DMSLOOKUP, LOGL_DEBUG, "result_cb(): %s\n", osmo_mslookup_result_name_c(ctx, query, result));
12
 }
13
 
14
-int main()
15
+int main(int argc, char **argv)
16
 {
17
    ctx = talloc_named_const(NULL, 0, "main");
18
    osmo_init_logging2(ctx, NULL);
19
osmo-hlr_1.5.0.tar.xz/tests/mslookup/mslookup_test.c -> osmo-hlr_1.6.0.tar.xz/tests/mslookup/mslookup_test.c Changed
19
 
1
@@ -50,7 +50,7 @@
2
    "qwerty.1.qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmm",
3
 };
4
 
5
-void test_osmo_mslookup_query_init_from_domain_str()
6
+void test_osmo_mslookup_query_init_from_domain_str(void)
7
 {
8
    int i;
9
    for (i = 0; i < ARRAY_SIZE(domains); i++) {
10
@@ -68,7 +68,7 @@
11
    }
12
 }
13
 
14
-int main()
15
+int main(int argc, char **argv)
16
 {
17
    ctx = talloc_named_const(NULL, 0, "main");
18
    osmo_init_logging2(ctx, NULL);
19
osmo-hlr_1.5.0.tar.xz/tests/test_nodes.vty -> osmo-hlr_1.6.0.tar.xz/tests/test_nodes.vty Changed
80
 
1
@@ -47,6 +47,7 @@
2
   no                           Negate a command or set its defaults
3
   ussd                         USSD Configuration
4
   ncss-guard-timeout           Set guard timer for NCSS (call independent SS) session activity
5
+  reject-cause                 GSUP/GMM cause to be sent
6
   store-imei                   Save the IMEI in the database when receiving Check IMEI requests. Note that an MSC does not necessarily send Check IMEI requests (for OsmoMSC, you may want to set 'check-imei-rqd 1').
7
   subscriber-create-on-demand  Make a new record when a subscriber is first seen.
8
 OsmoHLR(config-hlr)# list
9
@@ -61,6 +62,7 @@
10
   ussd default-route external EUSE
11
   no ussd default-route
12
   ncss-guard-timeout <0-255>
13
+  reject-cause (not-found|no-proxy) (imsi-unknown|illegal-ms|plmn-not-allowed|la-not-allowed|roaming-not-allowed|no-suitable-cell-in-la|net-fail|congestion|auth-unacceptable|proto-error-unspec)
14
   store-imei
15
   no store-imei
16
   subscriber-create-on-demand (no-msisdn|<3-15>) (none|cs|ps|cs+ps)
17
@@ -349,15 +351,15 @@
18
   service foo.bar at 123.45.67.89 1011
19
   service baz.bar at 121.31.41.5 1617
20
   service baz.bar at a:b:c::d 1819
21
- msc MSC-1
22
- msc msc-901-70-23
23
-  service foo.bar at 76.54.32.10 1234
24
-  service baz.bar at 12.11.10.98 7654
25
-  service baz.bar at dd:cc:bb::a 3210
26
- msc msc-901-70-42
27
-  service foo.bar at 1.1.1.1 1111
28
-  service baz.bar at 2.2.2.2 2222
29
-  service baz.bar at 2222:2222:2222::2 2222
30
+  msc ipa-name MSC-1
31
+  msc ipa-name msc-901-70-23
32
+   service foo.bar at 76.54.32.10 1234
33
+   service baz.bar at 12.11.10.98 7654
34
+   service baz.bar at dd:cc:bb::a 3210
35
+  msc ipa-name msc-901-70-42
36
+   service foo.bar at 1.1.1.1 1111
37
+   service baz.bar at 2.2.2.2 2222
38
+   service baz.bar at 2222:2222:2222::2 2222
39
  client
40
   gateway-proxy 1.2.3.4 4222
41
   mdns bind 239.192.23.42 4266
42
@@ -404,12 +406,12 @@
43
   mdns bind 239.192.23.42 4266
44
   service foo.bar at 123.45.67.89 1011
45
   service baz.bar at 121.31.41.5 1617
46
- msc MSC-1
47
- msc msc-901-70-23
48
-  service foo.bar at 76.54.32.10 1234
49
-  service baz.bar at 12.11.10.98 7654
50
- msc msc-901-70-42
51
-  service foo.bar at 1.1.1.1 1111
52
+  msc ipa-name MSC-1
53
+  msc ipa-name msc-901-70-23
54
+   service foo.bar at 76.54.32.10 1234
55
+   service baz.bar at 12.11.10.98 7654
56
+  msc ipa-name msc-901-70-42
57
+   service foo.bar at 1.1.1.1 1111
58
  client
59
   mdns bind 239.192.23.42 4266
60
 ...
61
@@ -437,12 +439,12 @@
62
   service foo.bar at 123.45.67.89 1011
63
   service baz.bar at 121.31.41.5 1617
64
   service gsup.hlr at 23.42.17.11 4223
65
- msc MSC-1
66
- msc msc-901-70-23
67
-  service foo.bar at 76.54.32.10 1234
68
-  service baz.bar at 12.11.10.98 7654
69
- msc msc-901-70-42
70
-  service foo.bar at 1.1.1.1 1111
71
+  msc ipa-name MSC-1
72
+  msc ipa-name msc-901-70-23
73
+   service foo.bar at 76.54.32.10 1234
74
+   service baz.bar at 12.11.10.98 7654
75
+  msc ipa-name msc-901-70-42
76
+   service foo.bar at 1.1.1.1 1111
77
  client
78
   mdns bind 239.192.23.42 4266
79
 ...
80
rpmlintrc Added
7
 
1
@@ -0,0 +1,5 @@
2
+# Don't abort the build when finding a library that depends on a package with
3
+# a specific version. This is intentional for nightly builds, we don't want
4
+# libraries from different build dates to be mixed as they might have ABI
5
+# incompatibilities.
6
+setBadness('shlib-fixed-dependency', 0)
7