diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-02-03 13:24:02 +0600 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-02-03 13:55:41 +0600 |
commit | bfabf9aa42c6bd0ae3a3048d8c1e016bcb2ad2ec (patch) | |
tree | 7e0eab0301f2a59a2506c9873b5a98b4b7792299 | |
parent | 647a5fdef9e3685f43e62b59362fdf7ee18d85ee (diff) |
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 setup.sh from open5gs-master and execute it in the
container running open5gs-upfd. This fixes the ogs_write() errors.
Change-Id: I0730b1f69285484a0aa0ebd664dafd8e476b294f
Related: SYS#5602
-rwxr-xr-x | ttcn3-pgw-test/jenkins.sh | 4 | ||||
-rwxr-xr-x | ttcn3-pgw-test/ogstun-setup.sh | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/ttcn3-pgw-test/jenkins.sh b/ttcn3-pgw-test/jenkins.sh index 662e49b..bd6967c 100755 --- a/ttcn3-pgw-test/jenkins.sh +++ b/ttcn3-pgw-test/jenkins.sh @@ -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 ogstun-setup.sh $VOL_BASE_DIR/pgw/ SUBNET=18 network_create $SUBNET @@ -43,6 +44,9 @@ docker run --cap-add=NET_ADMIN \ $REPO_USER/open5gs-$IMAGE_SUFFIX \ open5gs-upfd -c /data/open5gs-upf.yaml +# configure the 'ogstun' device for open5gs-upfd +docker exec ${BUILD_TAG}-upf /data/ogstun-setup.sh + # start container with open5gs-smfd in background docker run --cap-add=NET_ADMIN \ --device /dev/net/tun:/dev/net/tun \ diff --git a/ttcn3-pgw-test/ogstun-setup.sh b/ttcn3-pgw-test/ogstun-setup.sh new file mode 100755 index 0000000..58693fd --- /dev/null +++ b/ttcn3-pgw-test/ogstun-setup.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +if ! grep "ogstun" /proc/net/dev > /dev/null; then + ip tuntap add name ogstun mode tun +fi +ip addr del 10.45.0.1/16 dev ogstun 2> /dev/null +ip addr add 10.45.0.1/16 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 |