Module Name: othersrc Committed By: tron Date: Fri Dec 11 08:47:53 UTC 2015
Modified Files: othersrc/usr.bin/tnftp/src: fetch.c ftp.c Log Message: Use the proper format "[IPv6 address]:port" when reporting connection attempts to IPv6 endpoints. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 othersrc/usr.bin/tnftp/src/fetch.c cvs rdiff -u -r1.19 -r1.20 othersrc/usr.bin/tnftp/src/ftp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: othersrc/usr.bin/tnftp/src/fetch.c diff -u othersrc/usr.bin/tnftp/src/fetch.c:1.21 othersrc/usr.bin/tnftp/src/fetch.c:1.22 --- othersrc/usr.bin/tnftp/src/fetch.c:1.21 Sun Oct 4 04:53:26 2015 +++ othersrc/usr.bin/tnftp/src/fetch.c Fri Dec 11 08:47:52 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: fetch.c,v 1.21 2015/10/04 04:53:26 lukem Exp $ */ +/* $NetBSD: fetch.c,v 1.22 2015/12/11 08:47:52 tron Exp $ */ /* from NetBSD: fetch.c,v 1.207 2015/09/12 19:38:42 wiz Exp */ /*- @@ -770,8 +770,13 @@ fetch_url(const char *url, const char *p } 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, Index: othersrc/usr.bin/tnftp/src/ftp.c diff -u othersrc/usr.bin/tnftp/src/ftp.c:1.19 othersrc/usr.bin/tnftp/src/ftp.c:1.20 --- othersrc/usr.bin/tnftp/src/ftp.c:1.19 Sun May 5 11:17:31 2013 +++ othersrc/usr.bin/tnftp/src/ftp.c Fri Dec 11 08:47:52 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ftp.c,v 1.19 2013/05/05 11:17:31 lukem Exp $ */ +/* $NetBSD: ftp.c,v 1.20 2015/12/11 08:47:52 tron Exp $ */ /* from NetBSD: ftp.c,v 1.164 2012/07/04 06:09:37 is Exp */ /*- @@ -208,7 +208,13 @@ hookup(const char *host, const char *por } 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) {