Date: Wed, 23 Oct 2002 19:02:34 -0700 (PDT) From: Ian Dowse <iedowse@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/netinet tcp_usrreq.c Message-ID: <200210240202.g9O22YCI054156@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
iedowse 2002/10/23 19:02:34 PDT Modified files: sys/netinet tcp_usrreq.c Log: 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. Revision Changes Path 1.84 +4 -5 src/sys/netinet/tcp_usrreq.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210240202.g9O22YCI054156>