Merge pull request #1124 from ghostcloud-cn/bugdns
check fields len in dns.go
This commit is contained in:
commit
45c614a34f
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ func GetSystemNameServers() ([]net.IP, error) {
|
|||
continue
|
||||
}
|
||||
fields := strings.Fields(trimmed)
|
||||
if len(fields) == 0 {
|
||||
if len(fields) < 2 {
|
||||
continue
|
||||
}
|
||||
if fields[0] == "nameserver" {
|
||||
|
|
Loading…
Reference in a new issue