From: David Miller <davem@davemloft.net>
To: xiaosuo@gmail.com
Cc: neilb@suse.de, shemminger@vyatta.com, netdev@vger.kernel.org
Subject: Re: Undefined behaviour of connect(fd, NULL, 0);
Date: Mon, 05 Apr 2010 12:25:54 -0700 (PDT) [thread overview]
Message-ID: <20100405.122554.232915662.davem@davemloft.net> (raw)
In-Reply-To: <w2n412e6f7f1004050223j3e15df91tcdf133670c636a85@mail.gmail.com>
From: Changli Gao <xiaosuo@gmail.com>
Date: Mon, 5 Apr 2010 17:23:50 +0800
> 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.
Your patch is already applied and pushed out to the world.
Any corrections would need to be made relative to that.
But I think no changes should be made, and it doesn't matter
at all what some manual page says on another system.
It doesn't matter one iota what those paragraphs say, we've had the
existing behavior for FIFTEEN YEARS. So, like I said last time, any
application coding to this behavior of the zero length sockaddr doing
anything on connect() will NOT WORK ON ANY KERNEL.
So supporting it has absolutely zero value, for us and for app
developers.
prev parent reply other threads:[~2010-04-05 19:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-31 11:36 Undefined behaviour of connect(fd, NULL, 0); Neil Brown
2010-03-31 18:49 ` Stephen Hemminger
2010-03-31 20:24 ` Neil Brown
2010-03-31 21:14 ` Stephen Hemminger
2010-03-31 21:17 ` David Miller
2010-03-31 22:07 ` Neil Brown
2010-04-01 3:00 ` Changli Gao
2010-04-01 3:38 ` Neil Brown
2010-04-01 4:16 ` Changli Gao
2010-04-01 5:50 ` Changli Gao
2010-04-01 7:23 ` David Miller
2010-04-05 9:23 ` Changli Gao
2010-04-05 15:56 ` Eric Dumazet
2010-04-05 16:25 ` Andreas Schwab
2010-04-05 19:25 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100405.122554.232915662.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=neilb@suse.de \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
--cc=xiaosuo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).