From 6bbb2e99057cf310a0c42d931d9a26deebcf1b8d Mon Sep 17 00:00:00 2001 From: Sven Luethi Date: Thu, 29 Jan 2026 11:11:49 +0100 Subject: [PATCH] modified: src/netbox_plugin_bind_provisioner/management/commands/bind-transfer-endpoint.py Catches a further exception if the wrong algorithm is specified for the tsig key used. --- .../management/commands/bind-transfer-endpoint.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/netbox_plugin_bind_provisioner/management/commands/bind-transfer-endpoint.py b/src/netbox_plugin_bind_provisioner/management/commands/bind-transfer-endpoint.py index ced659a..d8775d2 100644 --- a/src/netbox_plugin_bind_provisioner/management/commands/bind-transfer-endpoint.py +++ b/src/netbox_plugin_bind_provisioner/management/commands/bind-transfer-endpoint.py @@ -457,8 +457,9 @@ class TCPRequestHandler(DNSBaseRequestHandler): ) self.denyRequestBadTSIG(wire, dns.rcode.BADSIG) return - # If TSIG Key used is not in our list, refuse query: - except dns.message.UnknownTSIGKey as e: + # If TSIG Key used is unknown to us or secret does not match + # the selected key, refuse query: + except (dns.message.UnknownTSIGKey, dns.tsig.BadAlgorithm) as e: logger.warning(f"Request denied from {peer} with bad TSIG key: {e}") self.denyRequestBadTSIG(wire, dns.rcode.BADKEY) return