Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/36030?usp=email )
Change subject: gtp_new: deduplicate create_and_bind_socket code
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
this should be moved to osmocom socket at some point anyway, but it's not urgent and this is a first good stage which I guess you need as a preparation for other patches.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/36030?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Iff3cfdfb0c08033d869c51499754b3416c71732b
Gerrit-Change-Number: 36030
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 21 Feb 2024 12:15:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: laforge.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/33802?usp=email )
Change subject: ttcn3-ggsn-test: kernel-gtp: add ipv6
......................................................................
Patch Set 2:
(1 comment)
This change is ready for review.
Patchset:
PS1:
> See the commit message description: […]
As discussed, created issue https://osmocom.org/issues/6106 for this.
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/33802?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: If3549db216ff89bdb963744bb38015ad68d4cf6a
Gerrit-Change-Number: 33802
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 21 Feb 2024 12:15:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libgtpnl/+/36034?usp=email )
Change subject: tests/qemu: add 05_ms_ip46_sgsn_ip4.sh
......................................................................
tests/qemu: add 05_ms_ip46_sgsn_ip4.sh
Change-Id: I1e306bc4534f14138249cd4034f54f77d940b261
---
M tests/qemu/00_test_functions.sh
A tests/qemu/05_ms_ip46_sgsn_ip4.sh
M tests/qemu/initrd-init.sh
3 files changed, 80 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/34/36034/1
diff --git a/tests/qemu/00_test_functions.sh b/tests/qemu/00_test_functions.sh
index 5839363..4660d8f 100644
--- a/tests/qemu/00_test_functions.sh
+++ b/tests/qemu/00_test_functions.sh
@@ -50,16 +50,52 @@
ggsn_side gtp-tunnel list
}
+# Add a second tunnel to test MS with IPv4v6
+tunnel_start_2() {
+ test -n "$MS2_PROTO"
+ test -n "$MS2"
+ test -n "$MS2_PREFLEN"
+ test -n "$WEBSERVER2"
+
+ # SGSN side: add second IP to lo (MS)
+ ip addr add "$MS2"/"$MS2_PREFLEN" dev lo
+
+ # SGSN side: prepare second gtp-tunnel
+ gtp-tunnel add gtp_sgsn v1 200 100 "$MS2" "$GGSN"
+ ip route add "$WEBSERVER2"/"$MS2_PREFLEN" dev gtp_sgsn
+
+ # GGSN side: prepare add second IP to lo (WEBSERVER)
+ ggsn_side ip addr add "$WEBSERVER2"/"$MS2_PREFLEN" dev lo
+
+ # GGSN side: prepare second gtp-tunnel
+ ggsn_side gtp-tunnel add gtp_ggsn v1 100 200 "$MS2" "$SGSN"
+ ggsn_side ip route add "$MS2"/"$MS2_PREFLEN" dev gtp_ggsn
+
+ # List tunnels from both sides
+ gtp-tunnel list
+ ggsn_side gtp-tunnel list
+}
+
tunnel_ping() {
ip addr show
ping -c 1 "$WEBSERVER"
ggsn_side ping -c 1 "$MS"
+
+ if [ -n "$MS2" ]; then
+ ping -c 1 "$WEBSERVER2"
+ ggsn_side ping -c 1 "$MS2"
+ fi
}
tunnel_stop() {
killall gtp-link
ip addr del "$MS"/"$MS_PREFLEN" dev lo
+
+ if [ -n "$MS2" ]; then
+ ip addr del "$MS2"/"$MS2_PREFLEN" dev lo
+ fi
+
ip link set veth_sgsn down
if [ "$SGSN_GGSN_PROTO" == "ip" ]; then # FIXME: doesn't work with ip6
@@ -69,8 +105,19 @@
ip link del veth_sgsn
ip route del "$WEBSERVER"/"$MS_PREFLEN" dev gtp_sgsn
gtp-tunnel delete gtp_sgsn v1 200 "$MS_PROTO"
+
+ if [ -n "$MS2" ]; then
+ ip route del "$WEBSERVER2"/"$MS2_PREFLEN" dev gtp_sgsn
+ gtp-tunnel delete gtp_sgsn v1 200 "$MS2_PROTO"
+ fi
+
gtp-link del gtp_sgsn
ggsn_side gtp-tunnel delete gtp_ggsn v1 100 "$MS_PROTO"
+
+ if [ -n "$MS2" ]; then
+ ggsn_side gtp-tunnel delete gtp_ggsn v1 100 "$MS2_PROTO"
+ fi
+
ggsn_side gtp-link del gtp_ggsn
ip netns del ggsn_side
}
diff --git a/tests/qemu/05_ms_ip46_sgsn_ip4.sh b/tests/qemu/05_ms_ip46_sgsn_ip4.sh
new file mode 100644
index 0000000..a0f9220
--- /dev/null
+++ b/tests/qemu/05_ms_ip46_sgsn_ip4.sh
@@ -0,0 +1,23 @@
+#!/bin/sh -ex
+. /tests/00_test_functions.sh
+
+MS_PROTO="ip"
+MS="172.99.0.1"
+MS_PREFLEN="32"
+SGSN_GGSN_PROTO="ip"
+SGSN="172.0.0.1"
+SGSN_PREFLEN="24"
+GGSN="172.0.0.2"
+WEBSERVER="172.99.0.2"
+
+tunnel_start
+
+MS2_PROTO="ip6"
+MS2_PROTO="ip6"
+MS2="fd00::"
+MS2_PREFLEN="64"
+WEBSERVER2="fe00::2"
+
+tunnel_start_2
+tunnel_ping
+tunnel_stop
diff --git a/tests/qemu/initrd-init.sh b/tests/qemu/initrd-init.sh
index ba20592..5dacb86 100755
--- a/tests/qemu/initrd-init.sh
+++ b/tests/qemu/initrd-init.sh
@@ -29,6 +29,7 @@
run_test 02_ms_ip4_sgsn_ip6.sh
run_test 03_ms_ip6_sgsn_ip4.sh
run_test 04_ms_ip6_sgsn_ip6.sh
+run_test 05_ms_ip46_sgsn_ip4.sh
# Success (run-qemu.sh checks for this line)
echo "QEMU_TEST_SUCCESSFUL"
--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/36034?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libgtpnl
Gerrit-Branch: master
Gerrit-Change-Id: I1e306bc4534f14138249cd4034f54f77d940b261
Gerrit-Change-Number: 36034
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/36029?usp=email )
Change subject: Fix a typo
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/36029?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I508274a1a466651025c488ad897aeed739e4b799
Gerrit-Change-Number: 36029
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 21 Feb 2024 12:14:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment