ping: Fix linux route rules
This commit is contained in:
parent
4fb5702443
commit
b5f3fecc25
2 changed files with 20 additions and 23 deletions
18
tun_linux.go
18
tun_linux.go
|
|
@ -816,14 +816,6 @@ func (t *NativeTun) rules() []*netlink.Rule {
|
|||
it.Family = unix.AF_INET
|
||||
rules = append(rules, it)
|
||||
}
|
||||
if p4 && !t.options.StrictRoute {
|
||||
it = netlink.NewRule()
|
||||
it.Priority = priority
|
||||
it.IPProto = syscall.IPPROTO_ICMP
|
||||
it.Goto = nopPriority
|
||||
it.Family = unix.AF_INET
|
||||
rules = append(rules, it)
|
||||
}
|
||||
if p6 {
|
||||
it = netlink.NewRule()
|
||||
it.Priority = priority6
|
||||
|
|
@ -834,16 +826,6 @@ func (t *NativeTun) rules() []*netlink.Rule {
|
|||
it.Family = unix.AF_INET6
|
||||
rules = append(rules, it)
|
||||
}
|
||||
|
||||
if p6 && !t.options.StrictRoute {
|
||||
it = netlink.NewRule()
|
||||
it.Priority = priority6
|
||||
it.IPProto = syscall.IPPROTO_ICMPV6
|
||||
it.Goto = nopPriority
|
||||
it.Family = unix.AF_INET6
|
||||
rules = append(rules, it)
|
||||
priority6++
|
||||
}
|
||||
}
|
||||
if p4 {
|
||||
it = netlink.NewRule()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue