From dpokorny@iosuvs.fm.intel.com  Tue Nov 14 16:56:53 2000
Return-Path: <dpokorny@iosuvs.fm.intel.com>
Received: from calliope1.fm.intel.com (calliope1.fm.intel.com [132.233.247.10])
	by hub.freebsd.org (Postfix) with ESMTP id B864937B479
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 14 Nov 2000 16:56:52 -0800 (PST)
Received: from iosuvs.fm.intel.com (iosuvs.fm.intel.com [132.233.44.75])
	by calliope1.fm.intel.com (8.9.1a+p1/8.9.1/d: relay.m4,v 1.32 2000/10/12 22:57:04 dmccart Exp $) with ESMTP id AAA28360
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Nov 2000 00:56:52 GMT
Received: (from root@localhost)
	by iosuvs.fm.intel.com (8.9.3/8.9.3) id QAA35359;
	Tue, 14 Nov 2000 16:56:52 -0800 (PST)
	(envelope-from dpokorny)
Message-Id: <200011150056.QAA35359@iosuvs.fm.intel.com>
Date: Tue, 14 Nov 2000 16:56:52 -0800 (PST)
From: doug.pokorny@intel.com
Sender: dpokorny@iosuvs.fm.intel.com
Reply-To: doug.pokorny@intel.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: libfetch fails when older proxy doesn't understand MDTM command
X-Send-Pr-Version: 3.2

>Number:         22855
>Category:       bin
>Synopsis:       libfetch fails when older proxy doesn't understand MDTM command
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    des
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 14 17:00:01 PST 2000
>Closed-Date:    Fri Nov 17 06:07:44 PST 2000
>Last-Modified:  Fri Nov 17 06:08:58 PST 2000
>Originator:     System Administrator
>Release:        FreeBSD 4.1-RELEASE i386
>Organization:
Intel Online Services
>Environment:

FreeBSD iosuvs.fm.intel.com 4.1-RELEASE FreeBSD 4.1-RELEASE #0

With FTP_PROXY set to local proxy server.

>Description:

It appears that libfetch will always send a SIZE and MDTM command to the
remote FTP server as part of _ftp_stat in /usr/src/lib/libfetch/ftp.c.
Sites (such as ours) which use an older proxy server that doesn't understand
how to forwared MDTM commands will always fail.  As a result, the fetch
will always fail.

Here's a cleaned-up tcpdump of the conversation that libfetch had with 
the proxy:

230 Guest login ok, access restrictions apply.
TYPE I
200 Type set to I.
CWD /pub/FreeBSD/ports/distfiles
250 CWD command successful.
SIZE qpopper3.0.2.tar.gz
213 1734453
MDTM qpopper3.0.2.tar.gz
500 command not understood

At this point, the whole fetch fails.

>How-To-Repeat:

1)  Trap yourself behind an old BSDi proxy server
2)  Make fetch anything in /usr/ports

>Fix:

My temporary workaround is to commend out the MDTM section of ftp.c -- however
this is not an ideal solution.  Perhaps _ftp_stat should simply not fail
if one of these commands returns an error and replace the failure with some
safe data.


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->des 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Thu Nov 16 22:58:58 PST 2000 
Responsible-Changed-Why:  

Over to Mr. Fetch 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22855 
State-Changed-From-To: open->closed 
State-Changed-By: des 
State-Changed-When: Fri Nov 17 06:07:44 PST 2000 
State-Changed-Why:  
Fixed ages ago (July 27th, to be exact) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22855 
>Unformatted:
