From 11c2db2aa2a8ce5f3c151d6075066283e65bfd85 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 25 Mar 2011 16:00:41 +0100 Subject: fix: re-use of bound connections When asked to bind the local end of a connection when doing a request, the code will now disqualify other existing connections from re-use even if they are connected to the correct remote host. This will also affect which connections that can be used for pipelining, so that only connections that aren't bound or bound to the same device/port you're asking for will be considered. --- lib/urldata.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/urldata.h') diff --git a/lib/urldata.h b/lib/urldata.h index 7588cedc5..d1718a9a4 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -936,6 +936,16 @@ struct connectdata { long verifypeer; long verifyhost; + + /* When this connection is created, store the conditions for the local end + bind. This is stored before the actual bind and before any connection is + made and will serve the purpose of being used for comparison reasons so + that subsequent bound-requested connections aren't accidentally re-using + wrong connections. */ + char *localdev; + unsigned short localport; + int localportrange; + }; /* The end of connectdata. */ -- cgit v1.2.3