Dont use ipv6 sockets for unconnected udp on freebsd
git-svn-id: file:///home/svn/framework3/trunk@5278 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
7123cce773
commit
df67cb42f9
|
@ -30,6 +30,11 @@ def self.is_linux
|
|||
(RUBY_PLATFORM =~ /linux/) ? true : false
|
||||
end
|
||||
|
||||
|
||||
def self.is_freebsd
|
||||
(RUBY_PLATFORM =~ /freebsd/) ? true : false
|
||||
end
|
||||
|
||||
def self.open_browser(url='http://metasploit.com/')
|
||||
case RUBY_PLATFORM
|
||||
when /mswin32/
|
||||
|
|
|
@ -48,8 +48,12 @@ class Rex::Socket::Comm::Local
|
|||
|
||||
# Force IPv6 mode for non-connected UDP sockets
|
||||
if (type == ::Socket::SOCK_DGRAM and not param.peerhost)
|
||||
# FreeBSD allows IPv6 socket creation, but throws an error on sendto()
|
||||
|
||||
if (not Rex::Compat.is_freebsd())
|
||||
usev6 = true
|
||||
end
|
||||
end
|
||||
|
||||
local = Rex::Socket.resolv_nbo(param.localhost) if param.localhost
|
||||
peer = Rex::Socket.resolv_nbo(param.peerhost) if param.peerhost
|
||||
|
|
Loading…
Reference in New Issue