Allow the -4 option even in an IPv4-only configuration

Allow the -4 option even if IPv6 isn't compiled in.
This commit is contained in:
H. Peter Anvin 2008-07-23 14:36:18 -04:00
parent 4bdac0b536
commit c3a5c712e2
4 changed files with 8 additions and 7 deletions

View file

@ -221,10 +221,10 @@ int main(int argc, char *argv[])
if (argv[arg][0] == '-') {
for (optx = &argv[arg][1]; *optx; optx++) {
switch (*optx) {
#ifdef HAVE_IPV6
case '4':
ai_fam = AF_INET;
break;
#ifdef HAVE_IPV6
case '6':
ai_fam = AF_INET6;
break;

View file

@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\"----------------------------------------------------------------------- */
.TH TFTP 1 "12 December 2006" "tftp-hpa @@VERSION@@" "User's Manual"
.TH TFTP 1 "23 July 2008" "tftp-hpa @@VERSION@@" "User's Manual"
.SH NAME
.B tftp
\- IPv4 Trivial File Transfer Protocol client
@ -56,9 +56,10 @@ command below.)
.SH OPTIONS
.TP
.B \-4
Connect with IPv4 only, if IPv6 support was compiled in.
Connect with IPv4 only, even if IPv6 support was compiled in.
.TP
.B \-6
Connect with IPv6 only, if compiled in.
.TP
\fB\-c\fP \fIcommand\fP
Execute \fIcommand\fP as if it had been entered on the tftp prompt.

View file

@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\"----------------------------------------------------------------------- */
.TH TFTPD 8 "16 February 2006" "tftp-hpa @@VERSION@@" "System Manager's Manual"
.TH TFTPD 8 "23 July 2008" "tftp-hpa @@VERSION@@" "System Manager's Manual"
.SH NAME
.B tftpd
\- IPv4 Trivial File Transfer Protocol server
@ -49,10 +49,10 @@ but can also run standalone.
.SH OPTIONS
.TP
.B \-4
Connect with IPv4 only, if IPv6 support was compiled in.
Connect with IPv4 only, even if IPv6 support was compiled in.
.TP
.B \-6
Connect with IPv6 only, if IPv6 support was compiled in.
Connect with IPv6 only, if compiled in.
.TP
.B \-l
Run the server in standalone (listen) mode, rather than run from

View file

@ -298,10 +298,10 @@ int main(int argc, char **argv)
while ((c = getopt(argc, argv, "46cspvVlLa:B:u:U:r:t:T:R:m:")) != -1)
switch (c) {
#ifdef HAVE_IPV6
case '4':
ai_fam = AF_INET;
break;
#ifdef HAVE_IPV6
case '6':
ai_fam = AF_INET6;
break;