Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugs] In kernel 6.2, testing gtp5g with scripts for go-gtp5gnl, the ping fails after the script ends. #524

Open
RobertttBS opened this issue Jan 3, 2024 · 0 comments

Comments

@RobertttBS
Copy link

RobertttBS commented Jan 3, 2024

Describe the bug

In Kernel 6.2, I conducted tests with scripts for gtp5g and go-gtp5gnl. The script successfully executed a ping. However, after the script concluded, subsequent pings failed.

The script was copied from libgtp5gnl/script/ns_ran_upf.sh and executed using go-gtp5gnl. I made modifications to gtp5g/genl/genl.c to ensure proper functionality in Kernel 6.2 (specifically, I added .resv_start_op = GTP5G_ATTR_MAX, at the end of the struct genl_family gtp5g_genl_family structure definition).

To maintain the environment without clearing it, I commented out the latter part of the script (ns_ran_upf.sh). The last command in the script is ping -c5 -I ${UE_IP} ${DN_IP}, and it successfully pings.

However, after the script concludes, attempting to ping from UE_IP to DN_IP using the same command fails. Upon inspecting the gtp5gtest interface with Wireshark, I observed that the ICMP request packet lacks an Ethernet header.

It’s noteworthy that the same experiment conducted in Kernel versions 5.15 or lower results in successful pings even after the script concludes (The only difference is the modification made to gtp5g/genl/genl.c).

To Reproduce

Steps to reproduce the behavior:

  1. Use kernel version 6.2 or higher.
  2. Clone go-gtp5gnl and gtp5g.
  3. Open gtp5g/genl/genl.c, add .resv_start_op = GTP5G_ATTR_MAX, at the end of the struct genl_family gtp5g_genl_family structure definition
  4. Compile gtp5g and install kernel module (make & make install)
  5. Build the executable files in go-gtp5gnl: gtp5g-link and gtp5g-tunnel. cd cmd/gogtp5g-link, go build -o ../../tools/gtp5g-link, cd cmd/gogtp5g-tunnel, go build -o ../../tools/gtp5g-tunnel
  6. Copy the scripts from libgtp5gnl to go-gtp5gnl (run.sh and ns_run_upf.sh). And comment out the latter part of the script ns_ran_upf.sh (Keep the environment that ns_run_upf.sh established) .
  7. Then execute sudo ./run.sh SimpleUPTest, the script will end up ping successfully.
  8. Use ping -c3 -I 60.60.0.10 60.60.1.10 in terminal to ping from UE to DN

Expected behavior

The step 8 ping successfully (then test gtp5g functionality using iperf3 or other tools) . These procedures success at kernel version 5.15 or lower, but fail at kernel version 6.2.
I need the kernel of version 6.2 or higher, so downgrading the kernel is not a solution for me.

Screenshots

I comment out the "Stopping" part of commands in ns_ran_upf.sh.
We can see that the ping inside the script is successful. But the subsequent ping command failed.
issue

Environment (please complete the following information):

  • OS: [Ubuntu Desktop 22.04]
  • Kernel version: [6.2.11]
  • go version: [1.17.8 linux/amd64]
  • c compiler version (Option): [11.4.0]
@RobertttBS RobertttBS changed the title [Bugs] [Bugs] In kernel 6.2, testing with scripts for gtp5g and go-gtp5gnl, the ping fails after the script ends. Jan 3, 2024
@RobertttBS RobertttBS changed the title [Bugs] In kernel 6.2, testing with scripts for gtp5g and go-gtp5gnl, the ping fails after the script ends. [Bugs] In kernel 6.2, testing gtp5g with scripts for go-gtp5gnl, the ping fails after the script ends. Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant