diff --git a/tun_linux.go b/tun_linux.go index 22f09aa..886b32b 100644 --- a/tun_linux.go +++ b/tun_linux.go @@ -572,6 +572,23 @@ func (t *NativeTun) rules() []*netlink.Rule { rules = append(rules, it) } priority++ + + it = netlink.NewRule() + it.Priority = priority + it.Table = t.options.TableIndex + it.SuppressPrefixlen = 0 + it.Family = unix.AF_INET + rules = append(rules, it) + priority++ + } + if p6 { + it = netlink.NewRule() + it.Priority = priority6 + it.Table = t.options.TableIndex + it.SuppressPrefixlen = 0 + it.Family = unix.AF_INET6 + rules = append(rules, it) + priority6++ } if p4 && !t.options.StrictRoute { it = netlink.NewRule()