overlay: fix tun.RouteFor getting *net.IP (#595)

tun.RouteFor expects the routeTree to have an iputil.VpnIp inside of it
instead of a *net.IP.
This commit is contained in:
Wade Simmons
2021-12-06 09:35:31 -05:00
committed by GitHub
parent 48c47f5841
commit f60ed2b36d
3 changed files with 40 additions and 4 deletions

View File

@ -97,7 +97,7 @@ func (t *winTun) Activate() error {
// Add our unsafe route
routes = append(routes, &winipcfg.RouteData{
Destination: *r.Cidr,
NextHop: *r.Via,
NextHop: r.Via.ToIP(),
Metric: uint32(r.Metric),
})
}