fix(check_zone_serial): use net.JoinHostPort
This commit is contained in:
parent
bad82cf32d
commit
8feb34bbe6
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -31,7 +32,7 @@ type (
|
||||||
// Query a zone's SOA record through a given DNS and return the response using the channel.
|
// Query a zone's SOA record through a given DNS and return the response using the channel.
|
||||||
func queryZoneSOA(dnsq *dns.Msg, hostname string, port int, output responseChannel) {
|
func queryZoneSOA(dnsq *dns.Msg, hostname string, port int, output responseChannel) {
|
||||||
dnsc := new(dns.Client)
|
dnsc := new(dns.Client)
|
||||||
in, rtt, err := dnsc.Exchange(dnsq, fmt.Sprintf("%s:%d", hostname, port))
|
in, rtt, err := dnsc.Exchange(dnsq, net.JoinHostPort(hostname, fmt.Sprintf("%d", port)))
|
||||||
output <- queryResponse{
|
output <- queryResponse{
|
||||||
data: in,
|
data: in,
|
||||||
rtt: rtt,
|
rtt: rtt,
|
||||||
|
|
Loading…
Reference in a new issue