talkd

David S. Miller davem en redhat.com
Lun Ene 31 06:11:47 CST 2000


   From: Mateus Cordeiro Inssa <mateus en ifnet.com.br>
   Date:   Sun, 30 Jan 2000 00:40:40 -0200 (BRDT)

     I saw this messages too and what I discovered was:

   1) Create an udp socket and bind it to a port and INADDR_ANY
   2) Send a mensage to this socket from localhost
   3) The first recvfrom returns the sockaddr with address (IP) equal 0
   (not 127.0.0.1 or ethernet address) and replying to this request with
   this sockaddr causes that printk .
   4) Next recvfrom returns sockaddr right.

In #3 an error was returned, and when an error occurs the contents
of the sockaddr you pass in is undefined on returned.  This should
be the only way you could see the behavior you describe.

The IP address being zero supports this fact.

So the code in question should have checked the error return
from the recvmsg call at #3.  I bet this application puts
the socket in non-blocking mode too.

Later,
David S. Miller
davem en redhat.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



Más información sobre la lista de distribución Ayuda