Commit 5471e816 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[trac772] More review comments

parent f551799e
......@@ -559,6 +559,12 @@ class TestUnixSockServer(unittest.TestCase):
sock.connect(('::1', 12345))
self.assertEqual(('::1', 12345, 0, 0),
self.unix._guess_remote(sock.fileno()))
# Try when pretending there's no IPv6 support
xfrout.socket.has_ipv6 = False
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.connect(('127.0.0.1', 12345))
self.assertEqual(('127.0.0.1', 12345),
self.unix._guess_remote(sock.fileno()))
def test_receive_query_message(self):
send_msg = b"\xd6=\x00\x00\x00\x01\x00"
......@@ -572,7 +578,7 @@ class TestUnixSockServer(unittest.TestCase):
context = isc.acl.dns.RequestContext(socket.getaddrinfo("127.0.0.1",
1234, 0, 0, 0,
socket.AI_NUMERICHOST)[0][4])
self.assertEqual(isc.acl.acl.REJECT, self.unix._acl.execute(context))
self.assertEqual(isc.acl.acl.ACCEPT, self.unix._acl.execute(context))
def check_loaded_ACL(self):
context = isc.acl.dns.RequestContext(socket.getaddrinfo("127.0.0.1",
......
......@@ -400,7 +400,7 @@ class UnixSockServer(socketserver_mixin.NoPollMixIn, ThreadingUnixStreamServer):
def _common_init(self):
self._lock = threading.Lock()
self._transfers_counter = 0
self._acl = REQUEST_LOADER.load("[]")
self._acl = REQUEST_LOADER.load('[{"action": "ACCEPT"}]')
def _receive_query_message(self, sock):
''' receive request message from sock'''
......
......@@ -54,7 +54,7 @@
"item_name": "query_acl",
"item_type": "list",
"item_optional": false,
"item_default": [],
"item_default": [{"action": "ACCEPT"}],
"list_item_spec":
{
"item_name": "acl_element",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment