diff options
author | ru <ru@FreeBSD.org> | 2000-08-16 09:12:33 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2000-08-16 09:12:33 +0000 |
commit | 9406c3f2a35b925b0e7458860d00d22874fc9574 (patch) | |
tree | 5a9825d98755c4064cfe26432b1ae638b92230d5 /libexec/ftpd/ftpd.c | |
parent | a7aa2e6cdb6c5521e4c444686f843a5ec015f6c2 (diff) | |
download | FreeBSD-src-9406c3f2a35b925b0e7458860d00d22874fc9574.zip FreeBSD-src-9406c3f2a35b925b0e7458860d00d22874fc9574.tar.gz |
Fix `control socket: Protocol not supported' failure in
standalone -D mode when neither -4 nor -6 is specified.
Diffstat (limited to 'libexec/ftpd/ftpd.c')
-rw-r--r-- | libexec/ftpd/ftpd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 0471c22..8c09122 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -408,8 +408,6 @@ main(argc, argv, envp) error = getaddrinfo(bindname, "ftp", &hints, &res); } - if (error == 0 && res->ai_addr != NULL) - family = res->ai_addr->sa_family; } if (error) { syslog(LOG_ERR, gai_strerror(error)); @@ -420,7 +418,8 @@ main(argc, argv, envp) if (res->ai_addr == NULL) { syslog(LOG_ERR, "-a %s: getaddrinfo failed", hostname); exit(1); - } + } else + family = res->ai_addr->sa_family; /* * Open a socket, bind it to the FTP port, and start * listening. |