In kernel 6.2, testing with scripts for gtp5g and go-gtp5gnl, the ping fails after the script ends


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/ 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 ( 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.

I seek assistance in resolving this situation. 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).
If the explanation is not clear enough, I can shoot a video to provide a clearer description of the issue.
The picture shows the last command in script is ping -c5 -I ${UE_IP} ${DN_IP} and ping successfully. But failed at the same command in the terminal.


This is already asked and answered before: