Re: Undefined behaviour of connect(fd, NULL, 0);

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Changli Gao
Date: Monday, April 5, 2010 - 2:23 am

On Thu, Apr 1, 2010 at 3:23 PM, David Miller <davem@davemloft.net> wrote:

I found this from the man page of FreeBSD's connect(2).

     Generally, stream sockets may successfully connect() only
     once; datagram sockets may use connect() multiple times to change their
     association.  Datagram sockets may dissolve the association by connecting
     to an invalid address, such as a null address.

And this from the man page of Darwin's connect(2).

     Datagram sockets may dissolve the association by connecting to an
     invalid address, such as a null address or an address with the address
     family set to AF_UNSPEC (the error EAFNOSUPPORT will be harmlessly
     returned).

Since null address behavior has been defined by the others. I think
Linux should be compatible with the others. So the  patch submitted on
this by me should not been applied. I'll work out another patch later.

-- 
Regards,
Changli Gao(xiaosuo@gmail.com)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Undefined behaviour of connect(fd, NULL, 0);, Neil Brown, (Wed Mar 31, 4:36 am)
Re: Undefined behaviour of connect(fd, NULL, 0);, Stephen Hemminger, (Wed Mar 31, 11:49 am)
Re: Undefined behaviour of connect(fd, NULL, 0);, Neil Brown, (Wed Mar 31, 1:24 pm)
Re: Undefined behaviour of connect(fd, NULL, 0);, Stephen Hemminger, (Wed Mar 31, 2:14 pm)
Re: Undefined behaviour of connect(fd, NULL, 0);, David Miller, (Wed Mar 31, 2:17 pm)
Re: Undefined behaviour of connect(fd, NULL, 0);, Neil Brown, (Wed Mar 31, 3:07 pm)
Re: Undefined behaviour of connect(fd, NULL, 0);, Changli Gao, (Wed Mar 31, 8:00 pm)
Re: Undefined behaviour of connect(fd, NULL, 0);, Neil Brown, (Wed Mar 31, 8:38 pm)
Re: Undefined behaviour of connect(fd, NULL, 0);, Changli Gao, (Wed Mar 31, 9:16 pm)
Re: Undefined behaviour of connect(fd, NULL, 0);, Changli Gao, (Wed Mar 31, 10:50 pm)
Re: Undefined behaviour of connect(fd, NULL, 0);, David Miller, (Thu Apr 1, 12:23 am)
Re: Undefined behaviour of connect(fd, NULL, 0);, Changli Gao, (Mon Apr 5, 2:23 am)
Re: Undefined behaviour of connect(fd, NULL, 0);, Eric Dumazet, (Mon Apr 5, 8:56 am)
Re: Undefined behaviour of connect(fd, NULL, 0);, Andreas Schwab, (Mon Apr 5, 9:25 am)
Re: Undefined behaviour of connect(fd, NULL, 0);, David Miller, (Mon Apr 5, 12:25 pm)