One more fix for IPv6 support, this should fix things up for OS X

git-svn-id: file:///home/svn/framework3/trunk@4827 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2007-05-01 04:50:16 +00:00
parent a36a740cf0
commit 664363d7bd
1 changed files with 10 additions and 2 deletions

View File

@ -64,11 +64,19 @@ class Rex::Socket::Comm::Local
if (usev6)
if (local and local.length == 4)
param.localhost = '::ffff:' + Rex::Socket.getaddress(param.localhost)
if (local == "\x00\x00\x00\x00")
param.localhost = '::'
else
param.localhost = '::ffff:' + Rex::Socket.getaddress(param.localhost)
end
end
if (peer and peer.length == 4)
param.peerhost = '::ffff:' + Rex::Socket.getaddress(param.peerhost)
if (peer == "\x00\x00\x00\x00")
param.peerhost = '::'
else
param.peerhost = '::ffff:' + Rex::Socket.getaddress(param.peerhost)
end
end
param.v6 = true