rfancn / aliyun-ddns-client

Python DDNS client for Aliyun
402 stars 137 forks source link

[BUGFIX] ipv6 check if lan #35

Open RainGather opened 3 years ago

RainGather commented 3 years ago

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

RainGather commented 3 years ago

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

iaurman commented 2 years ago

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

fe8x
fecx
fdxx

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