daemon=no
trace=yes
dont-query=
-ecs-add-for=0.0.0.0/0
local-address=127.0.0.1
-packetcache-ttl=0
-packetcache-servfail-ttl=0
+packetcache-ttl=15
+packetcache-servfail-ttl=15
max-cache-ttl=600
-threads=1
+threads=2
loglevel=9
disable-syslog=yes
+log-common-errors=yes
+statistics-interval=0
+ecs-add-for=0.0.0.0/0
"""
def sendECSQuery(self, query, expected, expectedFirstTTL=None):
_confdir = 'RoutingTag'
_config_template = """
-log-common-errors=yes
use-incoming-edns-subnet=yes
-edns-subnet-whitelist=ecs-echo.example.
+edns-subnet-allow-list=ecs-echo.example.
forward-zones=ecs-echo.example=%s.24
""" % (os.environ['PREFIX'])
_lua_dns_script_file = """
query = dns.message.make_query(nameECS, 'TXT', 'IN', use_edns=True, options=[ecso], payload=512)
self.sendECSQuery(query, expected1)
- # Now check a cache hit withg the same routingTag (but no ECS)
+ # Now check a cache hit with the same routingTag (but no ECS)
query = dns.message.make_query(nameECS, 'TXT', 'IN')
self.checkECSQueryHit(query, expected1)
query = dns.message.make_query(nameECS, 'TXT', 'IN')
self.sendECSQuery(query, expected2)
- # And see if a *no* tag does *not* hit the firts one
+ # And see if a *no* tag does *not* hit the first one
expected3 = dns.rrset.from_text(nameECS, ttlECS, dns.rdataclass.IN, 'TXT', '192.0.3.0/24')
self.setRoutingTag(None)
ecso = clientsubnetoption.ClientSubnetOption('192.0.3.1', 32)
query = dns.message.make_query(nameECS, 'TXT', 'IN')
self.sendECSQuery(query, expected2)
- #return # remove this line to peek at cache
+ return # remove this line to peek at cache
rec_controlCmd = [os.environ['RECCONTROL'],
'--config-dir=%s' % 'configs/' + self._confdir,
- 'dump-cache x']
+ 'dump-cache', 'x']
try:
- expected = 'dumped 6 records\n'
+ expected = b'dumped 7 records\n'
ret = subprocess.check_output(rec_controlCmd, stderr=subprocess.STDOUT)
self.assertEqual(ret, expected)
_confdir = 'RoutingTagFFI'
_config_template = """
-log-common-errors=yes
use-incoming-edns-subnet=yes
-edns-subnet-whitelist=ecs-echo.example.
+edns-subnet-allow-list=ecs-echo.example.
forward-zones=ecs-echo.example=%s.24
""" % (os.environ['PREFIX'])
_lua_dns_script_file = """
query = dns.message.make_query(nameECS, 'TXT', 'IN', use_edns=True, options=[ecso], payload=512)
self.sendECSQuery(query, expected1)
- # Now check a cache hit withg the same routingTag (but no ECS)
+ # Now check a cache hit with the same routingTag (but no ECS)
query = dns.message.make_query(nameECS, 'TXT', 'IN')
self.checkECSQueryHit(query, expected1)
query = dns.message.make_query(nameECS, 'TXT', 'IN')
self.sendECSQuery(query, expected2)
- # And see if a *no* tag does *not* hit the firts one
+ # And see if a *no* tag does *not* hit the first one
expected3 = dns.rrset.from_text(nameECS, ttlECS, dns.rdataclass.IN, 'TXT', '192.0.3.0/24')
self.setRoutingTag(None)
ecso = clientsubnetoption.ClientSubnetOption('192.0.3.1', 32)
response.additional.append(additional)
if ecso:
- response.options = [ecso]
+ response.use_edns(options = [ecso])
self.transport.write(response.to_wire(), address)