mirror of
https://github.com/golang/go.git
synced 2025-11-10 21:51:05 +00:00
net: use original argument in lookup error
Fixes #6324. R=golang-dev, iant, mikioh.mikioh CC=golang-dev https://golang.org/cl/13280049
This commit is contained in:
parent
e0867738fc
commit
94a6511b7f
1 changed files with 6 additions and 0 deletions
|
|
@ -211,6 +211,12 @@ func lookup(name string, qtype uint16) (cname string, addrs []dnsRR, err error)
|
|||
if err == nil {
|
||||
return
|
||||
}
|
||||
if e, ok := err.(*DNSError); ok {
|
||||
// Show original name passed to lookup, not suffixed one.
|
||||
// In general we might have tried many suffixes; showing
|
||||
// just one is misleading. See also golang.org/issue/6324.
|
||||
e.Name = name
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue