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

[BUGFIX] ipv6 check if lan #35

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

RainGather
Copy link

@RainGather RainGather commented Jun 10, 2021

某些情况下ni.ifaddresses(ifname)[ni.AF_INET6][0]会获取fe80的内网ipv6地址,通过一个for循环判断是否内网地址来去除内网地址的影响。

@RainGather
Copy link
Author

utils.py中的get_dns_resolved_ip函数没有处理ipv6的情况,已添加相关代码修复。

@iaurman
Copy link

iaurman commented Jul 12, 2022

除了prefix为fe80,还会出现prefix为fd03的地址,建议正泽涵盖所有local address type

fe8x
fecx
fdxx

相关文档:https://tldp.org/HOWTO/Linux+IPv6-HOWTO/ch03s02.html

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