NetBSD Problem Report #7912

Received: (qmail 11215 invoked from network); 4 Jul 1999 19:47:58 -0000
Message-Id: <199907041947.VAA25236@arresum.inka.de>
Date: Sun, 4 Jul 1999 21:47:55 +0200 (MEST)
From: Bernd Ernesti <bernd@arresum.inka.de>
Reply-To: bernd@arresum.inka.de
To: gnats-bugs@gnats.netbsd.org
Subject: resolver problems in ftp
X-Send-Pr-Version: 3.95

>Number:         7912
>Category:       bin
>Synopsis:       resolver problems with ftp after recent ipv6 changes
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    itojun
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 04 12:50:01 +0000 1999
>Closed-Date:    Tue Jul 06 19:43:38 +0000 1999
>Last-Modified:  Fri Mar 31 08:17:05 +0000 2000
>Originator:     Bernd Ernesti
>Release:        NetBSD-current 04-Jul-1999 1800
>Organization:

>Environment:

System: NetBSD arresum.inka.de 1.4D NetBSD 1.4D (ARRESUM) #356: Sun Jul 4 11:03:01 MEST 1999 bernd@arresum.inka.de:/obj_i386/src.i386/sys/arch/i386/compile/ARRESUM i386


>Description:
	ftp has some weird behaviours when you try to use it.
>How-To-Repeat:
	1. Put ftp.netbsd.org in your /etc/hosts and use 'hosts: files dns'
	   in /etc/nsswitch.conf:
> ftp ftp://ftp.netbsd.org/pub/
Trying cc98:b84b:7773:2e6d:6f7a:696c:6c61:2e6f...
Trying 204.152.184.75...
Connected to ftp.netbsd.org.

	now remove that line in /etc/hosts:

> ftp ftp://ftp.netbsd.org/pub/
Connected to ftp.netbsd.org.

	which looks better.

	2. try to get a file from a server which has a CNAME and use that
	   and not the A record:

> nslookup ftp.freebsd.org
Server:  localhost
Address:  127.0.0.1

Non-authoritative answer:
Name:    wcarchive.cdrom.com
Address:  209.155.82.18
Aliases:  ftp.freebsd.org

> ftp ftp://ftp.freebsd.org/pub/
ftp: Non-recoverable failure in name resolution: Undefined error: 0
ftp: Can't connect or login to host `ftp.freebsd.org'

	Where it works when you use the A record:
> ftp ftp://wcarchive.cdrom.com/pub/
Connected to wcarchive.cdrom.com.

	3. try to get a file via http:

> ftp http://www.netbsd.org/index.html
ftp: Can't create socket: Protocol not supported
ftp in free(): warning: junk pointer, too low to make sense.

	It doesn't matter if that is a CNAME or a A record.

	4. This is not a resolver problem, but:

> ftp ftp://ftp.netbsd.org/pub/NetBSD/README
Trying cc98:b84b:7773:2e6d:6f7a:696c:6c61:2e6f...
Trying 204.152.184.75...
Connected to ftp.netbsd.org.
[..]
250 CWD command successful.
local: README remote: README
500 'EPSV': command not understood.
227 Entering Passive Mode (204,152,184,75,200,185)
150 Opening BINARY mode data connection for 'README' (1309 bytes).
100% |***********************************************|  1309       0.27 KB/s    00:00 ETA
226 Transfer complete.
1309 bytes received in 00:04 (0.27 KB/s)
221 Goodbye.

Notice the 'EPSV' error.

>Fix:
>Release-Note:
>Audit-Trail:

From: itojun@iijlab.net
To: bernd@arresum.inka.de
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: bin/7912: resolver problems in ftp 
Date: Mon, 05 Jul 1999 07:43:46 +0900

 >>How-To-Repeat:
 >	1. Put ftp.netbsd.org in your /etc/hosts and use 'hosts: files dns'
 >	   in /etc/nsswitch.conf:

 	There was a bug in gethostbyname2(), which looks at wrong address
 	family on querying /etc/hosts.  Now I fixed.

 >	2. try to get a file from a server which has a CNAME and use that
 >	   and not the A record:
 >	3. try to get a file via http:

 	Name resolution issue should be fixed already (yesterday in Japan
 	time).  I'll be checking "junk pointer free" issue.

 >	4. This is not a resolver problem, but:
 >local: README remote: README
 >500 'EPSV': command not understood.
 >227 Entering Passive Mode (204,152,184,75,200,185)
 >Notice the 'EPSV' error.

 	This implementation tries EPSV first, then PASV (EPSV is much better
 	than PASV for firewall-friendliness).  Does it bother you?

 itojun

From: Bernd Ernesti <bernd@arresum.inka.de>
To: itojun@iijlab.net
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: bin/7912: resolver problems in ftp
Date: Mon, 5 Jul 1999 05:48:15 +0200 (MEST)

 On Mon Jul  5 00:43:46 1999, itojun@iijlab.net wrote:
 > 
 > 
 > >>How-To-Repeat:
 > >	1. Put ftp.netbsd.org in your /etc/hosts and use 'hosts: files dns'
 > >	   in /etc/nsswitch.conf:
 > 
 > 	There was a bug in gethostbyname2(), which looks at wrong address
 > 	family on querying /etc/hosts.  Now I fixed.

 Ok, I check that in 14h.

 > >	2. try to get a file from a server which has a CNAME and use that
 > >	   and not the A record:
 > >	3. try to get a file via http:
 > 
 > 	Name resolution issue should be fixed already (yesterday in Japan
 > 	time).  I'll be checking "junk pointer free" issue.

 Which time is that in GMT or UTC?

 As I said it wasn't fixed when i submited my pr which was 4-Jul 1800 UTC.

 > >	4. This is not a resolver problem, but:
 > >local: README remote: README
 > >500 'EPSV': command not understood.
 > >227 Entering Passive Mode (204,152,184,75,200,185)
 > >Notice the 'EPSV' error.
 > 
 > 	This implementation tries EPSV first, then PASV (EPSV is much better
 > 	than PASV for firewall-friendliness).  Does it bother you?

 It bothers me when even our ftpd doesn't understand that.
 So, which ftp server understand that?

 Bernd


From: itojun@iijlab.net
To: veego@netbsd.org
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: bin/7912: resolver problems in ftp 
Date: Mon, 05 Jul 1999 14:32:18 +0900

 ------- =_aaaaaaaaaa0
 Content-Type: text/plain; charset="us-ascii"
 Content-ID: <11973.931152666.1@coconut.itojun.org>
 Content-Transfer-Encoding: 7bit

 >> >	2. try to get a file from a server which has a CNAME and use that
 >> >	   and not the A record:
 >> >	3. try to get a file via http:
 >> 	Name resolution issue should be fixed already (yesterday in Japan
 >> 	time).  I'll be checking "junk pointer free" issue.
 >Which time is that in GMT or UTC?
 >As I said it wasn't fixed when i submited my pr which was 4-Jul 1800 UTC.

 	Attached is the changelog.  It seems that it was changed at
 	4 Jul 0030 UTC.

 >> 	This implementation tries EPSV first, then PASV (EPSV is much better
 >> 	than PASV for firewall-friendliness).  Does it bother you?
 >It bothers me when even our ftpd doesn't understand that.
 >So, which ftp server understand that?

 	That's strange.  NetBSD ftpd now do understand that.

 itojun



 ------- =_aaaaaaaaaa0
 Content-Type: message/rfc822

 Return-Path: <source-changes-owner-itojun=itojun.org@netbsd.org>
 Received: from mail.netbsd.org (redmail.netbsd.org [155.53.200.193])
 	by coconut.itojun.org (8.9.3+3.2W/3.7W) with SMTP id JAA21651
 	for <itojun@itojun.org>; Sun, 4 Jul 1999 09:35:08 +0900 (JST)
 Received: (qmail 7368 invoked by uid 605); 4 Jul 1999 00:33:37 -0000
 Received: (qmail 7172 invoked from network); 4 Jul 1999 00:33:16 -0000
 Received: from nb00.nas.nasa.gov (129.99.113.80)
   by redmail.netbsd.org with SMTP; 4 Jul 1999 00:33:16 -0000
 Received: (from itojun@localhost)
 	by nb00.nas.nasa.gov (8.8.8/8.8.8) id RAA27684;
 	Sat, 3 Jul 1999 17:33:16 -0700 (PDT)
 Date: Sat, 3 Jul 1999 17:33:16 -0700 (PDT)
 From: Jun-ichiro itojun Hagino <itojun@netbsd.org>
 Message-Id: <199907040033.RAA27684@nb00.nas.nasa.gov>
 Subject: CVS commit: basesrc
 To: source-changes@netbsd.org
 Reply-To: itojun@netbsd.org
 Sender: source-changes-owner@netbsd.org
 Precedence: list
 Delivered-To: source-changes@netbsd.org
 X-Filter: mailagent [version 3.0 PL56] for itojun@itojun.org


 Module Name:	basesrc
 Committed By:	itojun
 Date:		Sun Jul  4 00:33:15 UTC 1999

 Modified Files:
 	basesrc/lib/libc/net: getaddrinfo.c

 Log Message:
 fix behavior when there's dangling CNAME on specific AF.
 TODO: have getipnodeby{name,addr} and let them do the trick.


 To generate a diff of this commit:
 cvs rdiff -r1.3 -r1.4 basesrc/lib/libc/net/getaddrinfo.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


 ------- =_aaaaaaaaaa0--

From: Bernd Ernesti <Bernd.Ernesti@mail.deuba.com>
To: itojun@iijlab.net
Cc: gnats-bugs@gnats.netbsd.org, lukem@netbsd.org
Subject: Re: bin/7912: resolver problems in ftp
Date: Mon, 05 Jul 1999 09:06:06 +0200

 itojun@iijlab.net wrote:
 > 
 > >> >    2. try to get a file from a server which has a CNAME and use that
 > >> >       and not the A record:
 > >> >    3. try to get a file via http:
 > >>      Name resolution issue should be fixed already (yesterday in Japan
 > >>      time).  I'll be checking "junk pointer free" issue.
 > >Which time is that in GMT or UTC?
 > >As I said it wasn't fixed when i submited my pr which was 4-Jul 1800 UTC.
 > 
 >         Attached is the changelog.  It seems that it was changed at
 >         4 Jul 0030 UTC.

 Ok, so it is definitley not fixed on a non IPv6 kernel.

 > >>      This implementation tries EPSV first, then PASV (EPSV is much better
 > >>      than PASV for firewall-friendliness).  Does it bother you?
 > >It bothers me when even our ftpd doesn't understand that.
 > >So, which ftp server understand that?
 > 
 >         That's strange.  NetBSD ftpd now do understand that.

 But not the one on ftp.netbsd.org.

 So what other ftp server do understand that?

 Btw, please get in touch with lukem@netbsd.org when you add such a change and
 don't mention it in a commit message (1.48 doesn't tell that you added such
 support).
 Luke is our ftp guru :)

 Bernd

From: itojun@iijlab.net
To: veego@netbsd.org
Cc: gnats-bugs@gnats.netbsd.org, lukem@netbsd.org
Subject: Re: bin/7912: resolver problems in ftp 
Date: Mon, 05 Jul 1999 20:05:00 +0900

 >> >> >    2. try to get a file from a server which has a CNAME and use that
 >> >> >       and not the A record:
 >> >> >    3. try to get a file via http:
 >> >>      Name resolution issue should be fixed already (yesterday in Japan
 >> >>      time).  I'll be checking "junk pointer free" issue.
 >> >Which time is that in GMT or UTC?
 >> >As I said it wasn't fixed when i submited my pr which was 4-Jul 1800 UTC.
 >>         Attached is the changelog.  It seems that it was changed at
 >>         4 Jul 0030 UTC.
 >Ok, so it is definitley not fixed on a non IPv6 kernel.

 	I performed tests on non-IPv6 kernel yesterday and it was just fine.
 	Maybe I forgot to commit some of the files.  I'll test again and
 	fix it asap.  Sorry for the mess.

 >> >>      This implementation tries EPSV first, then PASV (EPSV is much better
 >> >>      than PASV for firewall-friendliness).  Does it bother you?
 >> >It bothers me when even our ftpd doesn't understand that.
 >> >So, which ftp server understand that?
 >>         That's strange.  NetBSD ftpd now do understand that.
 >But not the one on ftp.netbsd.org.

 	Yes, I agree.

 >So what other ftp server do understand that?

 	Any IPv6-capable ftp server is capable of handling EPSV/EPRT, even for
 	IPv4 file transfer.  (EPSV/EPRT is for both IPv4 and IPv6)
 	ftpd comes with BSDI, and ftpd comes with KAME kit supports that.

 >Btw, please get in touch with lukem@netbsd.org when you add such a change and
 >don't mention it in a commit message (1.48 doesn't tell that you added such
 >support).
 >Luke is our ftp guru :)

 	Sorry that I did not logged.
 	EPSV/EPRT (described in rfc2428) is much cleaner than legacy
 	ways, future adaptable (it can support more protocol types easily),
 	so I would like to enable it by default.
 	If the warning annoys you, I may have to have a switch to turn
 	it off/on, or I may have to hide warning messages.

 itojun

From: itojun@iijlab.net
To: veego@netbsd.org, gnats-bugs@gnats.netbsd.org, lukem@netbsd.org
Cc:  Subject: Re: bin/7912: resolver problems in ftp 
Date: Mon, 05 Jul 1999 20:12:48 +0900

 >>Ok, so it is definitley not fixed on a non IPv6 kernel.
 >	I performed tests on non-IPv6 kernel yesterday and it was just fine.
 >	Maybe I forgot to commit some of the files.  I'll test again and
 >	fix it asap.  Sorry for the mess.

 	Also, could you tell me more about your configuration?
 	I would like to see your /etc/resolv.conf and /etc/hosts.
 	Also, do you use NIS?

 itojun
State-Changed-From-To: open->feedback 
State-Changed-By: itojun 
State-Changed-When: Tue Jul 6 00:20:49 PDT 1999 
State-Changed-Why:  
I believe this is now fixed.  Please confirm. 


Responsible-Changed-From-To: bin-bug-people->itojun 
Responsible-Changed-By: itojun 
Responsible-Changed-When: Tue Jul 6 00:20:49 PDT 1999 
Responsible-Changed-Why:  
State-Changed-From-To: feedback->closed 
State-Changed-By: veego 
State-Changed-When: Tue Jul 6 12:43:38 PDT 1999 
State-Changed-Why:  
Confirmed, it is fixed now. 

Point 4 needs to be discussed with luke. 
. 

From: Bernd Ernesti <Bernd.Ernesti@mail.deuba.com>
To: itojun@iijlab.net
Cc: gnats-bugs@gnats.netbsd.org, lukem@netbsd.org
Subject: Re: bin/7912: resolver problems in ftp
Date: Mon, 05 Jul 1999 09:06:06 +0200

 itojun@iijlab.net wrote:
 > 
 > >> >    2. try to get a file from a server which has a CNAME and use that
 > >> >       and not the A record:
 > >> >    3. try to get a file via http:
 > >>      Name resolution issue should be fixed already (yesterday in Japan
 > >>      time).  I'll be checking "junk pointer free" issue.
 > >Which time is that in GMT or UTC?
 > >As I said it wasn't fixed when i submited my pr which was 4-Jul 1800 UTC.
 > 
 >         Attached is the changelog.  It seems that it was changed at
 >         4 Jul 0030 UTC.

 Ok, so it is definitley not fixed on a non IPv6 kernel.

 > >>      This implementation tries EPSV first, then PASV (EPSV is much better
 > >>      than PASV for firewall-friendliness).  Does it bother you?
 > >It bothers me when even our ftpd doesn't understand that.
 > >So, which ftp server understand that?
 > 
 >         That's strange.  NetBSD ftpd now do understand that.

 But not the one on ftp.netbsd.org.

 So what other ftp server do understand that?

 Btw, please get in touch with lukem@netbsd.org when you add such a change and
 don't mention it in a commit message (1.48 doesn't tell that you added such
 support).
 Luke is our ftp guru :)

 Bernd
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.