fix: dont refuse ixfr and soa queries
This commit is contained in:
parent
6c27d799e3
commit
625088abcf
3 changed files with 18 additions and 3 deletions
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -1,5 +1,18 @@
|
||||||
# EasyWKS Changelog
|
# EasyWKS Changelog
|
||||||
|
|
||||||
|
<!-- BEGIN RELEASE v0.4.1 -->
|
||||||
|
## Version 0.4.1
|
||||||
|
|
||||||
|
Bugfix release
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
<!-- BEGIN CHANGES 0.4.1 -->
|
||||||
|
- Don't refuse DNS IXFRs and respond with full AXFR
|
||||||
|
<!-- END CHANGES 0.4.1-->
|
||||||
|
|
||||||
|
<!-- END RELEASE v0.4.1 -->
|
||||||
|
|
||||||
<!-- BEGIN RELEASE v0.4.0 -->
|
<!-- BEGIN RELEASE v0.4.0 -->
|
||||||
## Version 0.4.0
|
## Version 0.4.0
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
|
|
||||||
__version__ = '0.4.0'
|
__version__ = '0.4.1'
|
||||||
|
|
|
@ -62,10 +62,12 @@ class DnsServer(common.ResolverBase):
|
||||||
]
|
]
|
||||||
|
|
||||||
def _lookup(self, name, cls, type, timeout):
|
def _lookup(self, name, cls, type, timeout):
|
||||||
if type != dns.AXFR:
|
|
||||||
return defer.fail(failure.Failure(error.DNSQueryRefusedError(name)))
|
|
||||||
if name not in self.zones:
|
if name not in self.zones:
|
||||||
return defer.fail(failure.Failure(dns.AuthoritativeDomainError(name)))
|
return defer.fail(failure.Failure(dns.AuthoritativeDomainError(name)))
|
||||||
|
if type == dns.SOA or type == dns.OPT:
|
||||||
|
return defer.succeed(([self._make_soa(name)], [], []))
|
||||||
|
if type != dns.AXFR and type != dns.IXFR:
|
||||||
|
return defer.fail(failure.Failure(error.DNSQueryRefusedError(name)))
|
||||||
domain = self.zones[name]
|
domain = self.zones[name]
|
||||||
results = []
|
results = []
|
||||||
soa = self._make_soa(name)
|
soa = self._make_soa(name)
|
||||||
|
|
Loading…
Reference in a new issue