Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/ftp Use the proper format "[IPv6 address]:port" when...
details: https://anonhg.NetBSD.org/src/rev/3aad22966386
branches: trunk
changeset: 812331:3aad22966386
user: tron <tron%NetBSD.org@localhost>
date: Fri Dec 11 08:37:31 2015 +0000
description:
Use the proper format "[IPv6 address]:port" when reporting connection
attempts to IPv6 endpoints.
diffstat:
usr.bin/ftp/fetch.c | 13 +++++++++----
usr.bin/ftp/ftp.c | 12 +++++++++---
2 files changed, 18 insertions(+), 7 deletions(-)
diffs (67 lines):
diff -r 1632e85b3307 -r 3aad22966386 usr.bin/ftp/fetch.c
--- a/usr.bin/ftp/fetch.c Fri Dec 11 08:19:07 2015 +0000
+++ b/usr.bin/ftp/fetch.c Fri Dec 11 08:37:31 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fetch.c,v 1.207 2015/09/12 19:38:42 wiz Exp $ */
+/* $NetBSD: fetch.c,v 1.208 2015/12/11 08:37:31 tron Exp $ */
/*-
* Copyright (c) 1997-2015 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.207 2015/09/12 19:38:42 wiz Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.208 2015/12/11 08:37:31 tron Exp $");
#endif /* not lint */
/*
@@ -763,8 +763,13 @@
}
if (verbose && res0->ai_next) {
- fprintf(ttyout, "Trying %s:%s ...\n",
- hname, sname);
+ if(res->ai_family == AF_INET6) {
+ fprintf(ttyout, "Trying [%s]:%s ...\n",
+ hname, sname);
+ } else {
+ fprintf(ttyout, "Trying %s:%s ...\n",
+ hname, sname);
+ }
}
s = socket(res->ai_family, SOCK_STREAM,
diff -r 1632e85b3307 -r 3aad22966386 usr.bin/ftp/ftp.c
--- a/usr.bin/ftp/ftp.c Fri Dec 11 08:19:07 2015 +0000
+++ b/usr.bin/ftp/ftp.c Fri Dec 11 08:37:31 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ftp.c,v 1.164 2012/07/04 06:09:37 is Exp $ */
+/* $NetBSD: ftp.c,v 1.165 2015/12/11 08:37:31 tron Exp $ */
/*-
* Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -92,7 +92,7 @@
#if 0
static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94";
#else
-__RCSID("$NetBSD: ftp.c,v 1.164 2012/07/04 06:09:37 is Exp $");
+__RCSID("$NetBSD: ftp.c,v 1.165 2015/12/11 08:37:31 tron Exp $");
#endif
#endif /* not lint */
@@ -200,7 +200,13 @@
}
if (verbose && res0->ai_next) {
/* if we have multiple possibilities */
- fprintf(ttyout, "Trying %s:%s ...\n", hname, sname);
+ if(res->ai_family == AF_INET6) {
+ fprintf(ttyout, "Trying [%s]:%s ...\n", hname,
+ sname);
+ } else {
+ fprintf(ttyout, "Trying %s:%s ...\n", hname,
+ sname);
+ }
}
s = socket(res->ai_family, SOCK_STREAM, res->ai_protocol);
if (s < 0) {
Home |
Main Index |
Thread Index |
Old Index