Compare commits

...

10 Commits

12 changed files with 173 additions and 34 deletions

View File

@ -1,4 +1,57 @@
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"
#
# o Set OGS_LOG_INFO to all domain level
# - If `level` is omitted, the default level is OGS_LOG_INFO)
# - If `domain` is omitted, the all domain level is set from 'level'
# (Default values are used, so no configuration is required)
#
# o Set OGS_LOG_ERROR to all domain level
# - `level` can be set with none, fatal, error, warn, info, debug, trace
# logger:
# level: error
#
# o Set OGS_LOG_DEBUG to mme/emm domain level
# logger:
# level: debug
# domain: mme,emm
#
# o Set OGS_LOG_TRACE to all domain level
# logger:
# level: trace
# domain: core,sbi,ausf,event,tlv,mem,sock
#
logger:
file:
path: @localstatedir@/log/open5gs/pcrf.log

19
debian/changelog vendored
View File

@ -1,3 +1,22 @@
open5gs (2.7.0~sysmocom3) unstable; urgency=medium
* Rebase on open5gs.git main of 2024-04-18
-- Oliver Smith <osmith@sysmocom.de> Thu, 18 Apr 2024 15:22:28 +0200
open5gs (2.7.0~sysmocom2) unstable; urgency=medium
* Rebase on open5gs.git main of 2024-04-09
-- Oliver Smith <osmith@sysmocom.de> Tue, 09 Apr 2024 14:05:56 +0200
open5gs (2.7.0sysmocom1) unstable; urgency=medium
* Remove mongodb dependency
* Use default APN if none could be found
-- Daniel Willmann <dwillmann@sysmocom.de> Mon, 29 Jan 2024 20:17:10 +0100
open5gs (2.7.0) unstable; urgency=medium
* 5G Roaming with SEPP

20
debian/control vendored
View File

@ -14,7 +14,6 @@ Build-Depends: debhelper (>= 11),
libgcrypt-dev,
libssl-dev,
libidn11-dev,
libmongoc-dev,
libbson-dev,
libsctp-dev,
libyaml-dev,
@ -121,29 +120,11 @@ Description: UPF (User Plane Function)
.
This package provides the UPF (User Plane Function)
Package: open5gs-hss
Architecture: any
Multi-Arch: same
Depends: ${shlibs:Depends},
${misc:Depends},
mongodb-org | mongodb,
open5gs-common (= ${binary:Version})
Description: HSS (Home Subscriber Server)
Open5GS is a C-language implementation of 5G Core and EPC
Packet Core, i.e. the core network of an NR/LTE network (Release-17)
.
This package provides the HSS (Home Subscriber Server) element of the
EPC, i.e. the central database of mobile network subscribers, with
their IMSI, MSISDN, cryptographic key materials, service subscription
information, etc. It implements the S6a interface towards the MME
using the DIAMETER protocol.
Package: open5gs-pcrf
Architecture: any
Multi-Arch: same
Depends: ${shlibs:Depends},
${misc:Depends},
mongodb-org | mongodb,
open5gs-common (= ${binary:Version})
Description: PCRF (Policy and Charging Rules Function)
Open5GS is a C-language implementation of 5G Core and EPC
@ -273,7 +254,6 @@ Depends: ${misc:Depends},
open5gs-amf (= ${binary:Version}),
open5gs-sgwu (= ${binary:Version}),
open5gs-upf (= ${binary:Version}),
open5gs-hss (= ${binary:Version}),
open5gs-pcrf (= ${binary:Version}),
open5gs-nrf (= ${binary:Version}),
open5gs-scp (= ${binary:Version}),

View File

@ -1,6 +0,0 @@
usr/bin/open5gs-hssd
configs/freeDiameter/hss.* etc/freeDiameter
configs/open5gs/hss.yaml etc/open5gs
configs/open5gs/tls/hss.key etc/open5gs/tls
configs/open5gs/tls/hss.crt etc/open5gs/tls
configs/systemd/open5gs-hssd.service lib/systemd/system

View File

@ -25,9 +25,6 @@ libdbi_sources = files('''
session.c
ims.c
'''.split())
libmongoc_dep = dependency('libmongoc-1.0')
libdbi_inc = include_directories('.')
libdbi = library('ogsdbi',
@ -35,10 +32,10 @@ libdbi = library('ogsdbi',
version : libogslib_version,
c_args : '-DOGS_DBI_COMPILATION',
include_directories : [libdbi_inc, libinc],
dependencies : [libproto_dep, libmongoc_dep],
dependencies : [libproto_dep],
install : true)
libdbi_dep = declare_dependency(
link_with : libdbi,
include_directories : [libdbi_inc, libinc],
dependencies : [libproto_dep, libmongoc_dep])
dependencies : [libproto_dep])

34
lib/dbi/meson_dummy.h Normal file
View File

@ -0,0 +1,34 @@
/*
* Copyright (C) 2019-2022 by Sukchan Lee <acetcom@gmail.com>
*
* This file is part of Open5GS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef MESON_DUMMY_H
#define MESON_DUMMY_H
#ifdef __cplusplus
extern "C" {
#endif
struct dummy_bson;
typedef struct dummy_bson bson_t;
#ifdef __cplusplus
}
#endif
#endif /* MESON_DUMMY_H */

View File

@ -24,6 +24,9 @@
#ifndef OGS_MONGOC_H
#define OGS_MONGOC_H
/* STUB to disable building with mongodb (OS#6215) */
#define MONGOC_CHECK_VERSION(a, b, c) false
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

View File

@ -510,6 +510,21 @@ out:
int ogs_dbi_session_data(char *supi, ogs_s_nssai_t *s_nssai, char *dnn,
ogs_session_data_t *session_data)
{
return OGS_ERROR;
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 */

View File

@ -34,7 +34,9 @@ version_conf.set_quoted('OPEN5GS_VERSION', package_version)
configure_file(output : 'version.h', configuration : version_conf)
subdir('mme')
subdir('hss')
if get_option('mongodb')
subdir('hss')
endif
subdir('sgwc')
subdir('sgwu')
subdir('pcrf')

View File

@ -187,8 +187,14 @@ int esm_handle_information_response(mme_sess_t *sess,
if (rsp->presencemask &
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);
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 &

34
src/sepp/meson_dummy.h Normal file
View File

@ -0,0 +1,34 @@
/*
* Copyright (C) 2019-2022 by Sukchan Lee <acetcom@gmail.com>
*
* This file is part of Open5GS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef MESON_DUMMY_H
#define MESON_DUMMY_H
#ifdef __cplusplus
extern "C" {
#endif
struct dummy_bson;
typedef struct dummy_bson bson_t;
#ifdef __cplusplus
}
#endif
#endif /* MESON_DUMMY_H */

View File

@ -22,6 +22,8 @@
#include "context.h"
#include "meson_dummy.h"
#ifdef __cplusplus
extern "C" {
#endif