summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-06-09 00:37:38 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-06-09 00:37:38 +0000
commit7e61141e62d1bbcd06ee0394c8c4b40ebb74588a (patch)
tree2f563f3ea9a49edfda16831527a6ac1799af5015 /libexec
parentf4029384d0e9fea64151ce9d29abc1df7328f93b (diff)
do not present scopeid on wire format (as it is local to a node).
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ftpd/ftpd.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index ad76c6cb379..4a7c4014708 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftpd.c,v 1.127 2002/05/29 18:57:05 deraadt Exp $ */
+/* $OpenBSD: ftpd.c,v 1.128 2002/06/09 00:37:37 itojun Exp $ */
/* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */
/*
@@ -73,7 +73,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)ftpd.c 8.4 (Berkeley) 4/16/94";
#else
-static char rcsid[] = "$OpenBSD: ftpd.c,v 1.127 2002/05/29 18:57:05 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: ftpd.c,v 1.128 2002/06/09 00:37:37 itojun Exp $";
#endif
#endif /* not lint */
@@ -1859,9 +1859,13 @@ printaddr:
}
if (af) {
char hbuf[MAXHOSTNAMELEN], pbuf[10];
- if (getnameinfo((struct sockaddr *)su, su->su_len,
+ union sockunion tmp = *su;
+
+ if (tmp.su_family == AF_INET6)
+ tmp.su_sin6.sin6_scope_id = 0;
+ if (getnameinfo((struct sockaddr *)&tmp, tmp.su_len,
hbuf, sizeof(hbuf), pbuf, sizeof(pbuf),
- NI_NUMERICHOST) == 0) {
+ NI_NUMERICHOST | NI_NUMERICSERV) == 0) {
if (ispassive)
printf("211- EPSV ");
else