Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to modify the free5Gc source code to recompile a network element

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "how to modify the free5Gc source code to recompile a network element", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to modify the free5Gc source code to recompile a network element" this article.

In the process of reading the free5Gc source code and doing some functional verification, we may find that bug exists in the source code implementation of free5Gc.

Take the AMF network element as an example, the sentence "UEContextTransferProcedure lacks a red box" is instantiated, resulting in a null pointer exception triggered when a request is made:

In order to make the functionality available again, we need to modify the source code and recompile it, as follows.

Download the free5Gc source code

Git clone-- recursive-b v3.0.3-j `nproc` https://github.com/free5gc/free5gc.git

Cd free5gc

Git checkout master

Git submodule sync

Git submodule update-init-jobs `nproc`

Git submodule foreach git checkout master

Git submodule foreach git pull-- jobs `nproc`

The source code of each network element will be modified as needed in free5gc/src/ {under the network element name}.

II. Recompile amf

Export CGO_ENABLED=0

Go build-o bin/amf-x src/amf/amf.go

Re-copy the compiled amf to the amf container

Sudo docker cp. / amf amf:/free5gc/amf/amf

4. Restart the amf container

Sudo docker stop amf

Sudo docker start amf

The above is all the contents of the article "how to modify the free5Gc source code to recompile a network element". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report