Add 127.0.0.1 -> ::1 conversion for IPv4-addressed IPv6 sockets
git-svn-id: file:///home/svn/framework3/trunk@6072 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
7a8cf33fc8
commit
754c1c5711
|
@ -91,6 +91,8 @@ class Rex::Socket::Comm::Local
|
|||
if (local and local.length == 4)
|
||||
if (local == "\x00\x00\x00\x00")
|
||||
param.localhost = '::'
|
||||
elsif (local == "\x7f\x00\x00\x01")
|
||||
param.localhost = '::1'
|
||||
else
|
||||
param.localhost = '::ffff:' + Rex::Socket.getaddress(param.localhost)
|
||||
end
|
||||
|
@ -99,6 +101,8 @@ class Rex::Socket::Comm::Local
|
|||
if (peer and peer.length == 4)
|
||||
if (peer == "\x00\x00\x00\x00")
|
||||
param.peerhost = '::'
|
||||
elsif (peer == "\x7f\x00\x00\x01")
|
||||
param.peerhost = '::1'
|
||||
else
|
||||
param.peerhost = '::ffff:' + Rex::Socket.getaddress(param.peerhost)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue