Subject: bin/7912: resolver problems in ftp
To: None <gnats-bugs@gnats.netbsd.org>
From: Bernd Ernesti <bernd@arresum.inka.de>
List: netbsd-bugs
Date: 07/04/1999 12:50:58
>Number:         7912
>Category:       bin
>Synopsis:       resolver problems with ftp after recent ipv6 changes
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul  4 12:50:01 1999
>Last-Modified:
>Originator:     Bernd Ernesti
>Organization:
	
>Release:        NetBSD-current 04-Jul-1999 1800
>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:
>Audit-Trail:
>Unformatted: