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

Modify the bug of obtaining local IPv6 (box.iptables) #94

Merged
merged 1 commit into from
Feb 14, 2024
Merged

Modify the bug of obtaining local IPv6 (box.iptables) #94

merged 1 commit into from
Feb 14, 2024

Conversation

flyflas
Copy link
Contributor

@flyflas flyflas commented Feb 14, 2024

具体请见issue: #93

box.iptables 中 获取本机ipv6地址,并将其加入到intranet6的代码有误。

错误代码如下, 当本机ipv6例如2001:2de0:b::1241的时候,会被规则过滤,与目的不符(目的是过滤本地回环地址和内网地址)。

intranet6+=($(ip -6 address | busybox awk '/inet6/ && !/::1/ && !/fe80/ {print $2}'))

代码应修改如下

intranet6+=($(ip -6 a | busybox awk '/inet6/ {print $2}' | busybox grep -vE "^fe80|^::1|^fd00"))

问题代码

@twnesss twnesss merged commit 3e41f82 into taamarin:master Feb 14, 2024
1 check passed
@flyflas flyflas deleted the modify-ipv6-logic branch February 23, 2024 14:31
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