diff options
author | iedowse <iedowse@FreeBSD.org> | 2002-10-24 02:02:34 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2002-10-24 02:02:34 +0000 |
commit | 3c561c395a62e36ec1795294a3c689e9f2d01da3 (patch) | |
tree | f1afe29c68f4d9a3c87f21700f56887304a97253 /lib/libc/stdio/stdio.c | |
parent | ee9cea37f2fc1310dffbf4a97ffe1301cef45c1a (diff) | |
download | FreeBSD-src-3c561c395a62e36ec1795294a3c689e9f2d01da3.zip FreeBSD-src-3c561c395a62e36ec1795294a3c689e9f2d01da3.tar.gz |
Unbreak the automatic remapping of an INADDR_ANY destination address
to the primary local IP address when doing a TCP connect(). The
tcp_connect() code was relying on in_pcbconnect (actually in_pcbladdr)
modifying the passed-in sockaddr, and I failed to notice this in
the recent change that added in_pcbconnect_setup(). As a result,
tcp_connect() was ending up using the unmodified sockaddr address
instead of the munged version.
There are two cases to handle: if in_pcbconnect_setup() succeeds,
then the PCB has already been updated with the correct destination
address as we pass it pointers to inp_faddr and inp_fport directly.
If in_pcbconnect_setup() fails due to an existing but dead connection,
then copy the destination address from the old connection.
Diffstat (limited to 'lib/libc/stdio/stdio.c')
0 files changed, 0 insertions, 0 deletions