]> Cypherpunks repositories - gostls13.git/commit
net: call getSystemDNSConfig inside lookupWithFake to avoid nil dereference panic...
authorMateusz Poliwczak <mpoliwczak34@gmail.com>
Thu, 17 Nov 2022 08:54:48 +0000 (08:54 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 24 Mar 2023 22:53:36 +0000 (22:53 +0000)
commit478b1d260a21a83a090ba120efb79753495545e1
tree920121efcff600efc119aa83204e5607574cdb75
parentea2d4a7ef674b4a0ea0e53ffecbc63320b91f25f
net: call getSystemDNSConfig inside lookupWithFake to avoid nil dereference panic when running tests alone

It happens with tests that only call lookupWithFake, and before them no-one calls resolverConf.tryUpdate. running alone one of these: TestIssue8434, TestIssueNoSuchHostExists cause a nil dereference panic.

Change-Id: I3fccd96dff5b3c77b5420a7f73742acbafa80142
GitHub-Last-Rev: 7456fd16a7ff4845b4ca305d4107d29f1d6f7b3e
GitHub-Pull-Request: golang/go#56759
Reviewed-on: https://go-review.googlesource.com/c/go/+/450856
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
src/net/dnsclient_unix_test.go