summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-07-23 14:36:18 -0400
committerH. Peter Anvin <hpa@zytor.com>2008-07-23 14:36:18 -0400
commitc3a5c712e2999a5610479fda84a58847bb5543b2 (patch)
tree5f0d1f272666b37bcbfd5f5e2e909ffe013bc065
parent4bdac0b53698253d85c60c5a3e1da74be0a06cb3 (diff)
downloadtftp-hpa-c3a5c712e2999a5610479fda84a58847bb5543b2.tar.gz
Allow the -4 option even in an IPv4-only configuration
Allow the -4 option even if IPv6 isn't compiled in.
-rw-r--r--tftp/main.c2
-rw-r--r--tftp/tftp.1.in5
-rw-r--r--tftpd/tftpd.8.in6
-rw-r--r--tftpd/tftpd.c2
4 files changed, 8 insertions, 7 deletions
diff --git a/tftp/main.c b/tftp/main.c
index 6176b37..be11957 100644
--- a/tftp/main.c
+++ b/tftp/main.c
@@ -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;
diff --git a/tftp/tftp.1.in b/tftp/tftp.1.in
index 8bbb796..b41f7b5 100644
--- a/tftp/tftp.1.in
+++ b/tftp/tftp.1.in
@@ -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.
diff --git a/tftpd/tftpd.8.in b/tftpd/tftpd.8.in
index b4d1ac3..01007ea 100644
--- a/tftpd/tftpd.8.in
+++ b/tftpd/tftpd.8.in
@@ -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
diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c
index 38f5e7b..8321771 100644
--- a/tftpd/tftpd.c
+++ b/tftpd/tftpd.c
@@ -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;