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

希望能更改linux系统下,index6 正则获取本地ip的命令优先级 #441

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

Elec4d0
Copy link
Contributor

@Elec4d0 Elec4d0 commented Jun 26, 2024

优先使用ip address 而非ifconfig,理由如下:
ifconfig 会先匹配到处于弃用(Deprecated)状态的v6 ip,不会把处于弃用的v6放到末尾,导致提交的dns v6解析记录为过期v6 ip。
20240627041149

而ip address获取到的前两个ip均为有效前缀v6 ip,可能是对lifetime 或者 ip 获得时间进行过排序
20240627041324

ipaddr 与 win 系统下的ipconfig ip顺序一致,符合“排序”期望
20240627041440

故希望在linux系统中,优先考虑使用ipaddress 而非 ifconfig

优先使用ip address 而非ifconfig,理由如下:
ifconfig 会先匹配到处于弃用(Deprecated)状态的v6 ip,不会把处于弃用的v6放到末尾,导致提交的dns v6解析记录为过期v6 ip。

而ip address获取到的前两个ip均为有效前缀v6 ip,可能是对lifetime 或者 ip 获得时间进行过排序

ipaddr 与 win 系统下的ipconfig ip顺序一致,符合“排序”期望

故希望在linux系统中,优先考虑使用ipaddr 而非 ipconfig
@NewFuture NewFuture merged commit 7781861 into NewFuture:master Jun 27, 2024
8 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.

2 participants