]> granicus.if.org Git - pdns/commitdiff
Merge branch 'master' into rec-outgoing-timeouts
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 3 Jul 2019 13:48:40 +0000 (15:48 +0200)
committerGitHub <noreply@github.com>
Wed, 3 Jul 2019 13:48:40 +0000 (15:48 +0200)
1  2 
pdns/dnsmessage.proto
pdns/protobuf.cc
pdns/protobuf.hh
regression-tests.recursor-dnssec/test_Protobuf.py

Simple merge
Simple merge
Simple merge
index 14497a53c5458ac4ecb0b9742ac1e502a57de535,ba01456faed59da4c6fbac06b88318c1a6cc6ce4..5aa77ed7e08eed6cc52869edee6d8876c12207eb
@@@ -218,17 -215,20 +218,25 @@@ class TestRecursorProtobuf(RecursorTest
          self.assertTrue(msg.question.HasField('qName'))
          self.assertEquals(msg.question.qName, qname)
  
 -    def checkProtobufIncomingResponse(self, msg, protocol, response, initiator='127.0.0.1'):
 +    def checkProtobufIncomingResponse(self, msg, protocol, response, initiator='127.0.0.1', length=None):
          self.assertEquals(msg.type, dnsmessage_pb2.PBDNSMessage.DNSIncomingResponseType)
 -        self.checkOutgoingProtobufBase(msg, protocol, response, initiator)
 +        self.checkOutgoingProtobufBase(msg, protocol, response, initiator, length=length)
          self.assertTrue(msg.HasField('response'))
 +        self.assertTrue(msg.response.HasField('rcode'))
          self.assertTrue(msg.response.HasField('queryTimeSec'))
  
 +    def checkProtobufIncomingNetworkErrorResponse(self, msg, protocol, response, initiator='127.0.0.1'):
 +        self.checkProtobufIncomingResponse(msg, protocol, response, initiator, length=0)
 +        self.assertEquals(msg.response.rcode, 65536)
 +
+     def checkProtobufIdentity(self, msg, requestorId, deviceId, deviceName):
+         self.assertTrue(msg.HasField('requestorId'))
+         self.assertTrue(msg.HasField('deviceId'))
+         self.assertTrue(msg.HasField('deviceName'))
+         self.assertEquals(msg.requestorId, requestorId)
+         self.assertEquals(msg.deviceId, deviceId)
+         self.assertEquals(msg.deviceName, deviceName)
      @classmethod
      def setUpClass(cls):