diff options
Diffstat (limited to 'usr.bin/ftp/main.c')
-rw-r--r-- | usr.bin/ftp/main.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index 2bb149ce1f0..e36aca7010d 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.48 2001/06/23 22:48:45 millert Exp $ */ +/* $OpenBSD: main.c,v 1.49 2002/05/30 06:51:46 deraadt Exp $ */ /* $NetBSD: main.c,v 1.24 1997/08/18 10:20:26 lukem Exp $ */ /* @@ -73,7 +73,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.48 2001/06/23 22:48:45 millert Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.49 2002/05/30 06:51:46 deraadt Exp $"; #endif #endif /* not lint */ @@ -95,6 +95,8 @@ static char rcsid[] = "$OpenBSD: main.c,v 1.48 2001/06/23 22:48:45 millert Exp $ #include "ftp_var.h" +int family = PF_UNSPEC; + int main(argc, argv) volatile int argc; @@ -180,8 +182,14 @@ main(argc, argv) if (isatty(fileno(ttyout)) && !dumb_terminal && foregroundproc()) progress = 1; /* progress bar on if tty is usable */ - while ((ch = getopt(argc, argv, "Aadegimno:pP:r:tvV")) != -1) { + while ((ch = getopt(argc, argv, "46Aadegimno:pP:r:tvV")) != -1) { switch (ch) { + case '4': + family = PF_INET; + break; + case '6': + family = PF_INET6; + break; case 'A': activefallback = 0; passivemode = 0; |