已开启
源码中的ip地址能否删除 #5
AtomGit-Bot创建于  2023年8月22日
AtomGit-Bot
2023年8月22日 创建

在文件plugins/imdiag/imdiag.c中发现如下代码:
251 uchar szMsg[1024];
252 DEFiRet;
253 snprintf((char*)szMsg, sizeof(szMsg)/sizeof(uchar),
254 "<167>Mar 1 01:00:00 172.20.245.8 tag msgnum:%8.8d:", iNum);
255 iRet = doInjectMsg(szMsg, ratelimiter);
256 RETiRet;
在254代码行中有ip地址信息,是否能删除?

likedislike
openeuler-ci-bot
openeuler-ci-bot成员
2023年8月22日 评论:

Hi AlfredEinstein, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Base-service, and any of the maintainers: @licihua , @overweight , @xiezhipeng1 , @yanan-rock , @zhujianwei001 , @dillon_chen

likedislike
AAtomGit-Bot
2023年8月22日 创建了自定义
openeuler-ci-botopeneuler-ci-bot成员
2023年8月22日 添加了 &nbsp; sig/Base-service 标签
AAtomGit-Bot
2023年8月22日 修改了描述
zhangqiumiao
zhangqiumiao
2024年1月6日 评论:

这段代码来自于plugins/imdiag/imdiag.c的doInjectNumericSuffixMsg()函数。imdiag模块是rsyslog的一个测试平台工具,doInjectNumericSuffixMsg()函数的作用是构造一个消息并发送给rsyslog核心程序,以支撑测试用例的执行,函数里的ip本质是测试数据。
事实上,openEuler并不会将imdiag模块放到构建出的rpm包中,因此对用户来说,并不需要在意它。

likedislike
刘德华海淀分华刘德华海淀分华成员
6月21日 关联了pull request:remove hardcoded IP address 172.20.245.8 in imdiag diagnostic message