summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2011-12-09 01:14:35 +0100
committerKai Blin <kai@samba.org>2011-12-09 01:59:28 +0100
commit358a81eff5279a69270964226b553fb5243ecb84 (patch)
tree61284ae3651051a8d0d5ea9bd658b7bb8c1b4b6e /source4
parent509acc71dd8534539021b0ec57dd83a841119793 (diff)
downloadsamba-358a81eff5279a69270964226b553fb5243ecb84.tar.gz
samba-358a81eff5279a69270964226b553fb5243ecb84.tar.bz2
samba-358a81eff5279a69270964226b553fb5243ecb84.zip
s4 dns: Add test to prove two updates in one packet are a FORMERR
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/tests/dns.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/tests/dns.py b/source4/scripting/python/samba/tests/dns.py
index 9f5322578b..c95148b70e 100644
--- a/source4/scripting/python/samba/tests/dns.py
+++ b/source4/scripting/python/samba/tests/dns.py
@@ -187,6 +187,24 @@ class DNSTest(TestCase):
self.assert_dns_opcode_equals(response, dns.DNS_OPCODE_QUERY)
self.assertEquals(response.ancount, 1)
+ def test_two_updates(self):
+ "create two update requests"
+ p = self.make_name_packet(dns.DNS_OPCODE_UPDATE)
+ updates = []
+
+ name = "%s.%s" % (os.getenv('DC_SERVER'), self.get_dns_domain())
+ u = self.make_name_question(name, dns.DNS_QTYPE_A, dns.DNS_QCLASS_IN)
+ updates.append(u)
+
+ name = self.get_dns_domain()
+ u = self.make_name_question(name, dns.DNS_QTYPE_A, dns.DNS_QCLASS_IN)
+ updates.append(u)
+
+ self.finish_name_packet(p, updates)
+ response = self.dns_transaction_udp(p)
+ self.assert_dns_rcode_equals(response, dns.DNS_RCODE_FORMERR)
+
+
if __name__ == "__main__":
import unittest
unittest.main()