consistency fixes
git-svn-id: file:///home/svn/framework3/trunk@5596 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
bb1db8253a
commit
c6930f79f1
|
@ -39,11 +39,8 @@ class Rex::Socket::Comm::Local
|
|||
# Special-cased because of how different it is from UDP/TCP
|
||||
#
|
||||
def self.create_ip(param)
|
||||
sock = ::Socket.open(::Socket::AF_INET, ::Socket::SOCK_RAW, ::Socket::IPPROTO_RAW)
|
||||
|
||||
unless sock.getsockopt(::Socket::IPPROTO_IP, ::Socket::IP_HDRINCL)
|
||||
sock.setsockopt(::Socket::IPPROTO_IP, ::Socket::IP_HDRINCL, true)
|
||||
end
|
||||
sock = ::Socket.open(::Socket::PF_INET, ::Socket::SOCK_RAW, ::Socket::IPPROTO_RAW)
|
||||
sock.setsockopt(::Socket::IPPROTO_IP, ::Socket::IP_HDRINCL, 1)
|
||||
|
||||
return sock if (param.bare?)
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ module Rex::Socket::Ip
|
|||
# Sends a datagram to the supplied host:port with optional flags.
|
||||
#
|
||||
def sendto(gram, peerhost, flags = 0)
|
||||
dest = ::Socket.pack_sockaddr_in(1024, peerhost)
|
||||
dest = ::Socket.pack_sockaddr_in(0, peerhost)
|
||||
send(gram, flags, dest)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue