Messages in this thread | | | Date | Wed, 19 Sep 2007 09:49:09 -0700 | From | Ulrich Drepper <> | Subject | Re: follow-up: discrepancy with POSIX |
| |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Andi Kleen wrote: > The standard way to undo connect is to use AF_UNSPEC. Code to handle > that for dgram sockets is there. It's the same code for v4 and v6.
I quoted the standard and it does not say anything about AF_UNSPEC. So you cannot simply make such broad statements.
I also don't say that this behavior should be removed. It's certainly useful, very much so in fact.
But the spec calls for a "null address" to be used and that's in my understanding something different from using AF_UNSPEC.
I looked through Stevens TCP Illustrated Vol 2 and it seems not to mention resetting the address at all. The POSIX spec certainly got this text from .1g.
I cannot test it on other systems. If somebody has access to some certified systems (and maybe others), write a bit of code which creates a DGRAM socket, connect to one address, call connect with a "null address", then connect to another address (which likely has to use a different interface since otherwise the connect will just succeed, it seems).
- -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFG8VMF2ijCOnn/RHQRAr9NAJwLxyql0kQnMGJNaPZlRGsuB6rGEACgog88 WIWAFhuBWsjps7PdbcoumUQ= =oLxP -----END PGP SIGNATURE----- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |