We truncated the diff of some files because they were too big.
If you want to see the full diff for every file, click here.
Changes of Revision 8
osmo-hlr.spec
Deleted
x
1
2
-#
3
-# spec file for package osmo-hlr
4
-#
5
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
6
-# Copyright (c) 2016, Martin Hauke <mardnh@gmx.de>
7
-#
8
-# All modifications and additions to the file contributed by third parties
9
-# remain the property of their copyright owners, unless otherwise agreed
10
-# upon. The license for this file, and modifications and additions to the
11
-# file, is the same license as for the pristine package itself (unless the
12
-# license for the pristine package is not an Open Source License, in which
13
-# case the license is the MIT License). An "Open Source License" is a
14
-# license that conforms to the Open Source Definition (Version 1.9)
15
-# published by the Open Source Initiative.
16
-
17
-Name: osmo-hlr
18
-Requires: osmocom-latest
19
-Version: 1.7.0
20
-Release: 0
21
-Summary: Osmocom Home Location Register for GSUP protocol towards OsmoSGSN and OsmoCSCN
22
-License: AGPL-3.0-or-later AND GPL-2.0-or-later
23
-Group: Productivity/Telephony/Servers
24
-URL: https://osmocom.org/projects/osmo-hlr
25
-Source: osmo-hlr_1.7.0.tar.xz
26
-Source1: rpmlintrc
27
-BuildRequires: autoconf
28
-BuildRequires: automake
29
-BuildRequires: libtool
30
-BuildRequires: pkgconfig >= 0.20
31
-BuildRequires: python3
32
-%if 0%{?suse_version}
33
-BuildRequires: systemd-rpm-macros
34
-%endif
35
-BuildRequires: pkgconfig(libosmoabis) >= 1.5.0
36
-BuildRequires: pkgconfig(libosmocore) >= 1.9.0
37
-BuildRequires: pkgconfig(libosmoctrl) >= 1.9.0
38
-BuildRequires: pkgconfig(libosmogsm) >= 1.9.0
39
-BuildRequires: pkgconfig(libosmovty) >= 1.9.0
40
-BuildRequires: pkgconfig(sqlite3)
41
-BuildRequires: pkgconfig(talloc) >= 2.0.1
42
-# only needed for populate_hlr_db.pl
43
-Requires: libdbi-drivers-dbd-sqlite3
44
-%{?systemd_requires}
45
-
46
-%description
47
-The GSUP HLR is a stand-alone HLR (Home Location Register) for SIM
48
-and USIM based subscribers which exposes the GSUP protocol towards
49
-its users. OsmoSGSN supports this protocol.
50
-
51
-osmo-gsup-hlr is still very simplistic. It is a single-threaded
52
-architecture and uses only sqlite3 tables as back-end. It is suitable
53
-for installations of the scale that OsmoNITB was able to handle. It
54
-also lacks various features like fine-grained control of subscribed
55
-services (like supplementary services).
56
-
57
-%package -n libosmo-gsup-client0
58
-Requires: osmocom-latest
59
-Summary: Osmocom GSUP (General Subscriber Update Protocol) client library
60
-License: GPL-2.0-or-later
61
-Group: System/Libraries
62
-
63
-%description -n libosmo-gsup-client0
64
-This is a shared library that can be used to implement client programs for
65
-the GSUP protocol. The typical GSUP server is OsmoHLR, with OsmoMSC, OsmoSGSN
66
-and External USSD Entities (EUSEs) using this library to implement clients.
67
-
68
-%package -n libosmo-gsup-client-devel
69
-Requires: osmocom-latest
70
-Summary: Development files for the Osmocom GSUP client library
71
-License: GPL-2.0-or-later
72
-Group: Development/Libraries/C and C++
73
-Requires: libosmo-gsup-client0 = %{version}
74
-
75
-%description -n libosmo-gsup-client-devel
76
-This is a shared library that can be used to implement client programs for
77
-the GSUP protocol. The typical GSUP server is OsmoHLR, with OsmoMSC, OsmoSGSN
78
-and External USSD Entities (EUSEs) using this library to implement clients.
79
-
80
-This subpackage contains libraries and header files for developing
81
-applications that want to make use of libosmo-gsup-client.
82
-
83
-%package -n libosmo-mslookup1
84
-Requires: osmocom-latest
85
-Summary: Osmocom MS lookup library
86
-License: GPL-2.0-or-later
87
-Group: System/Libraries
88
-
89
-%description -n libosmo-mslookup1
90
-This shared library contains routines for looking up mobile subscribers.
91
-
92
-%package -n libosmo-mslookup-devel
93
-Requires: osmocom-latest
94
-Summary: Development files for the Osmocom MS lookup library
95
-License: GPL-2.0-or-later
96
-Group: Development/Libraries/C and C++
97
-Requires: libosmo-mslookup1 = %{version}
98
-
99
-%description -n libosmo-mslookup-devel
100
-This shared library contains routines for looking up mobile subscribers.
101
-
102
-This subpackage contains libraries and header files for developing
103
-applications that want to make use of libosmo-mslookup.
104
-
105
-
106
-%package -n osmo-mslookup-client
107
-Requires: osmocom-latest
108
-Summary: Standalone program using libosmo-mslookup
109
-License: GPL-2.0-or-later
110
-Group: Development/Libraries/C and C++
111
-
112
-%description -n osmo-mslookup-client
113
-Standalone program using libosmo-mslookup to easily integrate with programs
114
-that want to connect services (SIP, SMS,...) to the current location of a
115
-subscriber.
116
-
117
-%prep
118
-%setup -n osmo-hlr -q
119
-
120
-%build
121
-echo "%{version}" >.tarball-version
122
-autoreconf -fi
123
-%configure \
124
- --docdir="%{_docdir}/%{name}" \
125
- --with-systemdsystemunitdir=%{_unitdir} \
126
- --enable-shared \
127
- --disable-static
128
-make V=1 %{?_smp_mflags}
129
-
130
-%install
131
-%make_install
132
-install -d "%{buildroot}/%{_localstatedir}/lib/osmocom"
133
-find %{buildroot} -type f -name "*.la" -delete -print
134
-
135
-%check
136
-make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
137
-
138
-%if 0%{?suse_version}
139
-%preun
140
-%service_del_preun %{name}.service
141
-
142
-%postun
143
-%service_del_postun %{name}.service
144
-
145
-%pre
146
-%service_add_pre %{name}.service
147
-%endif
148
-
149
-%post
150
-%if 0%{?suse_version}
151
-%service_add_post %{name}.service
152
-%endif
153
-/usr/share/osmocom/osmo-hlr-post-upgrade.sh
154
-
155
-%post -n libosmo-gsup-client0 -p /sbin/ldconfig
156
-%postun -n libosmo-gsup-client0 -p /sbin/ldconfig
157
-%post -n libosmo-mslookup1 -p /sbin/ldconfig
158
-%postun -n libosmo-mslookup1 -p /sbin/ldconfig
159
-
160
-%files
161
-%license COPYING
162
-%dir %{_docdir}/%{name}
163
-%dir %{_docdir}/%{name}/examples
164
-%{_docdir}/%{name}/examples/osmo-hlr.cfg
165
-%{_docdir}/%{name}/examples/osmo-hlr-dgsm.cfg
166
-%dir %{_docdir}/%{name}/sql
167
-%{_docdir}/%{name}/sql/hlr.sql
168
-%{_docdir}/%{name}/sql//hlr_data.sql
169
-%dir %{_sysconfdir}/osmocom
170
-%dir %{_localstatedir}/lib/osmocom
171
-%{_bindir}/osmo-hlr
172
-%{_bindir}/osmo-hlr-db-tool
173
-%dir %{_sysconfdir}/osmocom
174
-%config %{_sysconfdir}/osmocom/osmo-hlr.cfg
175
-%{_unitdir}/osmo-hlr.service
176
-%dir %{_datadir}/osmocom
177
-%{_datadir}/osmocom/osmo-hlr-post-upgrade.sh
178
-
179
-%files -n libosmo-gsup-client0
180
-%{_libdir}/libosmo-gsup-client.so.0*
181
-
182
-%files -n libosmo-gsup-client-devel
183
-%{_bindir}/osmo-euse-demo
184
-%dir %{_includedir}/osmocom
185
-%dir %{_includedir}/osmocom/gsupclient
186
-%{_includedir}/osmocom/gsupclient/*.h
187
-%{_libdir}/libosmo-gsup-client.so
188
-%{_libdir}/pkgconfig/libosmo-gsup-client.pc
189
-
190
-%files -n libosmo-mslookup1
191
-%{_libdir}/libosmo-mslookup.so.1*
192
-
193
-%files -n libosmo-mslookup-devel
194
-%dir %{_includedir}/osmocom
195
-%dir %{_includedir}/osmocom/mslookup
196
-%{_includedir}/osmocom/mslookup/*.h
197
-%{_libdir}/libosmo-mslookup.so
198
-%{_libdir}/pkgconfig/libosmo-mslookup.pc
199
-
200
-%files -n osmo-mslookup-client
201
osmo-hlr_1.7.0.tar.xz/contrib/osmo-hlr.spec.in
Deleted
201
1
2
-#
3
-# spec file for package osmo-hlr
4
-#
5
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
6
-# Copyright (c) 2016, Martin Hauke <mardnh@gmx.de>
7
-#
8
-# All modifications and additions to the file contributed by third parties
9
-# remain the property of their copyright owners, unless otherwise agreed
10
-# upon. The license for this file, and modifications and additions to the
11
-# file, is the same license as for the pristine package itself (unless the
12
-# license for the pristine package is not an Open Source License, in which
13
-# case the license is the MIT License). An "Open Source License" is a
14
-# license that conforms to the Open Source Definition (Version 1.9)
15
-# published by the Open Source Initiative.
16
-
17
-Name: osmo-hlr
18
-Requires: osmocom-latest
19
-Version: @VERSION@
20
-Release: 0
21
-Summary: Osmocom Home Location Register for GSUP protocol towards OsmoSGSN and OsmoCSCN
22
-License: AGPL-3.0-or-later AND GPL-2.0-or-later
23
-Group: Productivity/Telephony/Servers
24
-URL: https://osmocom.org/projects/osmo-hlr
25
-Source: %{name}-%{version}.tar.xz
26
-BuildRequires: autoconf
27
-BuildRequires: automake
28
-BuildRequires: libtool
29
-BuildRequires: pkgconfig >= 0.20
30
-BuildRequires: python3
31
-%if 0%{?suse_version}
32
-BuildRequires: systemd-rpm-macros
33
-%endif
34
-BuildRequires: pkgconfig(libosmoabis) >= 1.5.0
35
-BuildRequires: pkgconfig(libosmocore) >= 1.9.0
36
-BuildRequires: pkgconfig(libosmoctrl) >= 1.9.0
37
-BuildRequires: pkgconfig(libosmogsm) >= 1.9.0
38
-BuildRequires: pkgconfig(libosmovty) >= 1.9.0
39
-BuildRequires: pkgconfig(sqlite3)
40
-BuildRequires: pkgconfig(talloc) >= 2.0.1
41
-# only needed for populate_hlr_db.pl
42
-Requires: libdbi-drivers-dbd-sqlite3
43
-%{?systemd_requires}
44
-
45
-%description
46
-The GSUP HLR is a stand-alone HLR (Home Location Register) for SIM
47
-and USIM based subscribers which exposes the GSUP protocol towards
48
-its users. OsmoSGSN supports this protocol.
49
-
50
-osmo-gsup-hlr is still very simplistic. It is a single-threaded
51
-architecture and uses only sqlite3 tables as back-end. It is suitable
52
-for installations of the scale that OsmoNITB was able to handle. It
53
-also lacks various features like fine-grained control of subscribed
54
-services (like supplementary services).
55
-
56
-%package -n libosmo-gsup-client0
57
-Requires: osmocom-latest
58
-Summary: Osmocom GSUP (General Subscriber Update Protocol) client library
59
-License: GPL-2.0-or-later
60
-Group: System/Libraries
61
-
62
-%description -n libosmo-gsup-client0
63
-This is a shared library that can be used to implement client programs for
64
-the GSUP protocol. The typical GSUP server is OsmoHLR, with OsmoMSC, OsmoSGSN
65
-and External USSD Entities (EUSEs) using this library to implement clients.
66
-
67
-%package -n libosmo-gsup-client-devel
68
-Requires: osmocom-latest
69
-Summary: Development files for the Osmocom GSUP client library
70
-License: GPL-2.0-or-later
71
-Group: Development/Libraries/C and C++
72
-Requires: libosmo-gsup-client0 = %{version}
73
-
74
-%description -n libosmo-gsup-client-devel
75
-This is a shared library that can be used to implement client programs for
76
-the GSUP protocol. The typical GSUP server is OsmoHLR, with OsmoMSC, OsmoSGSN
77
-and External USSD Entities (EUSEs) using this library to implement clients.
78
-
79
-This subpackage contains libraries and header files for developing
80
-applications that want to make use of libosmo-gsup-client.
81
-
82
-%package -n libosmo-mslookup1
83
-Requires: osmocom-latest
84
-Summary: Osmocom MS lookup library
85
-License: GPL-2.0-or-later
86
-Group: System/Libraries
87
-
88
-%description -n libosmo-mslookup1
89
-This shared library contains routines for looking up mobile subscribers.
90
-
91
-%package -n libosmo-mslookup-devel
92
-Requires: osmocom-latest
93
-Summary: Development files for the Osmocom MS lookup library
94
-License: GPL-2.0-or-later
95
-Group: Development/Libraries/C and C++
96
-Requires: libosmo-mslookup1 = %{version}
97
-
98
-%description -n libosmo-mslookup-devel
99
-This shared library contains routines for looking up mobile subscribers.
100
-
101
-This subpackage contains libraries and header files for developing
102
-applications that want to make use of libosmo-mslookup.
103
-
104
-
105
-%package -n osmo-mslookup-client
106
-Requires: osmocom-latest
107
-Summary: Standalone program using libosmo-mslookup
108
-License: GPL-2.0-or-later
109
-Group: Development/Libraries/C and C++
110
-
111
-%description -n osmo-mslookup-client
112
-Standalone program using libosmo-mslookup to easily integrate with programs
113
-that want to connect services (SIP, SMS,...) to the current location of a
114
-subscriber.
115
-
116
-%prep
117
-%setup -q
118
-
119
-%build
120
-echo "%{version}" >.tarball-version
121
-autoreconf -fi
122
-%configure \
123
- --docdir="%{_docdir}/%{name}" \
124
- --with-systemdsystemunitdir=%{_unitdir} \
125
- --enable-shared \
126
- --disable-static
127
-make V=1 %{?_smp_mflags}
128
-
129
-%install
130
-%make_install
131
-install -d "%{buildroot}/%{_localstatedir}/lib/osmocom"
132
-find %{buildroot} -type f -name "*.la" -delete -print
133
-
134
-%check
135
-make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
136
-
137
-%if 0%{?suse_version}
138
-%preun
139
-%service_del_preun %{name}.service
140
-
141
-%postun
142
-%service_del_postun %{name}.service
143
-
144
-%pre
145
-%service_add_pre %{name}.service
146
-%endif
147
-
148
-%post
149
-%if 0%{?suse_version}
150
-%service_add_post %{name}.service
151
-%endif
152
-/usr/share/osmocom/osmo-hlr-post-upgrade.sh
153
-
154
-%post -n libosmo-gsup-client0 -p /sbin/ldconfig
155
-%postun -n libosmo-gsup-client0 -p /sbin/ldconfig
156
-%post -n libosmo-mslookup1 -p /sbin/ldconfig
157
-%postun -n libosmo-mslookup1 -p /sbin/ldconfig
158
-
159
-%files
160
-%license COPYING
161
-%dir %{_docdir}/%{name}
162
-%dir %{_docdir}/%{name}/examples
163
-%{_docdir}/%{name}/examples/osmo-hlr.cfg
164
-%{_docdir}/%{name}/examples/osmo-hlr-dgsm.cfg
165
-%dir %{_docdir}/%{name}/sql
166
-%{_docdir}/%{name}/sql/hlr.sql
167
-%{_docdir}/%{name}/sql//hlr_data.sql
168
-%dir %{_sysconfdir}/osmocom
169
-%dir %{_localstatedir}/lib/osmocom
170
-%{_bindir}/osmo-hlr
171
-%{_bindir}/osmo-hlr-db-tool
172
-%dir %{_sysconfdir}/osmocom
173
-%config %{_sysconfdir}/osmocom/osmo-hlr.cfg
174
-%{_unitdir}/osmo-hlr.service
175
-%dir %{_datadir}/osmocom
176
-%{_datadir}/osmocom/osmo-hlr-post-upgrade.sh
177
-
178
-%files -n libosmo-gsup-client0
179
-%{_libdir}/libosmo-gsup-client.so.0*
180
-
181
-%files -n libosmo-gsup-client-devel
182
-%{_bindir}/osmo-euse-demo
183
-%dir %{_includedir}/osmocom
184
-%dir %{_includedir}/osmocom/gsupclient
185
-%{_includedir}/osmocom/gsupclient/*.h
186
-%{_libdir}/libosmo-gsup-client.so
187
-%{_libdir}/pkgconfig/libosmo-gsup-client.pc
188
-
189
-%files -n libosmo-mslookup1
190
-%{_libdir}/libosmo-mslookup.so.1*
191
-
192
-%files -n libosmo-mslookup-devel
193
-%dir %{_includedir}/osmocom
194
-%dir %{_includedir}/osmocom/mslookup
195
-%{_includedir}/osmocom/mslookup/*.h
196
-%{_libdir}/libosmo-mslookup.so
197
-%{_libdir}/pkgconfig/libosmo-mslookup.pc
198
-
199
-%files -n osmo-mslookup-client
200
-%{_bindir}/osmo-mslookup-client
201
osmo-hlr_1.7.0.dsc -> osmo-hlr_1.8.0.dsc
Changed
29
1
2
Source: osmo-hlr
3
Binary: osmo-hlr, osmo-hlr-dbg, libosmo-gsup-client0, libosmo-gsup-client-dev, libosmo-mslookup1, libosmo-mslookup-dev, osmo-mslookup-utils, osmo-hlr-doc
4
Architecture: any all
5
-Version: 1.7.0
6
+Version: 1.8.0
7
Maintainer: Osmocom team <openbsc@lists.osmocom.org>
8
Homepage: https://projects.osmocom.org/projects/osmo-hlr
9
Standards-Version: 3.9.6
10
Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-hlr
11
Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-hlr
12
-Build-Depends: debhelper (>= 10), pkg-config, dh-autoreconf, autotools-dev, python3-minimal, libosmocore-dev (>= 1.9.0), libosmo-abis-dev (>= 1.5.0), libosmo-netif-dev (>= 1.4.0), libsqlite3-dev, sqlite3, osmo-gsm-manuals-dev (>= 1.5.0)
13
+Build-Depends: debhelper (>= 10), pkg-config, dh-autoreconf, autotools-dev, python3-minimal, libosmocore-dev (>= 1.10.0), libosmo-abis-dev (>= 1.6.0), libosmo-netif-dev (>= 1.5.0), libsqlite3-dev, sqlite3, osmo-gsm-manuals-dev (>= 1.6.0)
14
Package-List:
15
libosmo-gsup-client-dev deb net optional arch=any
16
libosmo-gsup-client0 deb libs optional arch=any
17
18
osmo-hlr-doc deb doc optional arch=all
19
osmo-mslookup-utils deb utils optional arch=any
20
Checksums-Sha1:
21
- 8731f52ebdda028b265bf25266a86159fa2efd4a 174520 osmo-hlr_1.7.0.tar.xz
22
+ d860d2a24cb405e333781028a5a4c3ce4a794d9e 176436 osmo-hlr_1.8.0.tar.xz
23
Checksums-Sha256:
24
- 9b7c7f920e4017f4af101dd78bcda5305e86b292e40b3f664da49c4a757fd892 174520 osmo-hlr_1.7.0.tar.xz
25
+ a191ca37c5b2ceb89bdbaec580cf93d11d5ca788dbbcec24c53a0b01a627ecc0 176436 osmo-hlr_1.8.0.tar.xz
26
Files:
27
- cae8d41c0a36b375dc6eb4c52345df24 174520 osmo-hlr_1.7.0.tar.xz
28
+ 7adde67ba5cb72d60ff781839ccc26e7 176436 osmo-hlr_1.8.0.tar.xz
29
osmo-hlr_1.8.0.tar.xz/.github
Added
2
1
+(directory)
2
osmo-hlr_1.8.0.tar.xz/.github/FUNDING.yml
Added
3
1
2
+open_collective: osmocom
3
osmo-hlr_1.7.0.tar.xz/.tarball-version -> osmo-hlr_1.8.0.tar.xz/.tarball-version
Changed
4
1
2
-1.7.0
3
+1.8.0
4
osmo-hlr_1.7.0.tar.xz/Makefile.am -> osmo-hlr_1.8.0.tar.xz/Makefile.am
Changed
12
1
2
3
EXTRA_DIST = \
4
.version \
5
- contrib/osmo-hlr.spec.in \
6
+ README.md \
7
debian \
8
+ git-version-gen \
9
$(NULL)
10
11
AM_DISTCHECK_CONFIGURE_FLAGS = \
12
osmo-hlr_1.7.0.tar.xz/README.md -> osmo-hlr_1.8.0.tar.xz/README.md
Changed
80
1
2
osmo-hlr - Osmocom HLR Implementation
3
=====================================
4
5
-This repository contains a C-language implementation of a GSM Home
6
-Location Register (HLR). It is part of the
7
+This repository contains a C-language implementation of a GSM *Home
8
+Location Register (HLR)*. It is part of the
9
Osmocom(https://osmocom.org/) Open Source Mobile Communications
10
project.
11
12
13
does not use the ETSI/3GPP TCAP/MAP protocol stack. Instead, a much
14
simpler custom protocol (GSUP) is used. This means, OsmoHLR is of
15
no use outside the context of an Osmocom core network. You can use
16
-it with OsmoMSC, OsmoSGSN etc. - but not with third party components.
17
+it with OsmoMSC(https://osmocom.org/projects/osmomsc/wiki),
18
+OsmoSGSN(https://osmocom.org/projects/osmosgsn/wiki) etc. -
19
+but not directly with third party components.
20
21
Homepage
22
--------
23
24
-The official homepage of the project is
25
-https://osmocom.org/projects/osmo-hlr/wiki
26
+The official homepage of the project is <https://osmocom.org/projects/osmo-hlr/wiki>.
27
28
GIT Repository
29
--------------
30
31
User Manuals and VTY reference manuals are optionally built in PDF form
32
as part of the build process.
33
34
-Pre-rendered PDF version of the current "master" can be found at
35
-User Manual(https://ftp.osmocom.org/docs/latest/osmohlr-usermanual.pdf)
36
-as well as the VTY reference manuals
37
+Pre-rendered PDF versions of the current `master` can be found at
38
+
39
+* User Manual(https://ftp.osmocom.org/docs/latest/osmohlr-usermanual.pdf)
40
* VTY Reference Manual for osmo-hlr(https://ftp.osmocom.org/docs/latest/osmohlr-vty-reference.pdf)
41
42
+Forum
43
+-----
44
+
45
+We welcome any osmo-hlr related discussions in the
46
+Cellular Network Infrastructure -> 2G/3G Core Network(https://discourse.osmocom.org/c/cni/2g-3g-cn)
47
+section of the osmocom discourse (web based Forum).
48
+
49
Mailing List
50
------------
51
52
53
Rules(https://osmocom.org/projects/cellular-infrastructure/wiki/Mailing_List_Rules)
54
when posting.
55
56
+Issue Tracker
57
+-------------
58
+
59
+We use the issue tracker of the osmo-hlr project on osmocom.org(https://osmocom.org/projects/osmo-hlr/issues) for
60
+tracking the state of bug reports and feature requests. Feel free to submit any issues you may find, or help
61
+us out by resolving existing issues.
62
+
63
Contributing
64
------------
65
66
Our coding standards are described at
67
-https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards
68
+<https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards>
69
70
-We us a gerrit based patch submission/review process for managing
71
+We use a Gerrit based patch submission/review process for managing
72
contributions. Please see
73
-https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit for
74
+<https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit> for
75
more details
76
77
The current patch queue for osmo-hlr can be seen at
78
-https://gerrit.osmocom.org/#/q/project:osmo-hlr+status:open
79
+<https://gerrit.osmocom.org/#/q/project:osmo-hlr+status:open>
80
osmo-hlr_1.7.0.tar.xz/TODO-RELEASE -> osmo-hlr_1.8.0.tar.xz/TODO-RELEASE
Changed
15
1
2
# When cleaning up this file: bump API version in corresponding Makefile.am and rename corresponding debian/lib*.install
3
-# according to https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info
4
-# In short:
5
+# according to https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_release
6
+# In short: https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info
7
# LIBVERSION=c:r:a
8
# If the library source code has changed at all since the last update, then increment revision: c:r + 1:a.
9
-# If any interfaces have been added, removed, or changed since the last update: c + 1:0:0.
10
+# If any interfaces have been added, removed, or changed since the last update: c + 1:0:a.
11
# If any interfaces have been added since the last public release: c:r:a + 1.
12
# If any interfaces have been removed or changed since the last public release: c:r:0.
13
-#library what description / commit summary line
14
+#library what description / commit summary line
15
osmo-hlr_1.7.0.tar.xz/configure.ac -> osmo-hlr_1.8.0.tar.xz/configure.ac
Changed
26
1
2
3
PKG_CHECK_MODULES(TALLOC, talloc >= 2.0.1)
4
5
-PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.9.0)
6
-PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.9.0)
7
-PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.9.0)
8
-PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.9.0)
9
-PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.5.0)
10
+PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.10.0)
11
+PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.10.0)
12
+PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.10.0)
13
+PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.10.0)
14
+PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.6.0)
15
16
PKG_CHECK_MODULES(SQLITE3, sqlite3)
17
18
19
contrib/Makefile
20
contrib/systemd/Makefile
21
contrib/dgsm/Makefile
22
- contrib/osmo-hlr.spec
23
tests/Makefile
24
tests/auc/Makefile
25
tests/auc/gen_ts_55_205_test_sets/Makefile
26
osmo-hlr_1.7.0.tar.xz/contrib/systemd/osmo-hlr.service -> osmo-hlr_1.8.0.tar.xz/contrib/systemd/osmo-hlr.service
Changed
10
1
2
Restart=always
3
StateDirectory=osmocom
4
WorkingDirectory=%S/osmocom
5
+User=osmocom
6
+Group=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
osmo-hlr_1.7.0.tar.xz/debian/changelog -> osmo-hlr_1.8.0.tar.xz/debian/changelog
Changed
38
1
2
+osmo-hlr (1.8.0) unstable; urgency=medium
3
+
4
+ Vadim Yanitskiy
5
+ * hlr_vty.c: drop redundant include of hlr_ussd.h
6
+ * build: include {README.md,git-version-gen} into the release tarball
7
+ * README.md: cosmetic: fix a typo
8
+
9
+ Mychaela N. Falconia
10
+ * SMS over GSUP: implement vty config of SMSC routing
11
+ * SMS over GSUP: implement forwarding of MO SMS
12
+ * SMS over GSUP: implement forwarding of MT SMS
13
+ * SMS over GSUP: handle READY-FOR-SM.req from MSCs
14
+ * ctrl: add subscriber.by-*.imsi GET-able variable
15
+
16
+ Andreas Eversberg
17
+ * Use uniform log format for default config files
18
+
19
+ Harald Welte
20
+ * Add funding link to github mirror
21
+ * README.md: Improve mark-down formatting
22
+ * README.md: Add Forum and Issue Tracker sections
23
+
24
+ Max
25
+ * .deb/.rpm: add osmocom user during package install
26
+
27
+ Oliver Smith
28
+ * .deb/.rpm: various fixes related to non-root
29
+ * contrib: remove rpm spec file
30
+ * debian/postinst: add checks, be verbose
31
+ * mslookup: don't ignore return value of write()
32
+
33
+ -- Oliver Smith <osmith@sysmocom.de> Wed, 24 Jul 2024 15:29:12 +0200
34
+
35
osmo-hlr (1.7.0) unstable; urgency=medium
36
37
Oliver Smith
38
osmo-hlr_1.7.0.tar.xz/debian/control -> osmo-hlr_1.8.0.tar.xz/debian/control
Changed
18
1
2
dh-autoreconf,
3
autotools-dev,
4
python3-minimal,
5
- libosmocore-dev (>= 1.9.0),
6
- libosmo-abis-dev (>= 1.5.0),
7
- libosmo-netif-dev (>= 1.4.0),
8
+ libosmocore-dev (>= 1.10.0),
9
+ libosmo-abis-dev (>= 1.6.0),
10
+ libosmo-netif-dev (>= 1.5.0),
11
libsqlite3-dev,
12
sqlite3,
13
- osmo-gsm-manuals-dev (>= 1.5.0)
14
+ osmo-gsm-manuals-dev (>= 1.6.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
osmo-hlr_1.7.0.tar.xz/debian/postinst -> osmo-hlr_1.8.0.tar.xz/debian/postinst
Changed
43
1
2
# post-upgrade script in both cases, it won't do anything if there is nothing
3
# to do.
4
/usr/share/osmocom/osmo-hlr-post-upgrade.sh
5
+
6
+case "$1" in
7
+ configure)
8
+ # Create the osmocom group and user (if it doesn't exist yet)
9
+ if ! getent group osmocom >/dev/null; then
10
+ groupadd --system osmocom
11
+ fi
12
+ if ! getent passwd osmocom >/dev/null; then
13
+ useradd \
14
+ --system \
15
+ --gid osmocom \
16
+ --home-dir /var/lib/osmocom \
17
+ --shell /sbin/nologin \
18
+ --comment "Open Source Mobile Communications" \
19
+ osmocom
20
+ fi
21
+
22
+ # Fix permissions of previous (root-owned) install (OS#4107)
23
+ if dpkg --compare-versions "$2" le "1.8.0"; then
24
+ if -e /etc/osmocom/osmo-hlr.cfg ; then
25
+ chown -v osmocom:osmocom /etc/osmocom/osmo-hlr.cfg
26
+ chmod -v 0660 /etc/osmocom/osmo-hlr.cfg
27
+ fi
28
+
29
+ if -d /etc/osmocom ; then
30
+ chown -v root:osmocom /etc/osmocom
31
+ chmod -v 2775 /etc/osmocom
32
+ fi
33
+
34
+ mkdir -p /var/lib/osmocom
35
+ chown -R -v osmocom:osmocom /var/lib/osmocom
36
+ fi
37
+ ;;
38
+esac
39
+
40
+# dh_installdeb(1) will replace this with shell code automatically
41
+# generated by other debhelper scripts.
42
+#DEBHELPER#
43
osmo-hlr_1.7.0.tar.xz/doc/examples/osmo-hlr-dgsm.cfg -> osmo-hlr_1.8.0.tar.xz/doc/examples/osmo-hlr-dgsm.cfg
Changed
14
1
2
# OsmoHLR example configuration for Distributed GSM (mslookup)
3
+log stderr
4
+ logging color 1
5
+ logging print category-hex 0
6
+ logging print category 1
7
+ logging timestamp 0
8
+ logging print file basename last
9
+ logging print level 1
10
+
11
hlr
12
gsup
13
# For D-GSM roaming, osmo-hlr's GSUP must listen on a public IP:
14
osmo-hlr_1.7.0.tar.xz/doc/examples/osmo-hlr.cfg -> osmo-hlr_1.8.0.tar.xz/doc/examples/osmo-hlr.cfg
Changed
16
1
2
log stderr
3
logging filter all 1
4
logging color 1
5
- logging print category 1
6
logging print category-hex 0
7
- logging print level 1
8
+ logging print category 1
9
+ logging timestamp 0
10
logging print file basename last
11
- logging print extended-timestamp 1
12
+ logging print level 1
13
logging level main notice
14
logging level db notice
15
logging level auc notice
16
osmo-hlr_1.7.0.tar.xz/include/osmocom/hlr/Makefile.am -> osmo-hlr_1.8.0.tar.xz/include/osmocom/hlr/Makefile.am
Changed
9
1
2
gsup_router.h \
3
gsup_server.h \
4
hlr.h \
5
+ hlr_sms.h \
6
hlr_ussd.h \
7
hlr_vty.h \
8
hlr_vty_subscr.h \
9
osmo-hlr_1.7.0.tar.xz/include/osmocom/hlr/hlr.h -> osmo-hlr_1.8.0.tar.xz/include/osmocom/hlr/hlr.h
Changed
12
1
2
3
struct llist_head ss_sessions;
4
5
+ struct llist_head smsc_list;
6
+ struct llist_head smsc_routes;
7
+ struct hlr_smsc *smsc_default;
8
+
9
bool store_imei;
10
11
bool subscr_create_on_demand;
12
osmo-hlr_1.8.0.tar.xz/include/osmocom/hlr/hlr_sms.h
Added
35
1
2
+#pragma once
3
+
4
+#include <osmocom/core/linuxlist.h>
5
+
6
+struct hlr_smsc {
7
+ /* g_hlr->smsc_list */
8
+ struct llist_head list;
9
+ struct hlr *hlr;
10
+ /* name (must match the IPA ID tag) */
11
+ const char *name;
12
+ /* human-readable description */
13
+ const char *description;
14
+};
15
+
16
+struct hlr_smsc *smsc_find(struct hlr *hlr, const char *name);
17
+struct hlr_smsc *smsc_alloc(struct hlr *hlr, const char *name);
18
+void smsc_free(struct hlr_smsc *smsc);
19
+
20
+struct hlr_smsc_route {
21
+ /* g_hlr->smsc_routes */
22
+ struct llist_head list;
23
+ const char *num_addr;
24
+ struct hlr_smsc *smsc;
25
+};
26
+
27
+struct hlr_smsc_route *smsc_route_find(struct hlr *hlr, const char *num_addr);
28
+struct hlr_smsc_route *smsc_route_alloc(struct hlr *hlr, const char *num_addr,
29
+ struct hlr_smsc *smsc);
30
+void smsc_route_free(struct hlr_smsc_route *rt);
31
+
32
+void forward_mo_sms(struct osmo_gsup_req *req);
33
+void forward_mt_sms(struct osmo_gsup_req *req);
34
+void rx_ready_for_sm_req(struct osmo_gsup_req *req);
35
osmo-hlr_1.7.0.tar.xz/include/osmocom/hlr/hlr_vty.h -> osmo-hlr_1.8.0.tar.xz/include/osmocom/hlr/hlr_vty.h
Changed
9
1
2
HLR_NODE = _LAST_OSMOVTY_NODE + 1,
3
GSUP_NODE,
4
EUSE_NODE,
5
+ SMSC_NODE,
6
MSLOOKUP_NODE,
7
MSLOOKUP_SERVER_NODE,
8
MSLOOKUP_SERVER_MSC_NODE,
9
osmo-hlr_1.7.0.tar.xz/src/Makefile.am -> osmo-hlr_1.8.0.tar.xz/src/Makefile.am
Changed
9
1
2
hlr_vty.c \
3
hlr_vty_subscr.c \
4
gsup_send.c \
5
+ hlr_sms.c \
6
hlr_ussd.c \
7
proxy.c \
8
dgsm.c \
9
osmo-hlr_1.7.0.tar.xz/src/ctrl.c -> osmo-hlr_1.8.0.tar.xz/src/ctrl.c
Changed
30
1
2
return set_subscr_cs_ps_enabled(cmd, data, false);
3
}
4
5
+CTRL_CMD_DEFINE_RO(subscr_imsi, "imsi");
6
+static int get_subscr_imsi(struct ctrl_cmd *cmd, void *data)
7
+{
8
+ struct hlr_subscriber subscr;
9
+ struct hlr *hlr = data;
10
+ const char *by_selector = cmd->node;
11
+
12
+ if (!get_subscriber(hlr->dbc, by_selector, &subscr, cmd))
13
+ return CTRL_CMD_ERROR;
14
+
15
+ cmd->reply = talloc_strdup(cmd, subscr.imsi);
16
+ return CTRL_CMD_REPLY;
17
+}
18
+
19
CTRL_CMD_DEFINE(subscr_msisdn, "msisdn");
20
static int verify_subscr_msisdn(struct ctrl_cmd *cmd, const char *value, void *data)
21
{
22
23
rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_info_all);
24
rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_ps_enabled);
25
rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_cs_enabled);
26
+ rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_imsi);
27
rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_msisdn);
28
rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_aud2g);
29
rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_aud3g);
30
osmo-hlr_1.7.0.tar.xz/src/hlr.c -> osmo-hlr_1.8.0.tar.xz/src/hlr.c
Changed
36
1
2
#include <osmocom/hlr/rand.h>
3
#include <osmocom/hlr/hlr_vty.h>
4
#include <osmocom/hlr/hlr_ussd.h>
5
+#include <osmocom/hlr/hlr_sms.h>
6
#include <osmocom/hlr/dgsm.h>
7
#include <osmocom/hlr/proxy.h>
8
#include <osmocom/hlr/lu_fsm.h>
9
10
case OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST:
11
rx_check_imei_req(req);
12
break;
13
+ case OSMO_GSUP_MSGT_MO_FORWARD_SM_REQUEST:
14
+ forward_mo_sms(req);
15
+ break;
16
+ case OSMO_GSUP_MSGT_MT_FORWARD_SM_REQUEST:
17
+ forward_mt_sms(req);
18
+ break;
19
+ case OSMO_GSUP_MSGT_READY_FOR_SM_REQUEST:
20
+ rx_ready_for_sm_req(req);
21
+ break;
22
default:
23
LOGP(DMAIN, LOGL_DEBUG, "Unhandled GSUP message type %s\n",
24
osmo_gsup_message_type_name(req->gsup.message_type));
25
26
27
g_hlr = talloc_zero(hlr_ctx, struct hlr);
28
INIT_LLIST_HEAD(&g_hlr->euse_list);
29
+ INIT_LLIST_HEAD(&g_hlr->smsc_list);
30
INIT_LLIST_HEAD(&g_hlr->ss_sessions);
31
INIT_LLIST_HEAD(&g_hlr->ussd_routes);
32
+ INIT_LLIST_HEAD(&g_hlr->smsc_routes);
33
INIT_LLIST_HEAD(&g_hlr->mslookup.server.local_site_services);
34
g_hlr->db_file_path = talloc_strdup(g_hlr, HLR_DEFAULT_DB_FILE_PATH);
35
g_hlr->mslookup.server.mdns.domain_suffix = talloc_strdup(g_hlr, OSMO_MDNS_DOMAIN_SUFFIX_DEFAULT);
36
osmo-hlr_1.8.0.tar.xz/src/hlr_sms.c
Added
201
1
2
+/* OsmoHLR SMS-over-GSUP routing implementation */
3
+
4
+/* Author: Mychaela N. Falconia <falcon@freecalypso.org>, 2023 - however,
5
+ * Mother Mychaela's contributions are NOT subject to copyright.
6
+ * No rights reserved, all rights relinquished.
7
+ *
8
+ * Based on earlier unmerged work by Vadim Yanitskiy, 2019.
9
+ *
10
+ * This program is free software; you can redistribute it and/or modify
11
+ * it under the terms of the GNU Affero General Public License as published by
12
+ * the Free Software Foundation; either version 3 of the License, or
13
+ * (at your option) any later version.
14
+ *
15
+ * This program is distributed in the hope that it will be useful,
16
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ * GNU Affero General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU Affero General Public License
21
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
22
+ */
23
+
24
+#include <stdint.h>
25
+#include <string.h>
26
+#include <errno.h>
27
+
28
+#include <osmocom/core/talloc.h>
29
+#include <osmocom/gsm/gsup.h>
30
+#include <osmocom/gsm/gsm48_ie.h>
31
+#include <osmocom/gsm/protocol/gsm_04_11.h>
32
+
33
+#include <osmocom/hlr/hlr.h>
34
+#include <osmocom/hlr/hlr_sms.h>
35
+#include <osmocom/hlr/gsup_server.h>
36
+#include <osmocom/hlr/gsup_router.h>
37
+#include <osmocom/hlr/logging.h>
38
+#include <osmocom/hlr/db.h>
39
+
40
+/***********************************************************************
41
+ * core data structures expressing config from VTY
42
+ ***********************************************************************/
43
+
44
+struct hlr_smsc *smsc_find(struct hlr *hlr, const char *name)
45
+{
46
+ struct hlr_smsc *smsc;
47
+
48
+ llist_for_each_entry(smsc, &hlr->smsc_list, list) {
49
+ if (!strcmp(smsc->name, name))
50
+ return smsc;
51
+ }
52
+ return NULL;
53
+}
54
+
55
+struct hlr_smsc *smsc_alloc(struct hlr *hlr, const char *name)
56
+{
57
+ struct hlr_smsc *smsc = smsc_find(hlr, name);
58
+ if (smsc)
59
+ return NULL;
60
+
61
+ smsc = talloc_zero(hlr, struct hlr_smsc);
62
+ smsc->name = talloc_strdup(smsc, name);
63
+ smsc->hlr = hlr;
64
+ llist_add_tail(&smsc->list, &hlr->smsc_list);
65
+
66
+ return smsc;
67
+}
68
+
69
+void smsc_free(struct hlr_smsc *smsc)
70
+{
71
+ llist_del(&smsc->list);
72
+ talloc_free(smsc);
73
+}
74
+
75
+struct hlr_smsc_route *smsc_route_find(struct hlr *hlr, const char *num_addr)
76
+{
77
+ struct hlr_smsc_route *rt;
78
+
79
+ llist_for_each_entry(rt, &hlr->smsc_routes, list) {
80
+ if (!strcmp(rt->num_addr, num_addr))
81
+ return rt;
82
+ }
83
+ return NULL;
84
+}
85
+
86
+struct hlr_smsc_route *smsc_route_alloc(struct hlr *hlr, const char *num_addr,
87
+ struct hlr_smsc *smsc)
88
+{
89
+ struct hlr_smsc_route *rt;
90
+
91
+ if (smsc_route_find(hlr, num_addr))
92
+ return NULL;
93
+
94
+ rt = talloc_zero(hlr, struct hlr_smsc_route);
95
+ rt->num_addr = talloc_strdup(rt, num_addr);
96
+ rt->smsc = smsc;
97
+ llist_add_tail(&rt->list, &hlr->smsc_routes);
98
+
99
+ return rt;
100
+}
101
+
102
+void smsc_route_free(struct hlr_smsc_route *rt)
103
+{
104
+ llist_del(&rt->list);
105
+ talloc_free(rt);
106
+}
107
+
108
+/***********************************************************************
109
+ * forwarding of MO SMS to SMSCs based on SM-RP-DA
110
+ ***********************************************************************/
111
+
112
+static const struct hlr_smsc *find_smsc_route(const char *smsc_addr)
113
+{
114
+ const struct hlr_smsc_route *rt;
115
+
116
+ rt = smsc_route_find(g_hlr, smsc_addr);
117
+ if (rt)
118
+ return rt->smsc;
119
+ return g_hlr->smsc_default;
120
+}
121
+
122
+static void respond_with_sm_rp_cause(struct osmo_gsup_req *req,
123
+ uint8_t sm_rp_cause)
124
+{
125
+ struct osmo_gsup_message rsp_msg = { };
126
+
127
+ rsp_msg.sm_rp_cause = &sm_rp_cause;
128
+ osmo_gsup_req_respond(req, &rsp_msg, true, true);
129
+}
130
+
131
+/* Short Message from MSC/VLR towards SMSC */
132
+void forward_mo_sms(struct osmo_gsup_req *req)
133
+{
134
+ uint8_t gsm48_decode_bufferGSM411_SMSC_ADDR_MAX_OCTETS;
135
+ char smsc_addrGSM411_SMSC_ADDR_MAX_DIGITS+1;
136
+ const struct hlr_smsc *smsc;
137
+ struct osmo_cni_peer_id dest_peer;
138
+
139
+ /* Make sure SM-RP-DA (SMSC address) is present */
140
+ if (req->gsup.sm_rp_da == NULL || !req->gsup.sm_rp_da_len) {
141
+ osmo_gsup_req_respond_err(req, GMM_CAUSE_INV_MAND_INFO,
142
+ "missing SM-RP-DA");
143
+ return;
144
+ }
145
+
146
+ if (req->gsup.sm_rp_da_type != OSMO_GSUP_SMS_SM_RP_ODA_SMSC_ADDR) {
147
+ osmo_gsup_req_respond_err(req, GMM_CAUSE_INV_MAND_INFO,
148
+ "SM-RP-DA type is not SMSC");
149
+ return;
150
+ }
151
+
152
+ /* Enforce the length constrainst on SM-RP-DA, as specified in
153
+ * GSM 04.11 section 8.2.5.2. Also enforce absence of ToN/NPI
154
+ * extension octets at the same time. */
155
+ if (req->gsup.sm_rp_da_len < GSM411_SMSC_ADDR_MIN_OCTETS ||
156
+ req->gsup.sm_rp_da_len > GSM411_SMSC_ADDR_MAX_OCTETS ||
157
+ !(req->gsup.sm_rp_da0 & 0x80)) {
158
+ /* This form of bogosity originates from the MS,
159
+ * not from OsmoMSC or any other Osmocom network elements! */
160
+ LOGP(DLSMS, LOGL_NOTICE,
161
+ "Rx '%s' (IMSI-%s) contains invalid SM-RP-DA from MS\n",
162
+ osmo_gsup_message_type_name(req->gsup.message_type),
163
+ req->gsup.imsi);
164
+ respond_with_sm_rp_cause(req, GSM411_RP_CAUSE_SEMANT_INC_MSG);
165
+ return;
166
+ }
167
+
168
+ /* Decode SMSC address from SM-RP-DA */
169
+ gsm48_decode_buffer0 = req->gsup.sm_rp_da_len - 1;
170
+ memcpy(gsm48_decode_buffer + 1, req->gsup.sm_rp_da + 1,
171
+ req->gsup.sm_rp_da_len - 1);
172
+ gsm48_decode_bcd_number2(smsc_addr, sizeof(smsc_addr),
173
+ gsm48_decode_buffer,
174
+ req->gsup.sm_rp_da_len, 0);
175
+
176
+ /* Look for a route to this SMSC */
177
+ smsc = find_smsc_route(smsc_addr);
178
+ if (smsc == NULL) {
179
+ LOGP(DLSMS, LOGL_NOTICE,
180
+ "Failed to find a route for '%s' (IMSI-%s, SMSC-Addr-%s)\n",
181
+ osmo_gsup_message_type_name(req->gsup.message_type),
182
+ req->gsup.imsi, smsc_addr);
183
+ respond_with_sm_rp_cause(req,
184
+ GSM411_RP_CAUSE_MO_NUM_UNASSIGNED);
185
+ return;
186
+ }
187
+
188
+ /* We got the IPA name of our SMSC - forward the message */
189
+ osmo_cni_peer_id_set(&dest_peer, OSMO_CNI_PEER_ID_IPA_NAME,
190
+ (const uint8_t *) smsc->name,
191
+ strlen(smsc->name) + 1);
192
+ osmo_gsup_forward_to_local_peer(req->cb_data, &dest_peer, req, NULL);
193
+}
194
+
195
+/***********************************************************************
196
+ * forwarding of MT SMS from SMSCs to MSC/VLR based on IMSI
197
+ ***********************************************************************/
198
+
199
+void forward_mt_sms(struct osmo_gsup_req *req)
200
+{
201
osmo-hlr_1.7.0.tar.xz/src/hlr_vty.c -> osmo-hlr_1.8.0.tar.xz/src/hlr_vty.c
Changed
195
1
2
#include <osmocom/hlr/hlr_vty.h>
3
#include <osmocom/hlr/hlr_vty_subscr.h>
4
#include <osmocom/hlr/hlr_ussd.h>
5
+#include <osmocom/hlr/hlr_sms.h>
6
#include <osmocom/hlr/gsup_server.h>
7
8
static const struct value_string gsm48_gmm_cause_vty_names = {
9
10
* USSD Entity
11
***********************************************************************/
12
13
-#include <osmocom/hlr/hlr_ussd.h>
14
-
15
#define USSD_STR "USSD Configuration\n"
16
#define UROUTE_STR "Routing Configuration\n"
17
#define PREFIX_STR "Prefix-Matching Route\n" "USSD Prefix\n"
18
19
return CMD_SUCCESS;
20
}
21
22
+/***********************************************************************
23
+ * Routing of SM-RL to GSUP-attached SMSCs
24
+ ***********************************************************************/
25
+
26
+#define SMSC_STR "Configuration of GSUP routing to SMSCs\n"
27
+
28
+struct cmd_node smsc_node = {
29
+ SMSC_NODE,
30
+ "%s(config-hlr-smsc)# ",
31
+ 1,
32
+};
33
+
34
+DEFUN(cfg_smsc_entity, cfg_smsc_entity_cmd,
35
+ "smsc entity NAME",
36
+ SMSC_STR
37
+ "Configure a particular external SMSC\n"
38
+ "IPA name of the external SMSC\n")
39
+{
40
+ struct hlr_smsc *smsc;
41
+ const char *id = argv0;
42
+
43
+ smsc = smsc_find(g_hlr, id);
44
+ if (!smsc) {
45
+ smsc = smsc_alloc(g_hlr, id);
46
+ if (!smsc)
47
+ return CMD_WARNING;
48
+ }
49
+ vty->index = smsc;
50
+ vty->index_sub = &smsc->description;
51
+ vty->node = SMSC_NODE;
52
+
53
+ return CMD_SUCCESS;
54
+}
55
+
56
+DEFUN(cfg_no_smsc_entity, cfg_no_smsc_entity_cmd,
57
+ "no smsc entity NAME",
58
+ NO_STR SMSC_STR "Remove a particular external SMSC\n"
59
+ "IPA name of the external SMSC\n")
60
+{
61
+ struct hlr_smsc *smsc = smsc_find(g_hlr, argv0);
62
+ if (!smsc) {
63
+ vty_out(vty, "%% Cannot remove non-existent SMSC %s%s",
64
+ argv0, VTY_NEWLINE);
65
+ return CMD_WARNING;
66
+ }
67
+ if (g_hlr->smsc_default == smsc) {
68
+ vty_out(vty,
69
+ "%% Cannot remove SMSC %s, it is the default route%s",
70
+ argv0, VTY_NEWLINE);
71
+ return CMD_WARNING;
72
+ }
73
+ smsc_free(smsc);
74
+ return CMD_SUCCESS;
75
+}
76
+
77
+DEFUN(cfg_smsc_route, cfg_smsc_route_cmd,
78
+ "smsc route NUMBER NAME",
79
+ SMSC_STR
80
+ "Configure GSUP route to a particular SMSC\n"
81
+ "Numeric address of this SMSC, must match EF.SMSP programming in SIMs\n"
82
+ "IPA name of the external SMSC\n")
83
+{
84
+ struct hlr_smsc *smsc = smsc_find(g_hlr, argv1);
85
+ struct hlr_smsc_route *rt = smsc_route_find(g_hlr, argv0);
86
+ if (rt) {
87
+ vty_out(vty,
88
+ "%% Cannot add another? route for SMSC address %s%s",
89
+ argv0, VTY_NEWLINE);
90
+ return CMD_WARNING;
91
+ }
92
+ if (!smsc) {
93
+ vty_out(vty, "%% Cannot find SMSC '%s'%s", argv1,
94
+ VTY_NEWLINE);
95
+ return CMD_WARNING;
96
+ }
97
+ smsc_route_alloc(g_hlr, argv0, smsc);
98
+
99
+ return CMD_SUCCESS;
100
+}
101
+
102
+DEFUN(cfg_no_smsc_route, cfg_no_smsc_route_cmd,
103
+ "no smsc route NUMBER",
104
+ NO_STR SMSC_STR "Remove GSUP route to a particular SMSC\n"
105
+ "Numeric address of the SMSC\n")
106
+{
107
+ struct hlr_smsc_route *rt = smsc_route_find(g_hlr, argv0);
108
+ if (!rt) {
109
+ vty_out(vty, "%% Cannot find route for SMSC address %s%s",
110
+ argv0, VTY_NEWLINE);
111
+ return CMD_WARNING;
112
+ }
113
+ smsc_route_free(rt);
114
+
115
+ return CMD_SUCCESS;
116
+}
117
+
118
+DEFUN(cfg_smsc_defroute, cfg_smsc_defroute_cmd,
119
+ "smsc default-route NAME",
120
+ SMSC_STR
121
+ "Configure default SMSC route for unknown SMSC numeric addresses\n"
122
+ "IPA name of the external SMSC\n")
123
+{
124
+ struct hlr_smsc *smsc;
125
+
126
+ smsc = smsc_find(g_hlr, argv0);
127
+ if (!smsc) {
128
+ vty_out(vty, "%% Cannot find SMSC %s%s", argv0, VTY_NEWLINE);
129
+ return CMD_WARNING;
130
+ }
131
+
132
+ if (g_hlr->smsc_default != smsc) {
133
+ vty_out(vty, "Switching default route from %s to %s%s",
134
+ g_hlr->smsc_default ? g_hlr->smsc_default->name : "<none>",
135
+ smsc->name, VTY_NEWLINE);
136
+ g_hlr->smsc_default = smsc;
137
+ }
138
+
139
+ return CMD_SUCCESS;
140
+}
141
+
142
+DEFUN(cfg_no_smsc_defroute, cfg_no_smsc_defroute_cmd,
143
+ "no smsc default-route",
144
+ NO_STR SMSC_STR
145
+ "Remove default SMSC route for unknown SMSC numeric addresses\n")
146
+{
147
+ g_hlr->smsc_default = NULL;
148
+
149
+ return CMD_SUCCESS;
150
+}
151
+
152
+static void dump_one_smsc(struct vty *vty, struct hlr_smsc *smsc)
153
+{
154
+ vty_out(vty, " smsc entity %s%s", smsc->name, VTY_NEWLINE);
155
+}
156
+
157
+static int config_write_smsc(struct vty *vty)
158
+{
159
+ struct hlr_smsc *smsc;
160
+ struct hlr_smsc_route *rt;
161
+
162
+ llist_for_each_entry(smsc, &g_hlr->smsc_list, list)
163
+ dump_one_smsc(vty, smsc);
164
+
165
+ llist_for_each_entry(rt, &g_hlr->smsc_routes, list) {
166
+ vty_out(vty, " smsc route %s %s%s", rt->num_addr,
167
+ rt->smsc->name, VTY_NEWLINE);
168
+ }
169
+
170
+ if (g_hlr->smsc_default)
171
+ vty_out(vty, " smsc default-route %s%s",
172
+ g_hlr->smsc_default->name, VTY_NEWLINE);
173
+
174
+ return 0;
175
+}
176
177
DEFUN(cfg_reject_cause, cfg_reject_cause_cmd,
178
"reject-cause TYPE CAUSE", "") /* Dynamically Generated */
179
180
install_element(HLR_NODE, &cfg_ussd_defaultroute_cmd);
181
install_element(HLR_NODE, &cfg_ussd_no_defaultroute_cmd);
182
install_element(HLR_NODE, &cfg_ncss_guard_timeout_cmd);
183
+
184
+ install_node(&smsc_node, config_write_smsc);
185
+ install_element(HLR_NODE, &cfg_smsc_entity_cmd);
186
+ install_element(HLR_NODE, &cfg_no_smsc_entity_cmd);
187
+ install_element(HLR_NODE, &cfg_smsc_route_cmd);
188
+ install_element(HLR_NODE, &cfg_no_smsc_route_cmd);
189
+ install_element(HLR_NODE, &cfg_smsc_defroute_cmd);
190
+ install_element(HLR_NODE, &cfg_no_smsc_defroute_cmd);
191
+
192
install_element(HLR_NODE, &cfg_reject_cause_cmd);
193
install_element(HLR_NODE, &cfg_store_imei_cmd);
194
install_element(HLR_NODE, &cfg_no_store_imei_cmd);
195
osmo-hlr_1.7.0.tar.xz/src/mslookup/osmo-mslookup-client.c -> osmo-hlr_1.8.0.tar.xz/src/mslookup/osmo-mslookup-client.c
Changed
30
1
2
3
void socket_client_respond_result(struct socket_client *c, const char *response)
4
{
5
- write(c->ofd.fd, response, strlen(response));
6
+ size_t len = strlen(response);
7
+ int rc = write(c->ofd.fd, response, len);
8
+
9
+ if (rc != len)
10
+ print_error("%s: write() returned %d instead of %zu\n", __func__, rc, len);
11
}
12
13
static int socket_read_cb(struct osmo_fd *ofd)
14
15
16
llist_add(&c->entry, &globals.socket_clients);
17
18
- if (globals.format == FORMAT_CSV && cmdline_opts.csv_headers)
19
- write(c->ofd.fd, CSV_HEADERS, strlen(CSV_HEADERS));
20
+ if (globals.format == FORMAT_CSV && cmdline_opts.csv_headers) {
21
+ size_t len = strlen(CSV_HEADERS);
22
+ int rc = write(c->ofd.fd, CSV_HEADERS, strlen(CSV_HEADERS));
23
+
24
+ if (rc != len)
25
+ print_error("%s: write() returned %d instead of %zu\n", __func__, rc, len);
26
+ }
27
28
return 0;
29
}
30
osmo-hlr_1.7.0.tar.xz/tests/test_nodes.vty -> osmo-hlr_1.8.0.tar.xz/tests/test_nodes.vty
Changed
22
1
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
+ smsc Configuration of GSUP routing to SMSCs
6
reject-cause GSUP/GMM cause to be sent
7
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').
8
subscriber-create-on-demand Make a new record when a subscriber is first seen.
9
10
ussd default-route external EUSE
11
no ussd default-route
12
ncss-guard-timeout <0-255>
13
+ smsc entity NAME
14
+ no smsc entity NAME
15
+ smsc route NUMBER NAME
16
+ no smsc route NUMBER
17
+ smsc default-route NAME
18
+ no smsc default-route
19
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)
20
store-imei
21
no store-imei
22
rpmlintrc
Deleted
7
1
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