summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/ftp.c
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2000-07-14 08:33:10 +0000
committerume <ume@FreeBSD.org>2000-07-14 08:33:10 +0000
commit7d6550f6888be671e35c1cf39bafd48a7ebc103d (patch)
treef690bf659f886857937b4c91d0f2e8f2cccbd7bb /usr.sbin/sysinstall/ftp.c
parente0c8d1d42639e253a12dff647ad580908cf27acd (diff)
downloadFreeBSD-src-7d6550f6888be671e35c1cf39bafd48a7ebc103d.zip
FreeBSD-src-7d6550f6888be671e35c1cf39bafd48a7ebc103d.tar.gz
IPv6 support.
IPv6 configuration is only done by rtsol. Does someone really need manual configuration? :-) You can specify IPv6 DNS server as well. We have only one server ftp7.jp.freebsd.org that speaks IPv6 in this time. ftp7.jp speaks IPv4 as well and also listed as Japan #7. Approved by: jkh
Diffstat (limited to 'usr.sbin/sysinstall/ftp.c')
-rw-r--r--usr.sbin/sysinstall/ftp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/sysinstall/ftp.c b/usr.sbin/sysinstall/ftp.c
index b32f80a..9c0deb8 100644
--- a/usr.sbin/sysinstall/ftp.c
+++ b/usr.sbin/sysinstall/ftp.c
@@ -73,7 +73,7 @@ netDown(Device *dev)
Boolean
mediaInitFTP(Device *dev)
{
- int i, code;
+ int i, code, af;
char *cp, *rel, *hostname, *dir;
char *user, *login_name, password[80];
@@ -121,8 +121,9 @@ try:
user = pw ? pw->pw_name : "ftp";
sprintf(password, "%s@%s", user, variable_get(VAR_HOSTNAME));
}
+ af = variable_cmp(VAR_IPV6_ENABLE, "YES") ? AF_INET : AF_UNSPEC;
msgNotify("Logging in to %s@%s..", login_name, hostname);
- if ((OpenConn = ftpLogin(hostname, login_name, password, FtpPort, isDebug(), &code)) == NULL) {
+ if ((OpenConn = ftpLoginAf(hostname, af, login_name, password, FtpPort, isDebug(), &code)) == NULL) {
msgConfirm("Couldn't open FTP connection to %s:\n %s.", hostname, ftpErrString(code));
goto punt;
}
OpenPOWER on IntegriCloud