mirror of
https://github.com/jwhited/wgsd.git
synced 2025-01-18 13:59:34 +08:00
fix extra parsing
This commit is contained in:
parent
a3627a0f27
commit
4873385214
@ -96,13 +96,13 @@ func main() {
|
||||
pubKeyBase64)
|
||||
}
|
||||
var endpointIP net.IP
|
||||
hostA, ok := r.Answer[0].(*dns.A)
|
||||
hostA, ok := r.Extra[0].(*dns.A)
|
||||
if !ok {
|
||||
hostAAAA, ok := r.Answer[0].(*dns.AAAA)
|
||||
hostAAAA, ok := r.Extra[0].(*dns.AAAA)
|
||||
if !ok {
|
||||
log.Printf(
|
||||
"[%s] non-A/AAAA extra in SRV response: %s",
|
||||
pubKeyBase64, r.Extra[0].Header())
|
||||
pubKeyBase64, r.Extra[0].String())
|
||||
continue
|
||||
}
|
||||
endpointIP = hostAAAA.AAAA
|
||||
|
2
go.sum
2
go.sum
@ -244,9 +244,11 @@ github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp
|
||||
github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/mdlayher/genetlink v1.0.0 h1:OoHN1OdyEIkScEmRgxLEe2M9U8ClMytqA5niynLtfj0=
|
||||
github.com/mdlayher/genetlink v1.0.0/go.mod h1:0rJ0h4itni50A86M2kHcgS85ttZazNt7a8H2a2cw0Gc=
|
||||
github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA=
|
||||
github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M=
|
||||
github.com/mdlayher/netlink v1.1.0 h1:mpdLgm+brq10nI9zM1BpX1kpDbh3NLl3RSnVq6ZSkfg=
|
||||
github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY=
|
||||
github.com/mholt/certmagic v0.8.3/go.mod h1:91uJzK5K8IWtYQqTi5R2tsxV1pCde+wdGfaRaOZi6aQ=
|
||||
github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
|
Loading…
x
Reference in New Issue
Block a user