summaryrefslogtreecommitdiff
path: root/lib/connect.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-10-04 10:01:41 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-10-04 10:01:41 +0000
commit67d94514b0d1501832a52fd42db8f5a41151d7f5 (patch)
treeb1c4f029b0c92dd4579ed33e3dcd71f8a74bbadf /lib/connect.c
parent91b38857ef9ab1f345f0c8914ef3feec803f8752 (diff)
downloadcurl-67d94514b0d1501832a52fd42db8f5a41151d7f5.tar.gz
Kim Rinnewitz reported that --local-port didn't work with TFTP transfers.
This happened because the tftp code always uncondionally did a bind() without caring if one already had been done and then it failed. I wrote a test case (1009) to verify this, but it is a bit error-prone since it will have to pick a fixed local port number and since the tests are run on so many different hosts in different situations I add it in disabled state.
Diffstat (limited to 'lib/connect.c')
-rw-r--r--lib/connect.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/connect.c b/lib/connect.c
index d386a1bc5..918602c2d 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -380,6 +380,7 @@ static CURLcode bindlocal(struct connectdata *conn,
port = ntohs(((struct sockaddr_in6 *)&add)->sin6_port);
#endif
infof(data, "Local port: %d\n", port);
+ conn->bits.bound = TRUE;
return CURLE_OK;
}
if(--portnum > 0) {