update_ns: catch UnknownTSIGKey exception
This commit is contained in:
parent
fdc63a20a9
commit
480dbd358c
@ -315,6 +315,10 @@ def update_ns(fqdn, rdtype='A', ipaddr=None, origin=None, action='upd', ttl=60):
|
|||||||
logger.error("PeerBadSignature - shared secret mismatch? zone: %s" % (origin, ))
|
logger.error("PeerBadSignature - shared secret mismatch? zone: %s" % (origin, ))
|
||||||
set_ns_availability(domain, False)
|
set_ns_availability(domain, False)
|
||||||
raise DnsUpdateError("PeerBadSignature")
|
raise DnsUpdateError("PeerBadSignature")
|
||||||
|
except dns.message.UnknownTSIGKey as e:
|
||||||
|
logger.error("UnknownTSIGKey [%s] - zone: %s" % (str(e), origin, ))
|
||||||
|
set_ns_availability(domain, False)
|
||||||
|
raise DnsUpdateError("UnknownTSIGKey")
|
||||||
|
|
||||||
|
|
||||||
def set_ns_availability(domain, available):
|
def set_ns_availability(domain, available):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user