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

[Bug] networkutil code logical errors #8289

Open
2 tasks done
zekai-li opened this issue Jun 12, 2024 · 0 comments · May be fixed by #8290
Open
2 tasks done

[Bug] networkutil code logical errors #8289

zekai-li opened this issue Jun 12, 2024 · 0 comments · May be fixed by #8290

Comments

@zekai-li
Copy link

zekai-li commented Jun 12, 2024

Before Creating the Bug Report

  • I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

linux

RocketMQ version

develop

JDK Version

jdk8

Describe the Bug

1,TraceBean: private static final String LOCAL_ADDRESS = UtilAll.ipToIPv4Str(UtilAll.getIP()); getIP mayby ipv6
2,NetworkUtil:if (ip.startsWith("127.0") || ip.startsWith("192.168") || ip.startsWith("0."));Check whether Intranet errors exist
3,0.0.0.0 到 0.255.255.255 通常不用于生产环境,因为它们可能与某些保留的地址或特殊用途的地址重叠。

Steps to Reproduce

Read code logic

What Did You Expect to See?

Read code logic

What Did You See Instead?

No response

Additional Context

No response

zekai-li added a commit to zekai-li/rocketmq that referenced this issue Jun 12, 2024
Fix the following three as
1,TraceBean: private static final String LOCAL_ADDRESS = UtilAll.ipToIPv4Str(UtilAll.getIP()); getIP mayby ipv6
2,NetworkUtil:if (ip.startsWith("127.0") || ip.startsWith("192.168") || ip.startsWith("0."));Check whether Intranet errors exist
zekai-li added a commit to zekai-li/rocketmq that referenced this issue Jun 13, 2024
Fix the following three as
1,TraceBean: private static final String LOCAL_ADDRESS = UtilAll.ipToIPv4Str(UtilAll.getIP()); getIP mayby ipv6
2,NetworkUtil:if (ip.startsWith("127.0") || ip.startsWith("192.168") || ip.startsWith("0."));Check whether Intranet errors exist
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

Successfully merging a pull request may close this issue.

1 participant