busybox ping 无法ping 域名问题

先说解决办法:

使用最新版busybox 1.31,这个版本是可以的,老版本的确存在这个问题,那是因为当时还不支持,不过现在已经解决了。

再说学到的知识:在老版本上解决ping 域名问题

(1)老版本默认ping域名需要编译微动态版本busybox:https://www.cnblogs.com/liangwode/p/5584099.html

(2)静态单文件版本原理就是替换getaddrinfo这个函数接口,让它不再依赖glibc库

参考https://blog.csdn.net/prog_6103/article/details/78569510

https://www.binarytides.com/dns-query-code-in-c-with-linux-sockets/

所需文件下载:https://github.com/dna2github/dna2oslab/tree/master/linux

发布了44 篇原创文章 · 获赞 31 · 访问量 6万+

猜你喜欢

转载自blog.csdn.net/u013463707/article/details/96284975