forked from acouzens/open5gs
debian packaging (stage 2)
make check re-enabled, but data plane is disabled at this point user(nextepc/nextec) created pgwtun interface is created when PGW-preinstall script
This commit is contained in:
parent
e367b00d2c
commit
fdae399c74
|
@ -19,7 +19,7 @@ Build-Depends: debhelper (>= 9),
|
|||
Standards-Version: 3.9.6
|
||||
Vcs-Browser: https://github.com/acetcom/nextepc
|
||||
Vcs-Git: git://github.com/acetcom/nextepc
|
||||
Homepage: https://nextepc.org/
|
||||
Homepage: http://nextepc.org/
|
||||
|
||||
Package: nextepc-core
|
||||
Architecture: any
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
DB_URI : "mongodb://localhost/nextepc",
|
||||
LOG_PATH : "/var/log/nextepc/hss.log",
|
||||
TRACE:
|
||||
{
|
||||
FD: 1,
|
||||
OTHERS: 1,
|
||||
}
|
||||
|
||||
HSS :
|
||||
{
|
||||
FD_CONF_PATH : "/etc/nextepc/freeDiameter/hss.conf",
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
DB_URI : "mongodb://localhost/nextepc",
|
||||
LOG_PATH : "/var/log/nextepc/mme.log",
|
||||
TRACE:
|
||||
{
|
||||
S1AP: 1,
|
||||
NAS: 1,
|
||||
FD: 1,
|
||||
GTP: 1,
|
||||
OTHERS: 1,
|
||||
}
|
||||
|
||||
MME :
|
||||
{
|
||||
FD_CONF_PATH : "/etc/nextepc/freeDiameter/mme.conf",
|
||||
DEFAULT_PAGING_DRX : "v64",
|
||||
#RELATIVE_CAPACITY : 255,
|
||||
NETWORK :
|
||||
{
|
||||
S1AP_IPV4 : "127.76.0.1",
|
||||
GTPC_IPV4: "127.76.0.1",
|
||||
}
|
||||
GUMMEI:
|
||||
[
|
||||
{
|
||||
PLMN_ID :
|
||||
{
|
||||
MCC : "001",
|
||||
MNC : "01"
|
||||
}
|
||||
MME_GID : 2,
|
||||
MME_CODE : 1
|
||||
}
|
||||
]
|
||||
TAI:
|
||||
[
|
||||
{
|
||||
PLMN_ID :
|
||||
{
|
||||
MCC: "001",
|
||||
MNC: "01",
|
||||
}
|
||||
TAC: 12345
|
||||
}
|
||||
]
|
||||
SECURITY :
|
||||
{
|
||||
INTEGRITY_ORDER : [ "EIA1", "EIA2", "EIA0" ]
|
||||
CIPHERING_ORDER : [ "EEA0", "EEA1", "EEA2" ]
|
||||
}
|
||||
}
|
||||
|
||||
SGW :
|
||||
{
|
||||
NETWORK :
|
||||
[
|
||||
{
|
||||
GTPC_IPV4: "127.76.0.2",
|
||||
GTPU_IPV4: "127.76.0.2",
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
PGW :
|
||||
{
|
||||
NETWORK :
|
||||
{
|
||||
GTPC_IPV4: "127.76.0.3",
|
||||
GTPU_IPV4: "127.76.0.3"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
DB_URI : "mongodb://localhost/nextepc",
|
||||
LOG_PATH : "/var/log/nextepc/pcrf.log",
|
||||
TRACE:
|
||||
{
|
||||
FD: 1,
|
||||
OTHERS: 1,
|
||||
}
|
||||
|
||||
PCRF :
|
||||
{
|
||||
FD_CONF_PATH : "/etc/nextepc/freeDiameter/pcrf.conf",
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
DB_URI : "mongodb://localhost/nextepc",
|
||||
LOG_PATH : "/var/log/nextepc/pgw.log",
|
||||
TRACE:
|
||||
{
|
||||
FD: 1,
|
||||
GTP: 1,
|
||||
OTHERS: 1,
|
||||
}
|
||||
|
||||
PGW :
|
||||
{
|
||||
FD_CONF_PATH : "/etc/nextepc/freeDiameter/pgw.conf",
|
||||
NETWORK :
|
||||
{
|
||||
GTPC_IPV4: "127.76.0.3",
|
||||
GTPU_IPV4: "127.76.0.3"
|
||||
}
|
||||
UE_NETWORK:
|
||||
[
|
||||
{
|
||||
IF_NAME: "pgwtun",
|
||||
IPV4_POOL: "45.45.0.1/16"
|
||||
}
|
||||
]
|
||||
DNS :
|
||||
{
|
||||
PRIMARY_IPV4: "8.8.8.8",
|
||||
SECONDARY_IPV4: "4.4.4.4"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
LOG_PATH : "/var/log/nextepc/sgw.log",
|
||||
TRACE:
|
||||
{
|
||||
GTP: 1,
|
||||
OTHERS: 1,
|
||||
}
|
||||
|
||||
SGW :
|
||||
{
|
||||
NETWORK :
|
||||
[
|
||||
{
|
||||
GTPC_IPV4: "127.76.0.2",
|
||||
GTPU_IPV4: "127.76.0.2",
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
usr/lib/*/nextepc/*
|
||||
var/log
|
||||
etc/nextepc.conf
|
||||
etc/freeDiameter/cacert.pem
|
||||
var/log/nextepc
|
||||
var/run/nextepc
|
||||
etc/nextepc/freeDiameter/cacert.pem
|
||||
support/logrotate/nextepc /etc/logrotate.d
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
#!/bin/sh
|
||||
# postinst script for nextepc
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postinst> `configure' <most-recently-configured-version>
|
||||
# * <old-postinst> `abort-upgrade' <new version>
|
||||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||
# <new-version>
|
||||
# * <postinst> `abort-remove'
|
||||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||
# <failed-install-package> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
# create a nextepc group and user
|
||||
if ! getent passwd nextepc >/dev/null; then
|
||||
adduser --system --disabled-password --disabled-login \
|
||||
--home /var/run/nextepc --no-create-home \
|
||||
--quiet --group nextepc
|
||||
fi
|
||||
for dir in /var/run/nextepc /var/log/nextepc; do
|
||||
if ! dpkg-statoverride --list "$dir" >/dev/null 2>&1; then
|
||||
dpkg-statoverride --update --add nextepc nextepc 0755 "$dir"
|
||||
fi
|
||||
done
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
usr/bin/nextepc-hssd
|
||||
etc/freeDiameter/hss.conf
|
||||
etc/freeDiameter/hss.cert.pem
|
||||
etc/freeDiameter/hss.key.pem
|
||||
lib/systemd/system/nextepc-hssd.service
|
||||
etc/nextepc/freeDiameter/hss.conf
|
||||
etc/nextepc/freeDiameter/hss.cert.pem
|
||||
etc/nextepc/freeDiameter/hss.key.pem
|
||||
debian/etc/nextepc/hss.conf etc/nextepc
|
||||
support/systemd/nextepc-hssd.service lib/systemd/system
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
usr/bin/nextepc-mmed
|
||||
etc/freeDiameter/mme.conf
|
||||
etc/freeDiameter/mme.cert.pem
|
||||
etc/freeDiameter/mme.key.pem
|
||||
lib/systemd/system/nextepc-mmed.service
|
||||
etc/nextepc/freeDiameter/mme.conf
|
||||
etc/nextepc/freeDiameter/mme.cert.pem
|
||||
etc/nextepc/freeDiameter/mme.key.pem
|
||||
debian/etc/nextepc/mme.conf etc/nextepc
|
||||
support/systemd/nextepc-mmed.service lib/systemd/system
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
usr/bin/nextepc-pcrfd
|
||||
etc/freeDiameter/pcrf.conf
|
||||
etc/freeDiameter/pcrf.cert.pem
|
||||
etc/freeDiameter/pcrf.key.pem
|
||||
lib/systemd/system/nextepc-pcrfd.service
|
||||
etc/nextepc/freeDiameter/pcrf.conf
|
||||
etc/nextepc/freeDiameter/pcrf.cert.pem
|
||||
etc/nextepc/freeDiameter/pcrf.key.pem
|
||||
debian/etc/nextepc/pcrf.conf etc/nextepc
|
||||
support/systemd/nextepc-pcrfd.service lib/systemd/system
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
usr/bin/nextepc-pgwd
|
||||
etc/freeDiameter/pgw.conf
|
||||
etc/freeDiameter/pgw.cert.pem
|
||||
etc/freeDiameter/pgw.key.pem
|
||||
lib/systemd/system/nextepc-pgwd.service
|
||||
etc/nextepc/freeDiameter/pgw.conf
|
||||
etc/nextepc/freeDiameter/pgw.cert.pem
|
||||
etc/nextepc/freeDiameter/pgw.key.pem
|
||||
debian/etc/nextepc/pgw.conf etc/nextepc
|
||||
support/systemd/nextepc-pgwd.service lib/systemd/system
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
# postinst script for nextepc
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
if ! grep "pgwtun" /proc/net/dev > /dev/null; then
|
||||
ip tuntap add name pgwtun mode tun
|
||||
ip addr add 45.45.0.1/16 dev pgwtun
|
||||
ip link set pgwtun up
|
||||
fi
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
|
@ -1,2 +1,3 @@
|
|||
usr/bin/nextepc-sgwd
|
||||
lib/systemd/system/nextepc-sgwd.service
|
||||
debian/etc/nextepc/sgw.conf etc/nextepc
|
||||
support/systemd/nextepc-sgwd.service lib/systemd/system
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
export DH_VERBOSE=1
|
||||
|
||||
DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
|
||||
DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1)
|
||||
|
@ -14,5 +14,5 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
|||
%:
|
||||
dh $@ --with autoreconf --with systemd
|
||||
|
||||
override_dh_auto_test:
|
||||
#override_dh_auto_test:
|
||||
# skip 'make test' as currently it expects config/log in system paths
|
||||
|
|
|
@ -3,8 +3,11 @@
|
|||
SYSTEM=`uname`;
|
||||
|
||||
if [ "$SYSTEM" = "Linux" ]; then
|
||||
sudo ip tuntap add name pgwtun mode tun
|
||||
sudo ifconfig pgwtun 45.45.0.1/16 up
|
||||
if ! grep "pgwtun" /proc/net/dev > /dev/null; then
|
||||
ip tuntap add name pgwtun mode tun
|
||||
ip addr add 45.45.0.1/16 dev pgwtun
|
||||
ip link set pgwtun up
|
||||
fi
|
||||
else
|
||||
ifconfig lo0 alias 127.76.0.1 netmask 255.255.255.255
|
||||
ifconfig lo0 alias 127.76.0.2 netmask 255.255.255.255
|
||||
|
|
|
@ -423,6 +423,8 @@ void abts_not_impl(abts_case *tc, const char *message, int lineno)
|
|||
}
|
||||
}
|
||||
|
||||
int disable_data_plane_test = 0;
|
||||
|
||||
int main(int argc, const char *const argv[]) {
|
||||
int i;
|
||||
int rv;
|
||||
|
@ -459,6 +461,7 @@ int main(int argc, const char *const argv[]) {
|
|||
}
|
||||
if (!strcmp(argv[i], "-f")) {
|
||||
config_path = argv[++i];
|
||||
disable_data_plane_test = 1;
|
||||
continue;
|
||||
}
|
||||
if (argv[i][0] == '-') {
|
||||
|
|
|
@ -301,14 +301,18 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
core_sleep(time_from_msec(300));
|
||||
|
||||
/* Send GTP-U ICMP Packet */
|
||||
rv = testgtpu_enb_send(gtpu,
|
||||
inet_addr("45.45.0.2"), inet_addr("45.45.0.1"));
|
||||
ABTS_INT_EQUAL(tc, CORE_OK, rv);
|
||||
extern int disable_data_plane_test;
|
||||
if (!disable_data_plane_test)
|
||||
{
|
||||
rv = testgtpu_enb_send(gtpu,
|
||||
inet_addr("45.45.0.2"), inet_addr("45.45.0.1"));
|
||||
ABTS_INT_EQUAL(tc, CORE_OK, rv);
|
||||
|
||||
/* Receive GTP-U ICMP Packet */
|
||||
recvbuf = pkbuf_alloc(0, MAX_SDU_LEN);
|
||||
rc = testgtpu_enb_read(gtpu, recvbuf);
|
||||
pkbuf_free(recvbuf);
|
||||
/* Receive GTP-U ICMP Packet */
|
||||
recvbuf = pkbuf_alloc(0, MAX_SDU_LEN);
|
||||
rc = testgtpu_enb_read(gtpu, recvbuf);
|
||||
pkbuf_free(recvbuf);
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
* Attach Request : Known GUTI, Integrity Protected, MAC Matched
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
mkdir -p /tmp/nextepc/etc/freeDiameter /tmp/nextepc/var/log
|
||||
sed 's?@SYSCONF_DIR@?/tmp/nextepc/etc?g;s?@LOCALSTATE_DIR@?/tmp/nextepc/var?g' `pwd`/../support/nextepc.conf.in > /tmp/nextepc/etc/nextepc.conf
|
||||
mkdir -p /tmp/nextepc/etc/nextepc/freeDiameter /tmp/nextepc/var/log/nextepc
|
||||
sed 's?@SYSCONF_DIR@?/tmp/nextepc/etc?g;s?@LOCALSTATE_DIR@?/tmp/nextepc/var?g' `pwd`/../support/config/nextepc.conf.in > /tmp/nextepc/etc/nextepc/nextepc.conf
|
||||
for i in `cd ../support/freeDiameter && find . -name '*.conf.in' ! -name 'dict_legacy_xml.conf.in' -printf "%f\n" | sed 's/.in$//g'`
|
||||
do
|
||||
sed 's?@SYSCONF_DIR@?'`pwd`'/../support?g;s?@LIB_DIR@/nextepc/\([_a-z0-9]*\)\.so?'`pwd`'/../lib/fd/extensions/\1/.libs/\1.so?g' `pwd`/../support/freeDiameter/$i.in > /tmp/nextepc/etc/freeDiameter/$i
|
||||
sed 's?@SYSCONF_DIR@/nextepc?'`pwd`'/../support?g;s?@LIB_DIR@/nextepc/\([_a-z0-9]*\)\.so?'`pwd`'/../lib/fd/extensions/\1/.libs/\1.so?g' `pwd`/../support/freeDiameter/$i.in > /tmp/nextepc/etc/nextepc/freeDiameter/$i
|
||||
done
|
||||
|
||||
./testepc -f /tmp/nextepc/etc/nextepc.conf || exit;
|
||||
./testepc -f /tmp/nextepc/etc/nextepc/nextepc.conf || exit;
|
||||
|
|
Loading…
Reference in New Issue