diff options
author | shin <shin@FreeBSD.org> | 2000-02-15 15:11:40 +0000 |
---|---|---|
committer | shin <shin@FreeBSD.org> | 2000-02-15 15:11:40 +0000 |
commit | c83f0a97bdc03cca93e16e1bc2758c713aef5fdf (patch) | |
tree | 04189aeeb90e88a6a240f49392fa61d89316107a /usr.bin/ftp/ftp.c | |
parent | 6768336e3b66310544efe8dbe769fdda673c93f8 (diff) | |
download | FreeBSD-src-c83f0a97bdc03cca93e16e1bc2758c713aef5fdf.zip FreeBSD-src-c83f0a97bdc03cca93e16e1bc2758c713aef5fdf.tar.gz |
Add -4 and -6 options.
Current getaddrinfo() implemetation has a problem of too much resolving
waiting time on INET6 enabled systems.
-4 and -6 options can limit name resolving address family and is a possible
workaround for the problem.
Approved by: jkh
Diffstat (limited to 'usr.bin/ftp/ftp.c')
-rw-r--r-- | usr.bin/ftp/ftp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/ftp/ftp.c b/usr.bin/ftp/ftp.c index c31cb94..cfdfda8 100644 --- a/usr.bin/ftp/ftp.c +++ b/usr.bin/ftp/ftp.c @@ -121,7 +121,7 @@ hookup(host0, port) host = hostnamebuf; memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; - hints.ai_family = AF_UNSPEC; + hints.ai_family = family; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = 0; error = getaddrinfo(host, port, &hints, &res0); |