Wireguard inbound: Fix no route when bind to interface (#3698)

This commit is contained in:
チセ 2024-08-20 07:21:19 +08:00 committed by GitHub
parent 160316d53c
commit 41d03d1856

View file

@ -200,6 +200,9 @@ func createKernelTun(localAddresses []netip.Addr, mtu int, handler promiscuousMo
r := netlink.NewRule()
r.Table, r.Family, r.Src = ipv6TableIndex, unix.AF_INET6, addr.IPNet
out.rules = append(out.rules, r)
r = netlink.NewRule()
r.Table, r.Family, r.OifName = ipv6TableIndex, unix.AF_INET6, n
out.rules = append(out.rules, r)
}
for _, addr := range out.linkAddrs {