Push route handling into overlay, a few more nits fixed (#581)

This commit is contained in:
Nate Brown
2021-11-12 11:19:28 -06:00
committed by GitHub
parent 2f1f0d602f
commit 467e605d5e
17 changed files with 300 additions and 185 deletions

View File

@@ -72,7 +72,7 @@ func (f *Interface) consumeInsidePacket(packet []byte, fwPacket *firewall.Packet
func (f *Interface) getOrHandshake(vpnIp iputil.VpnIp) *HostInfo {
//TODO: we can find contains without converting back to bytes
if f.hostMap.vpnCIDR.Contains(vpnIp.ToIP()) == false {
vpnIp = f.hostMap.queryUnsafeRoute(vpnIp)
vpnIp = f.inside.RouteFor(vpnIp)
if vpnIp == 0 {
return nil
}