From owner-freebsd-current Thu Aug 17 18:48:59 2000 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.129.65]) by hub.freebsd.org (Postfix) with ESMTP id F35F437B8EF for ; Thu, 17 Aug 2000 18:48:55 -0700 (PDT) Received: from peace.mahoroba.org (peace.calm.imasy.or.jp [202.227.26.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D4A56E4001 for ; Thu, 17 Aug 2000 13:54:22 -0700 (PDT) Received: from localhost (IDENT:SMYNHeopr5IwVta91W0310adEg/wveySrhD/s00H55OF3ofIsoQec+vPz7eUgTfG@localhost [::1]) (authenticated) by peace.mahoroba.org (8.11.0/8.11.0/peace) with ESMTP/inet6 id e7HKpav21384; Fri, 18 Aug 2000 05:51:36 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Fri, 18 Aug 2000 05:51:33 +0900 (JST) Message-Id: <20000818.055133.48522708.ume@mahoroba.org> To: archie@whistle.com Cc: freebsd-current@freebsd.org Subject: Re: 5.0 snapshot install problem From: Hajimu UMEMOTO In-Reply-To: <200008172029.NAA96024@bubba.whistle.com> References: <20000818.023721.115915969.ume@mahoroba.org> <200008172029.NAA96024@bubba.whistle.com> X-Mailer: xcite1.20> Mew version 1.95b38 on Emacs 20.6 / Mule 4.0 =?iso-2022-jp?B?KBskQjJWMWMbKEIp?= X-PGP-Public-Key: http://www.imasy.org/~ume/publickey.asc X-PGP-Fingerprint: 6B 0C 53 FC 5D D0 37 91 05 D0 B3 EF 36 9B 6A BC X-URL: http://www.imasy.org/~ume/ X-OS: FreeBSD 5.0-CURRENT Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >>>>> On Thu, 17 Aug 2000 13:29:27 -0700 (PDT) >>>>> Archie Cobbs said: archie> Hajimu UMEMOTO writes: > > It seems -CURRENT's libftpio.c always set passive flag according to > > environment variable FTP_PASSIVE_MODE. Then, PASV/PORT selection > > obeys only FTP_PASSIVE_MODE and direction of sysinstall is ignored. > > Does this patch fix your problem? > > archie> Don't know, because I'd have to create new install floppies first.. > > archie> But I don't think this patch would fix things.. I don't see any > archie> logical flaw there. ftpPassive() just checks that the toggle is > archie> set to the right value -- it doesn't necessarily do anything. > > After checking, FTP_PASSIVE_MODE is tested by check_passive() every > fetGET() call. check_passive() calls ftpPassive(). So, > ftp->is_passive is resetted. archie> OK, now I think I see part of the problem.. check out ftpPassive(): ...snip... archie> This is completely wrong. The comment "passive mode is a toggle" archie> is incorrect. It's correct when you're talking about ftp(1)'s archie> "pass" command, but NOT true in the FTP protocol. Therefore archie> ftpPassive() should not be issuing any PASV command at all; the archie> sending of the PASV or PORT command (which applies per-transfer) archie> is handled by ftp_file_op() anyway (so the one sent by ftpPassive() archie> ends up having no effect anyway). archie> What must be happening is that sysinstall is actually setting archie> up an active mode connection, and the PASV is simply the extraneous archie> one emitted by ftpPassive(). Yes, I agree with it. However, it doesn't solve your problem. archie> But why is sysinstall going to active mode? I *know* FTP passive archie> was selected.. This is just because ftpPassive() is called from ftpGet(). ftpGet() check_passive() ftpPassive() Further more, if FTP_PASSIVE_MODE is not set, check_passive() calls ftpPassive(fp, 0). First, sysinstall calls ftpPassive() to intend to use PASV. Then, ftp->is_passive is reset to 1. Next, ftpGet() calls ftpPassive() according to the setting of FTP_PASSIVE_MODE. In installer, FTP_PASSIVE_MODE is not set. Then, ftp->is_passive is reset to 0 by ftpPassive() toggle. So, ftp_file_op() issues PORT. -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message