Skip to content
Snippets Groups Projects
Commit 838db626 authored by Sulverus's avatar Sulverus
Browse files

box/bsdsocket.test.lua fix for ipv6

parent 0e4720b9
No related branches found
No related tags found
No related merge requests found
......@@ -590,18 +590,20 @@ os.remove('/tmp/tarantool-test-socket')
- true
...
--# setopt delimiter ';'
function aexitst(ai, host, port)
function aexitst(ai, hostnames, port)
for i, a in pairs(ai) do
if a.host == host and a.port == port then
return true
for j, host in pairs(hostnames) do
if a.host == host and a.port == port then
return true
end
end
end
return ai
return ai
end;
---
...
aexitst( socket.getaddrinfo('localhost', 'http', { protocol = 'tcp',
type = 'SOCK_STREAM'}), '127.0.0.1', 80 );
type = 'SOCK_STREAM'}), {'127.0.0.1', '::1'}, 80 );
---
- true
...
......
......@@ -184,17 +184,20 @@ s:close()
os.remove('/tmp/tarantool-test-socket')
--# setopt delimiter ';'
function aexitst(ai, host, port)
function aexitst(ai, hostnames, port)
for i, a in pairs(ai) do
if a.host == host and a.port == port then
return true
for j, host in pairs(hostnames) do
if a.host == host and a.port == port then
return true
end
end
end
return ai
return ai
end;
aexitst( socket.getaddrinfo('localhost', 'http', { protocol = 'tcp',
type = 'SOCK_STREAM'}), '127.0.0.1', 80 );
type = 'SOCK_STREAM'}), {'127.0.0.1', '::1'}, 80 );
--# setopt delimiter ''
#(socket.getaddrinfo('tarantool.org', 'http', {})) > 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment