summaryrefslogtreecommitdiff
path: root/lib/ftp.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-01-08 18:30:01 +0100
committerDaniel Stenberg <daniel@haxx.se>2015-01-08 22:32:37 +0100
commit9a452ba3a16bb51249e1d1be5a5b6e47a255c064 (patch)
tree6b029536d4f6b746650a700b4276dc7c25f2f6ff /lib/ftp.h
parent659d252b6f646cc51eb2caae710183330b34a717 (diff)
downloadcurl-9a452ba3a16bb51249e1d1be5a5b6e47a255c064.tar.gz
FTP: fix IPv6 host using link-local address
... and make sure we can connect the data connection to a host name that is longer than 48 bytes. Also simplifies the code somewhat by re-using the original host name more, as it is likely still in the DNS cache. Original-Patch-by: Vojtěch Král Bug: http://curl.haxx.se/bug/view.cgi?id=1468
Diffstat (limited to 'lib/ftp.h')
-rw-r--r--lib/ftp.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/ftp.h b/lib/ftp.h
index b6bfc0287..833447bcb 100644
--- a/lib/ftp.h
+++ b/lib/ftp.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -147,11 +147,10 @@ struct ftp_conn {
curl_off_t known_filesize; /* file size is different from -1, if wildcard
LIST parsing was done and wc_statemach set
it */
- /* newhost must be able to hold a full IP-style address in ASCII, which
- in the IPv6 case means 5*8-1 = 39 letters */
-#define NEWHOST_BUFSIZE 48
- char newhost[NEWHOST_BUFSIZE]; /* this is the pair to connect the DATA... */
- unsigned short newport; /* connection to */
+ /* newhost is the (allocated) IP addr or host name to connect the data
+ connection to */
+ char *newhost; /* this is the pair to connect the DATA... */
+ unsigned short newport; /* connection to */
};