File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -11,18 +11,14 @@ import (
11
11
"runtime"
12
12
"strconv"
13
13
"strings"
14
- "time"
15
14
16
15
"github.com/miekg/dns"
17
16
"github.com/sirupsen/logrus"
18
17
)
19
18
20
- const (
21
- // Truncate for avoiding "Parse error" from `busybox nslookup`
22
- // https://github.com/lima-vm/lima/issues/380
23
- truncateSize = 512
24
- ipv6ResponseDelay = time .Second
25
- )
19
+ // Truncate for avoiding "Parse error" from `busybox nslookup`
20
+ // https://github.com/lima-vm/lima/issues/380
21
+ const truncateSize = 512
26
22
27
23
var defaultFallbackIPs = []string {"8.8.8.8" , "1.1.1.1" }
28
24
@@ -168,12 +164,6 @@ func (h *Handler) handleQuery(w dns.ResponseWriter, req *dns.Msg) {
168
164
switch q .Qtype {
169
165
case dns .TypeAAAA :
170
166
if ! h .ipv6 {
171
- // Unfortunately some older resolvers use a slow random source to set the Transaction ID.
172
- // This creates a problem on M1 computers, which are too fast for that implementation:
173
- // Both the A and AAAA queries might end up with the same id. Therefore, we wait for
174
- // 1 second and then we return NODATA for AAAA. This will allow the client to receive
175
- // the correct response even when both Transaction IDs are the same.
176
- time .Sleep (ipv6ResponseDelay )
177
167
// See RFC 2308 section 2.2 which suggests that NODATA is indicated by setting the
178
168
// RCODE to NOERROR along with zero entries in the response.
179
169
reply .SetRcode (req , dns .RcodeSuccess )
You can’t perform that action at this time.
0 commit comments