mirror of https://github.com/golang/go.git
Update dnsconfig_windows.go
This commit is contained in:
parent
cb8e31e73d
commit
db158625bb
|
|
@ -6,6 +6,7 @@ package net
|
|||
|
||||
import (
|
||||
"syscall"
|
||||
"syscall/windows"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
|
@ -31,7 +32,7 @@ func dnsReadConfig(ignoredFilename string) (conf *dnsConfig) {
|
|||
for _, aa := range aas {
|
||||
for dns := aa.FirstDnsServerAddress; dns != nil; dns = dns.Next {
|
||||
// Only take interfaces whose OperStatus is IfOperStatusUp(0x01) into DNS configs.
|
||||
if aa.OperStatus != 0x01 {
|
||||
if aa.OperStatus != windows.IfOperStatusUp {
|
||||
continue
|
||||
}
|
||||
sa, err := dns.Address.Sockaddr.Sockaddr()
|
||||
|
|
|
|||
Loading…
Reference in New Issue