ok - really fix the netifAddroute this time

This commit is contained in:
dovholuknf
2021-03-11 13:32:29 -05:00
parent a80efe6523
commit 6ee2d50546
2 changed files with 2 additions and 4 deletions
+2 -2
View File
@@ -290,7 +290,7 @@ func netifAddRoute(_ C.netif_handle, dest *C.char) C.int {
return 1
}
_ = dnsMgrPrivate.tun.AddRoute(*cidr, dnsip, 1)
_ = goapi.AddRoute(*cidr, dnsip, 1)
} else {
log.Debugf("route appears to be an IP (not CIDR): %s", routeAsString)
@@ -299,7 +299,7 @@ func netifAddRoute(_ C.netif_handle, dest *C.char) C.int {
log.Errorf("An error occurred while parsing IP: %s", routeAsString)
return 1
}
_ = dnsMgrPrivate.tun.AddRoute(net.IPNet{IP: ip, Mask: net.IPMask{255, 255, 255, 255}}, dnsip, 1)
_ = goapi.AddRoute(net.IPNet{IP: ip, Mask: net.IPMask{255, 255, 255, 255}}, dnsip, 1)
}
return 0
}
-2
View File
@@ -21,7 +21,6 @@ import "C"
import (
"encoding/binary"
"fmt"
"github.com/openziti/desktop-edge-win/service/ziti-tunnel/api"
"net"
"strings"
"sync"
@@ -43,7 +42,6 @@ type dnsImpl struct {
ipCount uint32
serviceMap map[string]*ctxService
hostnameMap map[string]*ctxIp
tun api.DesktopEdgeIface
}
func (dns *dnsImpl) ApplyDNS(dnsNameToReg string, ip string) {