Changeset 6072

Show
Ignore:
Timestamp:
01/04/09 10:42:55 (6 months ago)
Author:
kris
Message:

Add 127.0.0.1 -> ::1 conversion for IPv4-addressed IPv6 sockets

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • framework3/trunk/lib/rex/socket/comm/local.rb

    r6023 r6072  
    9292                                        if (local == "\x00\x00\x00\x00") 
    9393                                                param.localhost = '::' 
     94                                        elsif (local == "\x7f\x00\x00\x01") 
     95                                                param.localhost = '::1' 
    9496                                        else 
    9597                                                param.localhost = '::ffff:' + Rex::Socket.getaddress(param.localhost) 
     
    100102                                        if (peer == "\x00\x00\x00\x00") 
    101103                                                param.peerhost = '::' 
     104                                        elsif (peer == "\x7f\x00\x00\x01") 
     105                                                param.peerhost = '::1' 
    102106                                        else 
    103107                                                param.peerhost = '::ffff:' + Rex::Socket.getaddress(param.peerhost)