ttcn3-pgw-test: configure the 'ogstun' device for open5gs-upfd

Unlike osmo-ggsn, open5gs-upfd does not configure the tun interface
itself.  All IPv4/IPv6 addresses must be assigned manually.  This
is exactly why both PGW_Tests.TC_createSession_ping4[_256] fail:

  [sock] ERROR: ogs_write() failed (5:Input/outputerror) (../lib/tun/tunio.c:84)
  [upf] WARNING: ogs_tun_write() failed (../src/upf/gtp-path.c:448)

Take Harald's from open5gs-master and execute it in the
container running open5gs-upfd.  This fixes the ogs_write() errors.

Change-Id: I0730b1f69285484a0aa0ebd664dafd8e476b294f
Related: SYS#5602
Vadim Yanitskiy 2022-02-03 13:24:02 +06:00
parent 647a5fdef9
commit bfabf9aa42
2 changed files with 14 additions and 0 deletions

View File

@ -16,6 +16,7 @@ cp osmo-uecups-daemon.cfg $VOL_BASE_DIR/osmo-uecups/
mkdir $VOL_BASE_DIR/pgw
cp freeDiameter-smf.conf $VOL_BASE_DIR/pgw/
cp open5gs-*.yaml $VOL_BASE_DIR/pgw/
cp $VOL_BASE_DIR/pgw/
network_create $SUBNET
@ -43,6 +44,9 @@ docker run --cap-add=NET_ADMIN \
open5gs-upfd -c /data/open5gs-upf.yaml
# configure the 'ogstun' device for open5gs-upfd
docker exec ${BUILD_TAG}-upf /data/
# start container with open5gs-smfd in background
docker run --cap-add=NET_ADMIN \
--device /dev/net/tun:/dev/net/tun \

ttcn3-pgw-test/ Executable file
View File

@ -0,0 +1,10 @@
if ! grep "ogstun" /proc/net/dev > /dev/null; then
ip tuntap add name ogstun mode tun
ip addr del dev ogstun 2> /dev/null
ip addr add dev ogstun
ip addr del cafe::1/64 dev ogstun 2> /dev/null
ip addr add cafe::1/64 dev ogstun
ip link set ogstun up