python-dns/0001-The-TSIG-algorithm-was-being-passed-to-use_tsig-inco.patch

37 lines
1.4 KiB
Diff
Raw Normal View History

From e80c56c6c5c6dd7aa12c439b1f3b664811f65dcb Mon Sep 17 00:00:00 2001
From: Bob Halley <halley@nominum.com>
Date: Wed, 10 Mar 2010 14:22:32 +0000
Subject: [PATCH] The TSIG algorithm was being passed to use_tsig() incorrectly.
---
diff --git a/dns/resolver.py b/dns/resolver.py
index 372d7d8..cd0e5f8 100644
--- a/dns/resolver.py
+++ b/dns/resolver.py
@@ -593,7 +593,8 @@ class Resolver(object):
return answer
request = dns.message.make_query(qname, rdtype, rdclass)
if not self.keyname is None:
- request.use_tsig(self.keyring, self.keyname, self.keyalgorithm)
+ request.use_tsig(self.keyring, self.keyname,
+ algorithm=self.keyalgorithm)
request.use_edns(self.edns, self.ednsflags, self.payload)
response = None
#
diff --git a/dns/update.py b/dns/update.py
index 7d42636..97aea18 100644
--- a/dns/update.py
+++ b/dns/update.py
@@ -56,7 +56,7 @@ class Update(dns.message.Message):
self.find_rrset(self.question, self.origin, rdclass, dns.rdatatype.SOA,
create=True, force_unique=True)
if not keyring is None:
- self.use_tsig(keyring, keyname, keyalgorithm)
+ self.use_tsig(keyring, keyname, algorithm=keyalgorithm)
def _add_rr(self, name, ttl, rd, deleting=None, section=None):
"""Add a single RR to the update section."""
--
1.7.2.1