From d7849e84cf63ac0b32c7b491b59ffca5e88815eb Mon Sep 17 00:00:00 2001 From: Mary Lincy Dcouto Date: Thu, 20 May 2021 17:53:55 +0530 Subject: [PATCH] adding debug statement and updating release notes --- release-notes.md | 4 +++- service/ziti-tunnel/service/state.go | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/release-notes.md b/release-notes.md index 5377c504..614de8d8 100644 --- a/release-notes.md +++ b/release-notes.md @@ -6,9 +6,11 @@ ## Other changes: * updated auto-installation config * renewed signing cert +* added dns cache output back to feedback.zip +* set lower metric, if dns server property is set ## Bugs fixed: -* set lower metric, if dns server property is set +* none ## Dependency Updates * tsdk is updated to v0.15.6, c-sdk 0.22.5 diff --git a/service/ziti-tunnel/service/state.go b/service/ziti-tunnel/service/state.go index 82b36607..0157a2c5 100644 --- a/service/ziti-tunnel/service/state.go +++ b/service/ziti-tunnel/service/state.go @@ -225,6 +225,7 @@ func (t *RuntimeState) CreateTun(ipv4 string, ipv4mask int, applyDns bool) (net. log.Info("routing applied") zitiPoliciesEffective := windns.IsNrptPoliciesEffective(ipv4) + interfaceMetric := 255 if applyDns || !zitiPoliciesEffective { if applyDns { log.Infof("DNS is applied to the TUN interface, because apply Dns flag in the config file is %t ", applyDns) @@ -234,10 +235,10 @@ func (t *RuntimeState) CreateTun(ipv4 string, ipv4mask int, applyDns bool) (net. } //for windows 10+, could 'domains' be able to replace NRPT? dunno - didn't test it luid.SetDNS(windows.AF_INET, []net.IP{ip}, nil) - cziti.SetInterfaceMetric(TunName, 5) - } else { - cziti.SetInterfaceMetric(TunName, 255) + interfaceMetric = 5 } + cziti.SetInterfaceMetric(TunName, interfaceMetric) + log.Debugf("Interface Metric of %s is set to %d", TunName, interfaceMetric) return ip, t.tun, nil }