forked from mirrors/tftp-hpa-google
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:
parent
4bdac0b536
commit
c3a5c712e2
4 changed files with 8 additions and 7 deletions
|
@ -221,10 +221,10 @@ int main(int argc, char *argv[])
|
||||||
if (argv[arg][0] == '-') {
|
if (argv[arg][0] == '-') {
|
||||||
for (optx = &argv[arg][1]; *optx; optx++) {
|
for (optx = &argv[arg][1]; *optx; optx++) {
|
||||||
switch (*optx) {
|
switch (*optx) {
|
||||||
#ifdef HAVE_IPV6
|
|
||||||
case '4':
|
case '4':
|
||||||
ai_fam = AF_INET;
|
ai_fam = AF_INET;
|
||||||
break;
|
break;
|
||||||
|
#ifdef HAVE_IPV6
|
||||||
case '6':
|
case '6':
|
||||||
ai_fam = AF_INET6;
|
ai_fam = AF_INET6;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
.\" SUCH DAMAGE.
|
.\" 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
|
.SH NAME
|
||||||
.B tftp
|
.B tftp
|
||||||
\- IPv4 Trivial File Transfer Protocol client
|
\- IPv4 Trivial File Transfer Protocol client
|
||||||
|
@ -56,9 +56,10 @@ command below.)
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.TP
|
.TP
|
||||||
.B \-4
|
.B \-4
|
||||||
Connect with IPv4 only, if IPv6 support was compiled in.
|
Connect with IPv4 only, even if IPv6 support was compiled in.
|
||||||
.TP
|
.TP
|
||||||
.B \-6
|
.B \-6
|
||||||
|
Connect with IPv6 only, if compiled in.
|
||||||
.TP
|
.TP
|
||||||
\fB\-c\fP \fIcommand\fP
|
\fB\-c\fP \fIcommand\fP
|
||||||
Execute \fIcommand\fP as if it had been entered on the tftp prompt.
|
Execute \fIcommand\fP as if it had been entered on the tftp prompt.
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
.\" SUCH DAMAGE.
|
.\" 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
|
.SH NAME
|
||||||
.B tftpd
|
.B tftpd
|
||||||
\- IPv4 Trivial File Transfer Protocol server
|
\- IPv4 Trivial File Transfer Protocol server
|
||||||
|
@ -49,10 +49,10 @@ but can also run standalone.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.TP
|
.TP
|
||||||
.B \-4
|
.B \-4
|
||||||
Connect with IPv4 only, if IPv6 support was compiled in.
|
Connect with IPv4 only, even if IPv6 support was compiled in.
|
||||||
.TP
|
.TP
|
||||||
.B \-6
|
.B \-6
|
||||||
Connect with IPv6 only, if IPv6 support was compiled in.
|
Connect with IPv6 only, if compiled in.
|
||||||
.TP
|
.TP
|
||||||
.B \-l
|
.B \-l
|
||||||
Run the server in standalone (listen) mode, rather than run from
|
Run the server in standalone (listen) mode, rather than run from
|
||||||
|
|
|
@ -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)
|
while ((c = getopt(argc, argv, "46cspvVlLa:B:u:U:r:t:T:R:m:")) != -1)
|
||||||
switch (c) {
|
switch (c) {
|
||||||
#ifdef HAVE_IPV6
|
|
||||||
case '4':
|
case '4':
|
||||||
ai_fam = AF_INET;
|
ai_fam = AF_INET;
|
||||||
break;
|
break;
|
||||||
|
#ifdef HAVE_IPV6
|
||||||
case '6':
|
case '6':
|
||||||
ai_fam = AF_INET6;
|
ai_fam = AF_INET6;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue