[#3006] CVS repository — "Eugene Scripnik" <hoaz@...>

Hello.

21 messages 2004/06/16
[#3008] Re: CVS repository — ts <decoux@...> 2004/06/16

>>>>> "E" == Eugene Scripnik <hoaz@gala.net> writes:

[#3009] Re: CVS repository — Michal Rokos <michal@...> 2004/06/16

Hi!

[#3057] Ruby 1.8.2 to be released. — matz@... (Yukihiro Matsumoto)

Hi,

20 messages 2004/06/23

Re: I think I found the recvfrom problem!!

From: matz@... (Yukihiro Matsumoto)
Date: 2004-06-22 23:41:14 UTC
List: ruby-core #3044
Hi,

In message "I think I found the recvfrom problem!!"
    on 04/06/23, Dave Thomas <dave@pragprog.com> writes:

|I think there's a bug in socket.c's recvfrom implementation.

First of all, patch seems OK.  Please commit.

|However... the man page for recvfrom on a BSD box says (among other 
|things)
|
|      If from is non-nil, and the socket is not connection-oriented, the source
|      address of the message is filled in.  Fromlen is a value-result parame-
|      ter, initialized to the size of the buffer associated with from, and mod-
|      ified on return to indicate the actual size of the address stored there.

Linux man says:

       The recvfrom and recvmsg calls are used to receive messages
       from a socket, and may be used to receive data on a socket
       whether or not it is connection-oriented.
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       If from is not NULL, and the underlying protocol provides the
       source address, this source address is filled in.  The argument
       fromlen is a value-result parameter, initialized to the size of
       the buffer associated with from, and modified on return to
       indicate the actual size of the address stored there.

According to this description, TCP socket (that must know their source
address) should give us the peer address even for non connection
oriented sockets.  I feel like it's a bug in BSD socket layer.  Does
anyone know if it's an unspecified behavior in POSIX socket
definition, that can be vary between platforms, or a bug in either
platform?

							matz.

In This Thread