An error occurred fetching the project authors.
  1. 10 Oct, 2018 1 commit
  2. 27 Sep, 2018 1 commit
  3. 26 Sep, 2018 1 commit
    • Ian Gudger's avatar
      net: fail fast for DNS rcode success with no answers of requested type · 94f48ddb
      Ian Gudger authored
      DNS responses which do not contain answers of the requested type return
      errNoSuchHost, the same error as rcode name error. Prior to
      golang.org/cl/37879, both cases resulted in no additional name servers
      being consulted for the question. That CL changed the behavior for both
      cases. Issue #25336 was filed about the rcode name error case and
      golang.org/cl/113815 fixed it. This CL fixes the no answers of requested
      type case as well.
      
      Fixes #27525
      
      Change-Id: I52fadedcd195f16adf62646b76bea2ab3b15d117
      Reviewed-on: https://go-review.googlesource.com/133675
      Run-TryBot: Ian Gudger <igudger@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      94f48ddb
  4. 24 Jul, 2018 1 commit
    • Ian Gudger's avatar
      net: fix handling of Conns created by Resolver.Dial · 5f5402b7
      Ian Gudger authored
      The DNS client in net is documented to treat Conns returned by
      Resolver.Dial which implement PacketConn as UDP and those which don't as
      TCP regardless of what was requested. golang.org/cl/37879 changed the
      DNS client to assume that the Conn returned by Resolver.Dial was the
      requested type which broke compatibility.
      
      Fixes #26573
      Updates #16218
      
      Change-Id: Idf4f073a4cc3b1db36a3804898df206907f9c43c
      Reviewed-on: https://go-review.googlesource.com/125735
      Run-TryBot: Ian Gudger <igudger@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      5f5402b7
  5. 23 May, 2018 1 commit
    • Ian Gudger's avatar
      net: fix DNS NXDOMAIN performance regression · 11b3ee6f
      Ian Gudger authored
      golang.org/cl/37879 unintentionally changed the way NXDOMAIN errors were
      handled. Before that change, resolution would fail on the first NXDOMAIN
      error and return to the user. After that change, the next server would
      be consulted and resolution would fail only after all servers had been
      consulted. This change restores the old behavior.
      
      Go 10.10.2:
      BenchmarkGoLookupIP-12                        	   10000	    174883 ns/op   11450 B/op	     163 allocs/op
      BenchmarkGoLookupIPNoSuchHost-12              	    3000	    670140 ns/op   52189 B/op	     544 allocs/op
      BenchmarkGoLookupIPWithBrokenNameServer-12    	       1	5002568137 ns/op  163792 B/op	     375 allocs/op
      
      before this change:
      BenchmarkGoLookupIP-12                        	   10000	    165501 ns/op    8585 B/op	      94 allocs/op
      BenchmarkGoLookupIPNoSuchHost-12              	    1000	   1204117 ns/op   83661 B/op	     674 allocs/op
      BenchmarkGoLookupIPWithBrokenNameServer-12    	       1	5002629186 ns/op  159128 B/op	     275 allocs/op
      
      after this change:
      BenchmarkGoLookupIP-12                        	   10000	    158102 ns/op    8585 B/op	      94 allocs/op
      BenchmarkGoLookupIPNoSuchHost-12              	    2000	    645364 ns/op   42990 B/op	     356 allocs/op
      BenchmarkGoLookupIPWithBrokenNameServer-12    	       1	5002163437 ns/op  159144 B/op	     275 allocs/op
      
      Fixes #25336
      
      Change-Id: I315cd70330d1f66e54ce5a189a61c99f095bc138
      Reviewed-on: https://go-review.googlesource.com/113815Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      11b3ee6f
  6. 15 Mar, 2018 1 commit
  7. 08 Dec, 2017 1 commit
  8. 08 Jun, 2017 1 commit
    • Ben Burkert's avatar
      net: support all PacketConn and Conn returned by Resolver.Dial · d8a7990f
      Ben Burkert authored
      Allow the Resolver.Dial func to return instances of Conn other than
      *TCPConn and *UDPConn. If the Conn is also a PacketConn, assume DNS
      messages transmitted over the Conn adhere to section 4.2.1. "UDP usage".
      Otherwise, follow section 4.2.2. "TCP usage".
      
      Provides a hook mechanism so that DNS queries generated by the net
      package may be answered or modified before being sent to over the
      network.
      
      Updates #19910
      
      Change-Id: Ib089a28ad4a1848bbeaf624ae889f1e82d56655b
      Reviewed-on: https://go-review.googlesource.com/45153
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      d8a7990f
  9. 12 May, 2017 1 commit
    • Matt Harden's avatar
      net: allow Resolver to use a custom dialer · 380aa884
      Matt Harden authored
      In some cases it is desirable to customize the way the DNS server is
      contacted, for instance to use a specific LocalAddr. While most
      operating-system level resolvers do not allow this, we have the
      opportunity to do so with the Go resolver. Most of the code was
      already in place to allow tests to override the dialer. This exposes
      that functionality, and as a side effect eliminates the need for a
      testing hook.
      
      Fixes #17404
      
      Change-Id: I1c5e570f8edbcf630090f8ec6feb52e379e3e5c0
      Reviewed-on: https://go-review.googlesource.com/37260
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      380aa884
  10. 04 May, 2017 1 commit
  11. 18 Mar, 2017 1 commit
  12. 09 Mar, 2017 1 commit
    • Paul Marks's avatar
      net: add Resolver.StrictErrors · bfc164c6
      Paul Marks authored
      When LookupIP is performing multiple subqueries, this option causes a
      timeout/servfail affecting a single query to abort the whole operation,
      instead of returning a partial (IPv4/IPv6-only) result.
      
      Similarly, operations that walk the DNS search list will also abort when
      encountering one of these errors.
      
      Fixes #17448
      
      Change-Id: Ice22e4aceb555c5a80d19bd1fde8b8fe87ac9517
      Reviewed-on: https://go-review.googlesource.com/32572Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      bfc164c6
  13. 13 Feb, 2017 1 commit
  14. 20 Dec, 2016 1 commit
  15. 15 Nov, 2016 1 commit
  16. 17 Sep, 2016 1 commit
  17. 29 Aug, 2016 1 commit
  18. 23 Aug, 2016 1 commit
  19. 17 Aug, 2016 1 commit
  20. 11 May, 2016 1 commit
  21. 28 Apr, 2016 1 commit
    • Matthew Dempsky's avatar
      net: append ":53" to DNS servers when reading resolv.conf · 4d9bda51
      Matthew Dempsky authored
      Avoids generating some redundant garbage from re-concatenating the
      same string for every DNS query.
      
      benchmark                                      old allocs     new allocs     delta
      BenchmarkGoLookupIP-32                         156            154            -1.28%
      BenchmarkGoLookupIPNoSuchHost-32               456            446            -2.19%
      BenchmarkGoLookupIPWithBrokenNameServer-32     577            564            -2.25%
      
      benchmark                                      old bytes     new bytes     delta
      BenchmarkGoLookupIP-32                         10873         10824         -0.45%
      BenchmarkGoLookupIPNoSuchHost-32               43303         43140         -0.38%
      BenchmarkGoLookupIPWithBrokenNameServer-32     46824         46616         -0.44%
      
      Update #15473.
      
      Change-Id: I3b0173dfedf31bd08eaea1069968b416850864a1
      Reviewed-on: https://go-review.googlesource.com/22556Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      4d9bda51
  22. 26 Apr, 2016 1 commit
  23. 22 Apr, 2016 1 commit
  24. 18 Apr, 2016 1 commit
    • Brad Fitzpatrick's avatar
      net: fix plan9 after context change, propagate contexts more · f60fcca5
      Brad Fitzpatrick authored
      My previous https://golang.org/cl/22101 to add context throughout the
      net package broke Plan 9, which isn't currently tested (#15251).
      
      It also broke some old unsupported version of Windows (Windows 2000?)
      which doesn't have the ConnectEx function, but that was only found
      visually, since our minimum supported Windows version has ConnectEx.
      This change simplifies the Windows and deletes the non-ConnectEx code
      path.  Windows 2000 will work even less now, if it even worked
      before. Windows XP remains our minimum supported version.
      
      Specifically, the previous CL stopped using the "dial" function, which
      0intro noted:
      https://github.com/golang/go/issues/15333#issuecomment-210842761
      
      This CL removes the dial function instead and makes plan9's net
      implementation respect contexts, which likely fixes a number of
      t.Skipped tests. I'm leaving that to 0intro to investigate.
      
      In the process of propagating and respecting contexts for plan9, I had
      to change some signatures to add contexts to more places and ended up
      pushing contexts down into the Go-based DNS resolution as well,
      replacing the pure-Go DNS implementation's use of "timeout
      time.Duration" with a context instead.
      
      Updates #11932
      Updates #15328
      
      Fixes #15333
      
      Change-Id: I6ad1e62f38271cdd86b3f40921f2d0f23374936a
      Reviewed-on: https://go-review.googlesource.com/22144Reviewed-by: default avatarDavid du Colombier <0intro@gmail.com>
      Reviewed-by: default avatarMikio Hara <mikioh.mikioh@gmail.com>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      f60fcca5
  25. 15 Apr, 2016 1 commit
  26. 14 Apr, 2016 1 commit
  27. 02 Apr, 2016 1 commit
  28. 25 Feb, 2016 1 commit
    • Mikio Hara's avatar
      net: make TestGoLookupIPWithResolverConfig robust · b48120ca
      Mikio Hara authored
      It crashes when the node under the test is shaken up.
      
      -- FAIL: TestGoLookupIPWithResolverConfig (11.73s)
      panic: interface conversion: error is nil, not *net.DNSError [recovered]
      	panic: interface conversion: error is nil, not *net.DNSError
      
      goroutine 23 [running]:
      panic(0x2e2620, 0xc820181440)
      	/go/src/runtime/panic.go:483 +0x3f3
      testing.tRunner.func1(0xc820136d80)
      	/go/src/testing/testing.go:467 +0x192
      panic(0x2e2620, 0xc820181440)
      	/go/src/runtime/panic.go:441 +0x4f6
      net.TestGoLookupIPWithResolverConfig(0xc820136d80)
      	/go/src/net/dnsclient_unix_test.go:358 +0x7ca
      testing.tRunner(0xc820136d80, 0x49ddc0)
      	/go/src/testing/testing.go:473 +0x98
      created by testing.RunTests
      	/go/src/testing/testing.go:582 +0x892
      exit status 2
      
      Change-Id: I9631f41a3c73f3269c7e30d679c025ae64d71a98
      Reviewed-on: https://go-review.googlesource.com/19870Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      b48120ca
  29. 24 Feb, 2016 1 commit
  30. 21 Feb, 2016 1 commit
    • Matthew Dempsky's avatar
      net: fix TestUpdateResolvConf after CL 18860 · 8caf19c4
      Matthew Dempsky authored
      When writing a fake dnsConfig to conf.dnsConfig, set lastChecked to an
      hour into the future.  This causes dnsclient_unix.go's
      tryUpdate("/etc/resolv.conf") calls to short-circuit and ignore that
      /etc/resolv.conf's mtime differs from the test's fake resolv.conf
      file.  We only need to zero out lastChecked in teardown.
      
      While here, this makes two other tryUpdate(conf.path) test calls
      pointless, since they'll now short circuit too.
      
      Fixes #14437.
      
      Change-Id: Ieb520388e319b9826dfa49f134907f4927608a53
      Reviewed-on: https://go-review.googlesource.com/19777
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMikio Hara <mikioh.mikioh@gmail.com>
      8caf19c4
  31. 19 Jan, 2016 1 commit
  32. 17 Dec, 2015 2 commits
  33. 03 Dec, 2015 1 commit
  34. 02 Dec, 2015 1 commit
  35. 28 Jul, 2015 1 commit
  36. 13 Jul, 2015 1 commit
  37. 15 May, 2015 1 commit
  38. 14 May, 2015 1 commit
  39. 07 May, 2015 1 commit