From 2af974777d8e771e5c58f172876ac4c6d9fb7256 Mon Sep 17 00:00:00 2001 From: Nicolas Owens Date: Mon, 17 Jun 2013 11:38:07 -0700 Subject: [PATCH] net: fix LookupNS on Plan 9 use correct field count when resolving nameservers via /net/dns on Plan 9. we incorrectly check for 4 fields instead of 3 when parsing the result of /net/dns, and get no results R=golang-dev, ality CC=golang-dev https://golang.org/cl/10182044 --- src/pkg/net/lookup_plan9.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pkg/net/lookup_plan9.go b/src/pkg/net/lookup_plan9.go index 94c55332869..3a7b9acb943 100644 --- a/src/pkg/net/lookup_plan9.go +++ b/src/pkg/net/lookup_plan9.go @@ -224,10 +224,10 @@ func lookupNS(name string) (ns []*NS, err error) { } for _, line := range lines { f := getFields(line) - if len(f) < 4 { + if len(f) < 3 { continue } - ns = append(ns, &NS{f[3]}) + ns = append(ns, &NS{f[2]}) } return }