pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35993?usp=email )
Change subject: Use new 'pre-create tundev' feature from gtp_u_kmod
......................................................................
Use new 'pre-create tundev' feature from gtp_u_kmod
This way osmo-epdg doesn't need to create the gtp tun device, and it can
be pre-created and configured by other tools, like gtp-link from
libgtpnl.git.
Change-Id: I2297b8a75e75cc8095ae1485f73c49c5e6b26c4e
---
M Makefile
M config/sys.config
M rebar.lock
3 files changed, 43 insertions(+), 16 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-epdg refs/changes/93/35993/1
diff --git a/Makefile b/Makefile
index 0470458..286a2dc 100644
--- a/Makefile
+++ b/Makefile
@@ -23,3 +23,16 @@
else
rm -f src/diameter_*.erl
endif
+
+# Path to libgtpnl's "gtp-link" binary:
+GTP_LINK=gtp-link
+# Matching the one defined in config/sys.config:
+NETDEV=gtp0
+
+run-test:
+ echo -n 'module gtp +p' | sudo tee /sys/kernel/debug/dynamic_debug/control
+ sudo ip link del $(NETDEV) || true
+ sleep 1
+ sudo sh -c "$(GTP_LINK) add $(NETDEV) & MYPID=\$$! ; echo "PID=\$${MYPID}" ; sleep 1; kill \$${MYPID} ;"
+ sudo rebar3 shell --config ./config/sys.config || true
+ echo -n 'module gtp -p' | sudo tee /sys/kernel/debug/dynamic_debug/control
diff --git a/config/sys.config b/config/sys.config
index 660aded..3d12e15 100755
--- a/config/sys.config
+++ b/config/sys.config
@@ -41,21 +41,22 @@
%% gtp_u_kmod config
%% ===========================================
{gtp_u_kmod, [
- %% grx: Name used to log by the module.
- {sockets, [{grx, [%% ip: IP Address assigned at the tunnel, used as local GTP-U IP Address.
- {ip, {127,0,0,2}},
- %% Create the tun socket on a given netns:
- %%{netns, "mynetns"},
- %% Bind tun socket to a particular interface (SO_BINDTODEVICE):
- %%{netdev, "grx"},
- %% Allow binding to an IP address that is nonlocal or does not (yet) exist (IP_FREEBIND):
- freebind,
- % Create gtp tundev with role SGSN:
- {role, sgsn}%,
- %{vrf, [{routes, [{{10, 180, 0, 0}, 16}]}%%,
- % %%{netdev, "upstream"}
- % ]
- %}
+ %% gtp0: Iface name, also used to identify the process handling the tunnel.
+ {sockets, [{gtp0, [{create_mode, nocreate},
+ %% ip: IP Address assigned at the tunnel, used as local GTP-U IP Address.
+ {ip, {127,0,0,2}},
+ %% Create the tun socket on a given netns:
+ %%{netns, "mynetns"},
+ %% Bind tun socket to a particular interface (SO_BINDTODEVICE):
+ %%{netdev, "grx"},
+ %% Allow binding to an IP address that is nonlocal or does not (yet) exist (IP_FREEBIND):
+ freebind,
+ % Create gtp tundev with role SGSN:
+ {role, sgsn}%,
+ %{vrf, [{routes, [{{10, 180, 0, 0}, 16}]}%%,
+ % %%{netdev, "upstream"}
+ % ]
+ %}
]
}]
}
diff --git a/rebar.lock b/rebar.lock
index 4eefe8e..0237efa 100644
--- a/rebar.lock
+++ b/rebar.lock
@@ -19,7 +19,7 @@
{<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.9">>},1},
{<<"gtp_u_kmod">>,
{git,"https://github.com/osmocom/gtp_u_kmod",
- {ref,"1dc27ed724403026431f51dd4c3f882499a036b0"}},
+ {ref,"b3656ebb11528a2db3171dbf94f1a8bf0d6ffd00"}},
0},
{<<"gtplib">>,{pkg,<<"gtplib">>,<<"3.2.0">>},0},
{<<"lager">>,
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35993?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo-epdg
Gerrit-Branch: master
Gerrit-Change-Id: I2297b8a75e75cc8095ae1485f73c49c5e6b26c4e
Gerrit-Change-Number: 35993
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: lynxis lazus, osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35977?usp=email )
Change subject: epdg: Validate assigned PDP Address and APN
......................................................................
Patch Set 1:
(1 comment)
File epdg/EPDG_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35977/comment/0211b5ce_d099…
PS1, Line 608: tr_GSUP_IE_PDP_ADDRESS(tr_GSUP_PDP_Address_IPv4(f_inet_addr(g_pars.ue_ip))),
> I guess IPv6 is not relevant here?
It is, but we are not supporting it yet.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35977?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I440a7379c6dab5448d4c57c498ad9d086d0c456b
Gerrit-Change-Number: 35977
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Thu, 15 Feb 2024 16:16:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libgtpnl/+/35991?usp=email )
Change subject: Add QEMU tests
......................................................................
Patch Set 4: Code-Review+1
(1 comment)
File tests/qemu/README.md:
https://gerrit.osmocom.org/c/libgtpnl/+/35991/comment/a197b132_d21ca267
PS4, Line 2:
Maybe a line here briefly explaining what the tests actually do. Which scenario network setup do they run, etc.
--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/35991?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: Ibf75514b866fffb11e90529e4705f126b23d7415
Gerrit-Change-Number: 35991
Gerrit-PatchSet: 4
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 15 Feb 2024 16:14:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libgtpnl/+/35991?usp=email )
Change subject: Add QEMU tests
......................................................................
Patch Set 4:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/libgtpnl/+/35991/comment/849ac8af_c95a6ec5
PS3, Line 14: Make sure to enable:
> Sounds like a README file somewhere (which I don't see in the list of modified files in this commit) […]
Done
--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/35991?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: Ibf75514b866fffb11e90529e4705f126b23d7415
Gerrit-Change-Number: 35991
Gerrit-PatchSet: 4
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 15 Feb 2024 15:59:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: osmith.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libgtpnl/+/35991?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: Add QEMU tests
......................................................................
Add QEMU tests
Add tests to ensure libgtpnl + kernel driver work as expected.
Right now a kernel needs to be built from source, using Pablo's tree:
https://git.kernel.org/pub/scm/linux/kernel/git/pablo/gtp.git/
Make sure to enable:
CONFIG_GTP=y
CONFIG_NET_NS=y
CONFIG_VETH=y
$ cp bzImage tests/qemu/_linux
$ ./configure --enable-qemu-tests
$ make
$ make check
Once patches are upstreamed, it will be possible to use a pre-built
kernel from jenkins with: make -C tests qemu-download-kernel
Related: OS#1952
Change-Id: Ibf75514b866fffb11e90529e4705f126b23d7415
---
M .gitignore
M Makefile.am
M configure.ac
A tests/Makefile.am
A tests/qemu/00_test_functions.sh
A tests/qemu/01_ms_ip4_sgsn_ip4.sh
A tests/qemu/02_ms_ip4_sgsn_ip6.sh
A tests/qemu/03_ms_ip6_sgsn_ip4.sh
A tests/qemu/04_ms_ip6_sgsn_ip6.sh
A tests/qemu/README.md
A tests/qemu/check-depends.sh
A tests/qemu/initrd-build.sh
A tests/qemu/initrd-init.sh
A tests/qemu/run-qemu.sh
14 files changed, 443 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/91/35991/4
--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/35991?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: Ibf75514b866fffb11e90529e4705f126b23d7415
Gerrit-Change-Number: 35991
Gerrit-PatchSet: 4
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libgtpnl/+/35991?usp=email )
Change subject: Add QEMU tests
......................................................................
Patch Set 3:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/libgtpnl/+/35991/comment/8d395162_1702a178
PS3, Line 14: Make sure to enable:
Sounds like a README file somewhere (which I don't see in the list of modified files in this commit) would be welcome.
--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/35991?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: Ibf75514b866fffb11e90529e4705f126b23d7415
Gerrit-Change-Number: 35991
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 15 Feb 2024 15:14:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libgtpnl/+/35990?usp=email )
Change subject: gtp-tunnel: display i_tei in help
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/35990?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: I0aa78e654f23a2b6588ac8e1e5508e798caad1a7
Gerrit-Change-Number: 35990
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 15 Feb 2024 15:12:46 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment