From owner-freebsd-current Fri Apr 16 13: 4:17 1999 Delivered-To: freebsd-current@freebsd.org Received: from awfulhak.org (awfulhak.force9.co.uk [195.166.136.63]) by hub.freebsd.org (Postfix) with ESMTP id E5E8815A40 for ; Fri, 16 Apr 1999 13:04:04 -0700 (PDT) (envelope-from brian@lan.awfulhak.org) Received: from keep.lan.Awfulhak.org (keep.lan.Awfulhak.org [172.16.0.8]) by awfulhak.org (8.9.2/8.9.2) with ESMTP id VAA00964; Fri, 16 Apr 1999 21:01:35 +0100 (BST) (envelope-from brian@lan.awfulhak.org) Received: from keep.lan.Awfulhak.org (localhost [127.0.0.1]) by keep.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id UAA00879; Fri, 16 Apr 1999 20:03:19 +0100 (BST) (envelope-from brian@keep.lan.Awfulhak.org) Message-Id: <199904161903.UAA00879@keep.lan.Awfulhak.org> X-Mailer: exmh version 2.0.2 2/24/98 To: "Daniel C. Sobral" Cc: Luoqi Chen , brian@Awfulhak.org, camel@avias.com, current@FreeBSD.ORG Subject: Re: some news about ftp hangs In-reply-to: Your message of "Sat, 17 Apr 1999 02:02:07 +0900." <37176D0F.904687D6@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 16 Apr 1999 20:03:17 +0100 From: Brian Somers Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Luoqi Chen wrote: > > > > Sorry, this is a legitimate ICMP packet: port unreacheable. It looks like > > the ftp server (ftp.freebsd.org) was making an UDP query to DNS port on > > the client (which happens to have a named server running, but that's just > > for the internal network, external ip address is served by an outside server) > > and the client responds with port unreacheable even though there is a named > > running. I'm totally confused. I'll try to find out more. By the way, if > > I turn off aliasing (set alias enable off), ftp works fine again. > > This might be a good time to point out that such changes were made > not only to ftp but to a number of other clients. We now check the > reverse address for the IP that was found, so we can decide whether > log the name or the ip address (the later if the reverse does not > match the original address). Now I think I'm confused ;-} I haven't seen any changes to ftp.... I did the double lookup bit to all the stuff in libexec (including ftpd), but that shouldn't effect what's going on here. If the external NS record for Louqi's machine isn't supposed to be on that machine, then we shouldn't have seen a DNS query (maybe named is only binding to the internal IP - hence the ICMP unreachable bit). But we digress ! What's supposed to happen w/ ftp (for anyone that doesn't already know): o The client does a ``get ....''. o ftp creates a socket and bind()s it, getting a random port number back. o ftp sends a PORT command with arguments of the local IP number and the port that bind() gave back. o libalias catches this packet and tweaks it. It changes the IP to the interface IP and may change the port so some arbitrary number that fits in well with it's little world. It then makes an entry in the internal alias tables so that it'll catch the subsequent connection from the remote host, and undo the damage done from mangling the PORT command. All this happens in src/lib/libalias/alias_ftp.c o ftp sends the RETR command down the original connection and gets the data back on the new connection. The deficiency in libalias is that it can't identify PORT commands that span more than one packet fragment. In practice this has never been a problem (well, to my knowledge). On my laptop (-current from yesterday), things are just peachy. So, I don't get it. I've tested without libalias involved to other machines, and with libalias to my local machine (a ppp loopback). I haven't tested via libalias to another machine (I've only got one machine at the moment - I'm on the train!). I'll have a further poke around when I get home, but I suspect no changes ;-/ > -- > Daniel C. Sobral (8-DCS) > dcs@newsguy.com > dcs@freebsd.org > > "Well, Windows works, using a loose definition of 'works'..." -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message