Browse Source

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

pull/3712/head
チセ 3 months ago committed by GitHub
parent
commit
41d03d1856
  1. 3
      proxy/wireguard/tun_linux.go

3
proxy/wireguard/tun_linux.go

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

Loading…
Cancel
Save