forked from acouzens/open5gs
Compare commits
11 Commits
main
...
default-ap
Author | SHA1 | Date |
---|---|---|
Oliver Smith | c5bad381d9 | |
Oliver Smith | d9af612a2f | |
Daniel Willmann | 90d43aa579 | |
Daniel Willmann | 21be2dc6be | |
Daniel Willmann | 998e943d69 | |
Oliver Smith | 6ad6da0860 | |
Alexander Couzens | b921bbe12b | |
Alexander Couzens | c4af7f9043 | |
Alexander Couzens | 4d336cfb47 | |
Alexander Couzens | 61afd7a763 | |
root | 3c7320fd32 |
|
@ -1,5 +1,36 @@
|
||||||
db_uri: mongodb://localhost/open5gs
|
db_uri: mongodb://localhost/open5gs
|
||||||
|
db_json:
|
||||||
|
default:
|
||||||
|
af:
|
||||||
|
ambr:
|
||||||
|
up: 10000
|
||||||
|
down: 10000
|
||||||
|
gmbr:
|
||||||
|
up: 1000
|
||||||
|
down: 1000
|
||||||
|
qci: 4
|
||||||
|
normal:
|
||||||
|
ambr:
|
||||||
|
up: 10000
|
||||||
|
down: 10000
|
||||||
|
gmbr:
|
||||||
|
up: 10000
|
||||||
|
down: 10000
|
||||||
|
qci: 5
|
||||||
|
charging_profiles:
|
||||||
|
af:
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- 3
|
||||||
|
- 4
|
||||||
|
normal:
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- 3
|
||||||
|
- 4
|
||||||
|
dir:
|
||||||
|
normal: "/tmp/profiles"
|
||||||
|
af: "/tmp/profiles_af"
|
||||||
#
|
#
|
||||||
# logger:
|
# logger:
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,3 +1,35 @@
|
||||||
|
open5gs (2.4.8+nmu5~sysmocom) unstable; urgency=medium
|
||||||
|
|
||||||
|
* d/postinst: don't restart service in chroot
|
||||||
|
|
||||||
|
-- Oliver Smith <osmith@sysmocom.de> Mon, 30 Jan 2023 09:42:49 +0100
|
||||||
|
|
||||||
|
open5gs (2.4.8+nmu4~sysmocom) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Fix APN selection
|
||||||
|
|
||||||
|
-- Daniel Willmann <dwillmann@sysmocom.de> Fri, 27 Jan 2023 13:11:17 +0100
|
||||||
|
|
||||||
|
open5gs (2.4.8+nmu3~sysmocom) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Use default APN in case the one from ESM info resp is not found
|
||||||
|
|
||||||
|
-- Daniel Willmann <dwillmann@sysmocom.de> Fri, 27 Jan 2023 12:15:23 +0100
|
||||||
|
|
||||||
|
open5gs (2.4.8+nmu2~sysmocom) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Remove mongodb dependency for pcrf
|
||||||
|
|
||||||
|
-- Daniel Willmann <dwillmann@sysmocom.de> Fri, 01 Jul 2022 16:15:32 +0200
|
||||||
|
|
||||||
|
open5gs (2.4.8+nmu1~sysmocom) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Non-maintainer upload.
|
||||||
|
* WIP pcrf_simple branch 1e33b7dd373908241429c2bdb1e96c19bf551e02
|
||||||
|
rebased on latest release
|
||||||
|
|
||||||
|
-- Oliver Smith <osmith@sysmocom.de> Fri, 01 Jul 2022 15:38:05 +0200
|
||||||
|
|
||||||
open5gs (2.4.8) unstable; urgency=medium
|
open5gs (2.4.8) unstable; urgency=medium
|
||||||
|
|
||||||
* Bug Fixed
|
* Bug Fixed
|
||||||
|
|
|
@ -142,7 +142,6 @@ Architecture: any
|
||||||
Multi-Arch: same
|
Multi-Arch: same
|
||||||
Depends: ${shlibs:Depends},
|
Depends: ${shlibs:Depends},
|
||||||
${misc:Depends},
|
${misc:Depends},
|
||||||
mongodb-org | mongodb,
|
|
||||||
open5gs-common (= ${binary:Version})
|
open5gs-common (= ${binary:Version})
|
||||||
Description: PCRF (Policy and Charging Rules Function)
|
Description: PCRF (Policy and Charging Rules Function)
|
||||||
Open5GS is a C-language implementation of 5G Core and EPC
|
Open5GS is a C-language implementation of 5G Core and EPC
|
||||||
|
|
|
@ -27,7 +27,9 @@ case "$1" in
|
||||||
if test "x`systemctl is-enabled systemd-networkd`" = xdisabled; then
|
if test "x`systemctl is-enabled systemd-networkd`" = xdisabled; then
|
||||||
systemctl enable systemd-networkd
|
systemctl enable systemd-networkd
|
||||||
fi
|
fi
|
||||||
deb-systemd-invoke restart systemd-networkd
|
if test -d "/run/systemd"; then
|
||||||
|
deb-systemd-invoke restart systemd-networkd
|
||||||
|
fi
|
||||||
if test -f /etc/sysctl.d/30-open5gs.conf && grep "ogstun" /proc/net/dev > /dev/null; then
|
if test -f /etc/sysctl.d/30-open5gs.conf && grep "ogstun" /proc/net/dev > /dev/null; then
|
||||||
echo "net.ipv6.conf.ogstun.disable_ipv6=0" > /etc/sysctl.d/30-open5gs.conf
|
echo "net.ipv6.conf.ogstun.disable_ipv6=0" > /etc/sysctl.d/30-open5gs.conf
|
||||||
sysctl -p /etc/sysctl.d/30-open5gs.conf
|
sysctl -p /etc/sysctl.d/30-open5gs.conf
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#include "ogs-dbi.h"
|
#include "ogs-dbi.h"
|
||||||
|
|
||||||
|
#ifdef OGS_DBI_WITH_MONGODB
|
||||||
int ogs_dbi_msisdn_data(
|
int ogs_dbi_msisdn_data(
|
||||||
char *imsi_or_msisdn_bcd, ogs_msisdn_data_t *msisdn_data)
|
char *imsi_or_msisdn_bcd, ogs_msisdn_data_t *msisdn_data)
|
||||||
{
|
{
|
||||||
|
@ -212,3 +213,15 @@ out:
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
#else /* OGS_DBI_WITH_MONGODB */
|
||||||
|
int ogs_dbi_msisdn_data(
|
||||||
|
char *imsi_or_msisdn_bcd, ogs_msisdn_data_t *msisdn_data)
|
||||||
|
{
|
||||||
|
return OGS_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ogs_dbi_ims_data(char *supi, ogs_ims_data_t *ims_data)
|
||||||
|
{
|
||||||
|
return OGS_ERROR;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -25,9 +25,6 @@ libdbi_sources = files('''
|
||||||
session.c
|
session.c
|
||||||
ims.c
|
ims.c
|
||||||
'''.split())
|
'''.split())
|
||||||
|
|
||||||
libmongoc_dep = dependency('libmongoc-1.0')
|
|
||||||
|
|
||||||
libdbi_inc = include_directories('.')
|
libdbi_inc = include_directories('.')
|
||||||
|
|
||||||
libdbi = library('ogsdbi',
|
libdbi = library('ogsdbi',
|
||||||
|
@ -35,10 +32,10 @@ libdbi = library('ogsdbi',
|
||||||
version : libogslib_version,
|
version : libogslib_version,
|
||||||
c_args : '-DOGS_DBI_COMPILATION',
|
c_args : '-DOGS_DBI_COMPILATION',
|
||||||
include_directories : [libdbi_inc, libinc],
|
include_directories : [libdbi_inc, libinc],
|
||||||
dependencies : [libcrypt_dep, libmongoc_dep],
|
dependencies : [libcrypt_dep],
|
||||||
install : true)
|
install : true)
|
||||||
|
|
||||||
libdbi_dep = declare_dependency(
|
libdbi_dep = declare_dependency(
|
||||||
link_with : libdbi,
|
link_with : libdbi,
|
||||||
include_directories : [libdbi_inc, libinc],
|
include_directories : [libdbi_inc, libinc],
|
||||||
dependencies : [libcrypt_dep, libmongoc_dep])
|
dependencies : [libcrypt_dep])
|
||||||
|
|
|
@ -17,12 +17,14 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <mongoc.h>
|
|
||||||
|
|
||||||
#include "ogs-dbi.h"
|
#include "ogs-dbi.h"
|
||||||
|
|
||||||
int __ogs_dbi_domain;
|
int __ogs_dbi_domain;
|
||||||
|
|
||||||
|
#ifdef OGS_DBI_WITH_MONGODB
|
||||||
|
#include <mongoc.h>
|
||||||
|
|
||||||
|
|
||||||
static ogs_mongoc_t self;
|
static ogs_mongoc_t self;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -184,3 +186,28 @@ void ogs_dbi_final()
|
||||||
|
|
||||||
ogs_mongoc_final();
|
ogs_mongoc_final();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else /* OGS_DBI_WITH_MONGODB */
|
||||||
|
int ogs_mongoc_init(const char *db_uri)
|
||||||
|
{
|
||||||
|
return OGS_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ogs_mongoc_final(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ogs_mongoc_t *ogs_mongoc(void)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ogs_dbi_init(const char *db_uri)
|
||||||
|
{
|
||||||
|
return OGS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ogs_dbi_final()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -24,8 +24,6 @@
|
||||||
#ifndef OGS_MONGOC_H
|
#ifndef OGS_MONGOC_H
|
||||||
#define OGS_MONGOC_H
|
#define OGS_MONGOC_H
|
||||||
|
|
||||||
#include <mongoc.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#include "ogs-dbi.h"
|
#include "ogs-dbi.h"
|
||||||
|
|
||||||
|
#ifdef OGS_DBI_WITH_MONGODB
|
||||||
int ogs_dbi_session_data(char *supi, ogs_s_nssai_t *s_nssai, char *dnn,
|
int ogs_dbi_session_data(char *supi, ogs_s_nssai_t *s_nssai, char *dnn,
|
||||||
ogs_session_data_t *session_data)
|
ogs_session_data_t *session_data)
|
||||||
{
|
{
|
||||||
|
@ -500,3 +501,27 @@ out:
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else /* OGS_DBI_WITH_MONGODB */
|
||||||
|
|
||||||
|
int ogs_dbi_session_data(char *supi, ogs_s_nssai_t *s_nssai, char *dnn,
|
||||||
|
ogs_session_data_t *session_data)
|
||||||
|
{
|
||||||
|
ogs_session_t *session = &session_data->session;
|
||||||
|
ogs_qos_t *qos = &session->qos;
|
||||||
|
|
||||||
|
session->name = ogs_strndup("staticprof", strlen("foobar"));
|
||||||
|
/* check if have to set type */
|
||||||
|
session->ambr.downlink = 300 * 1024 * 1024;
|
||||||
|
session->ambr.uplink = 150 * 1024 * 1024;
|
||||||
|
|
||||||
|
session->qos.index = OGS_QOS_INDEX_5;
|
||||||
|
session->qos.arp.priority_level = 1;
|
||||||
|
session->qos.mbr.downlink = 10;
|
||||||
|
session->qos.mbr.uplink = 10;
|
||||||
|
session->qos.gbr.downlink = 10;
|
||||||
|
session->qos.gbr.uplink = 10;
|
||||||
|
|
||||||
|
return OGS_OK;
|
||||||
|
}
|
||||||
|
#endif /* OGS_DBI_WITH_MONGODB */
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#include "ogs-dbi.h"
|
#include "ogs-dbi.h"
|
||||||
|
|
||||||
|
#ifdef OGS_DBI_WITH_MONGODB
|
||||||
int ogs_dbi_auth_info(char *supi, ogs_dbi_auth_info_t *auth_info)
|
int ogs_dbi_auth_info(char *supi, ogs_dbi_auth_info_t *auth_info)
|
||||||
{
|
{
|
||||||
int rv = OGS_OK;
|
int rv = OGS_OK;
|
||||||
|
@ -661,3 +662,31 @@ out:
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
int ogs_dbi_auth_info(char *supi, ogs_dbi_auth_info_t *auth_info)
|
||||||
|
{
|
||||||
|
return OGS_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ogs_dbi_update_sqn(char *supi, uint64_t sqn)
|
||||||
|
{
|
||||||
|
return OGS_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ogs_dbi_update_imeisv(char *supi, char *imeisv)
|
||||||
|
{
|
||||||
|
return OGS_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ogs_dbi_increment_sqn(char *supi)
|
||||||
|
{
|
||||||
|
return OGS_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ogs_dbi_subscription_data(char *supi,
|
||||||
|
ogs_subscription_data_t *subscription_data)
|
||||||
|
{
|
||||||
|
return OGS_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* OGS_DBI_WITH_MONGODB */
|
||||||
|
|
|
@ -46,6 +46,7 @@ if host_system == 'darwin'
|
||||||
libsctp_sources += files('ogs-usrsctp.c')
|
libsctp_sources += files('ogs-usrsctp.c')
|
||||||
libsctp_conf.set('HAVE_USRSCTP', 1)
|
libsctp_conf.set('HAVE_USRSCTP', 1)
|
||||||
else
|
else
|
||||||
|
libsctp_conf.set('HAVE_NETINET_SCTP_H', 1)
|
||||||
sctp_dep = cc.find_library('sctp', required : false)
|
sctp_dep = cc.find_library('sctp', required : false)
|
||||||
libsctp_sources += files('ogs-lksctp.c')
|
libsctp_sources += files('ogs-lksctp.c')
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -115,7 +115,7 @@ subdir('src')
|
||||||
subdir('misc')
|
subdir('misc')
|
||||||
# Don't build the tests unless we can run them (either natively or in an exe wrapper)
|
# Don't build the tests unless we can run them (either natively or in an exe wrapper)
|
||||||
build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper())
|
build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper())
|
||||||
if build_tests
|
if build_tests and get_option('mongodb')
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
option('metrics_impl', type : 'combo', choices : ['void', 'prometheus'], value : 'void', description : 'libogsmetrics implementation')
|
option('metrics_impl', type : 'combo', choices : ['void', 'prometheus'], value : 'void', description : 'libogsmetrics implementation')
|
||||||
|
option('mongodb', type : 'boolean', value : 'false', description : 'build with mongo db support')
|
||||||
|
|
|
@ -159,8 +159,14 @@ int esm_handle_information_response(mme_sess_t *sess,
|
||||||
|
|
||||||
if (rsp->presencemask &
|
if (rsp->presencemask &
|
||||||
OGS_NAS_EPS_ESM_INFORMATION_RESPONSE_ACCESS_POINT_NAME_PRESENT) {
|
OGS_NAS_EPS_ESM_INFORMATION_RESPONSE_ACCESS_POINT_NAME_PRESENT) {
|
||||||
sess->session = mme_session_find_by_apn(
|
ogs_session_t *session = mme_session_find_by_apn(
|
||||||
mme_ue, rsp->access_point_name.apn);
|
mme_ue, rsp->access_point_name.apn);
|
||||||
|
if (session) {
|
||||||
|
sess->session = session;
|
||||||
|
} else {
|
||||||
|
ogs_error(" APN[%s] not found, using default!", rsp->access_point_name.apn);
|
||||||
|
sess->session = mme_default_session(mme_ue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rsp->presencemask &
|
if (rsp->presencemask &
|
||||||
|
|
Loading…
Reference in New Issue