Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Osuchowski
Kea
Commits
5471e816
Commit
5471e816
authored
Jul 15, 2011
by
Michal 'vorner' Vaner
Browse files
[trac772] More review comments
parent
f551799e
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/bin/xfrout/tests/xfrout_test.py.in
View file @
5471e816
...
...
@@ -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.
REJEC
T, self.unix._acl.execute(context))
self.assertEqual(isc.acl.acl.
ACCEP
T, self.unix._acl.execute(context))
def check_loaded_ACL(self):
context = isc.acl.dns.RequestContext(socket.getaddrinfo("127.0.0.1",
...
...
src/bin/xfrout/xfrout.py.in
View file @
5471e816
...
...
@@ -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'''
...
...
src/bin/xfrout/xfrout.spec.pre.in
View file @
5471e816
...
...
@@ -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",
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment