Maintenance: upgrade to qdm12/dns v1.7.0

- Fix rebinding protection for IPv6 mapped IPv4 networks
- Use netaddr package for DNS blacklisting
This commit is contained in:
Quentin McGaw
2021-05-14 17:54:35 +00:00
parent 0c9bd8aaa0
commit 13e75aaf20
5 changed files with 38 additions and 26 deletions

View File

@@ -335,7 +335,7 @@ func (l *looper) updateFiles(ctx context.Context) (err error) {
settings := l.GetSettings()
l.logger.Info("downloading hostnames and IP block lists")
blockedHostnames, blockedIPs, blockedIPNets, errs := l.blockBuilder.All(
blockedHostnames, blockedIPs, blockedIPPrefixes, errs := l.blockBuilder.All(
ctx, settings.BlacklistBuild)
for _, err := range errs {
l.logger.Warn(err)
@@ -344,7 +344,7 @@ func (l *looper) updateFiles(ctx context.Context) (err error) {
// TODO change to BlockHostnames() when migrating to qdm12/dns v2
settings.Unbound.Blacklist.FqdnHostnames = blockedHostnames
settings.Unbound.Blacklist.IPs = blockedIPs
settings.Unbound.Blacklist.IPNets = blockedIPNets
settings.Unbound.Blacklist.IPPrefixes = blockedIPPrefixes
return l.conf.MakeUnboundConf(settings.Unbound)
}