From b6750f8b28b3cca9e1d220ffef6374df78a6efd5 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Tue, 24 Oct 2023 15:14:50 +0000 Subject: [PATCH] dns/sync: remove redundant suffix check Signed-off-by: Alejandro Mery --- pkg/dns/sync.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pkg/dns/sync.go b/pkg/dns/sync.go index 712022c..8f57cba 100644 --- a/pkg/dns/sync.go +++ b/pkg/dns/sync.go @@ -4,7 +4,6 @@ import ( "context" "net/netip" "sort" - "strings" "time" "darvaza.org/core" @@ -58,7 +57,7 @@ func (mgr *Manager) GetSyncRecords(ctx context.Context) ([]SyncAddrRecord, error } // AsSyncAddr converts a A or AAAA [libdns.Record] into a [SyncAddr] -func (mgr *Manager) AsSyncAddr(rr libdns.Record) (SyncAddr, bool, error) { +func (*Manager) AsSyncAddr(rr libdns.Record) (SyncAddr, bool, error) { var out SyncAddr var addr netip.Addr @@ -67,13 +66,6 @@ func (mgr *Manager) AsSyncAddr(rr libdns.Record) (SyncAddr, bool, error) { return out, false, nil } - // skip entries not containing our suffix - if mgr.suffix != "" { - if !strings.HasSuffix(rr.Name, mgr.suffix) { - return out, false, nil - } - } - err := addr.UnmarshalText([]byte(rr.Value)) if err != nil { // invalid address on A or AAAA record