Skip to content

Commit 0e681ea

Browse files
authored
Merge pull request #921 from Nino-K/add-debug-lines
Allow dns.go to be consumed by external projects 5/5
2 parents 2f255b2 + 6998600 commit 0e681ea

File tree

4 files changed

+255
-145
lines changed

4 files changed

+255
-145
lines changed

cmd/limactl/debug.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,16 @@ func debugDNSAction(cmd *cobra.Command, args []string) error {
4747
return err
4848
}
4949
}
50-
srv, err := dns.Start(udpLocalPort, tcpLocalPort, ipv6, map[string]string{})
50+
srvOpts := dns.ServerOptions{
51+
UDPPort: udpLocalPort,
52+
TCPPort: tcpLocalPort,
53+
Address: "127.0.0.1",
54+
HandlerOptions: dns.HandlerOptions{
55+
IPv6: ipv6,
56+
StaticHosts: map[string]string{},
57+
},
58+
}
59+
srv, err := dns.Start(srvOpts)
5160
if err != nil {
5261
return err
5362
}

0 commit comments

Comments
 (0)