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

修复获取网卡物理地址的问题 #704

Merged
merged 5 commits into from
Mar 14, 2024
Merged

Conversation

sduo
Copy link
Contributor

@sduo sduo commented Mar 13, 2024

Which Issue(s) This PR Fixes

Fixes #702

Brief Description

获取地址时排除 NetworkInterfaceType 值为 53 的网卡,在返回时再次检测物理地址的长度是否小于要求长度(6),如果小于,则返回 RandomMacAddressBytes,如果大于,则返回物理地址。

How Did You Test This Change?

更新相关联的单元测试,加入物理地址长度的检测。

sduo added 4 commits March 13, 2024 10:46
修复无法获得正确的网卡物理地址异常
修复构建错误
修复编译错误
@lizhanhui lizhanhui self-requested a review March 14, 2024 16:07
Copy link
Contributor

@lizhanhui lizhanhui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@lizhanhui lizhanhui merged commit 3036b04 into apache:master Mar 14, 2024
15 checks passed
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 this pull request may close these issues.

[Bug] 在安装了 OpenVPN 机器的环境下无法获得正确的网卡物理地址导致异常
2 participants