Skip to content

Commit adf0e36

Browse files
committed
pan: Fix SCION address lookup
1 parent d3ae69e commit adf0e36

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/pan/dns_txt.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ func queryTXTRecord(ctx context.Context, host string) (addresses []string, err e
4949
host += "."
5050
}
5151
resolver := net.Resolver{}
52-
txtRecords, err := resolver.LookupHost(ctx, host)
52+
txtRecords, err := resolver.LookupTXT(ctx, host)
5353
var errDNSError *net.DNSError
5454
if errors.As(err, &errDNSError) {
5555
if errDNSError.IsNotFound {
56-
return addresses, HostNotFoundError{host}
56+
return addresses, err
5757
}
5858
}
5959
if err != nil {
@@ -65,7 +65,7 @@ func queryTXTRecord(ctx context.Context, host string) (addresses []string, err e
6565
}
6666
}
6767
if len(addresses) == 0 {
68-
return addresses, HostNotFoundError{host}
68+
return addresses, err
6969
}
7070
return addresses, nil
7171
}

0 commit comments

Comments
 (0)