From owner-freebsd-hackers Fri Nov 30 2:35:38 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id CD62437B41D; Fri, 30 Nov 2001 02:35:16 -0800 (PST) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id fAUAYv076775; Fri, 30 Nov 2001 12:34:57 +0200 (EET) (envelope-from ru) Date: Fri, 30 Nov 2001 12:34:57 +0200 From: Ruslan Ermilov To: Igor M Podlesny Cc: bug-followup@FreeBSD.org, net@FreeBSD.org Subject: Re: kern/31575: wrong src ip address for some ICMPs Message-ID: <20011130123457.B70651@sunbay.com> References: <200110290410.f9T4APo65440@freefall.freebsd.org> <20011129192500.A74956@sunbay.com> <92140220606.20011130110156@morning.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <92140220606.20011130110156@morning.ru> User-Agent: Mutt/1.3.23i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [Redirected to -net] [Category changed to "kern"] On Fri, Nov 30, 2001 at 11:01:56AM +0700, Igor M Podlesny wrote: [...] > [router] > | > X---->|backbone|--> > | > | > Yip1----|the same media|------[some another ip-network] > |ip2----|the same media|------|some box| > > Here is "router" with FreeBSD (OpenBSD, and, probably *BSD) and "Some > box" doing traceroute to (for e.g.) a host which is _reachable_ _via_ > _backbone_. X, Y -- NICs. Y has several IPs, making several > ip-networks on "the same media". > > The problem: traceroute being run on "somebox" will hear respond from > "router" coming from Y.ip1 address which isn't on its (somebox) > IP-network. (well, I deem icmp.echoreply isn't alone in this.) And > this happens because wrong IP-addr is passed to ifaof_ifpforaddr(). My > patch fixes namely this problem -- I have worked out and applied it > and I believe I know what I'm talking about. Look at it, and you'll > realize what I mean... > > You may ask me for details, but, please, don't make different > situations asking me how does it correlate with -- damn lack of > time... > Yeah, now I see what's screwed up. I even thought about this myself this morning (well, you know the saying we use for that :-), before even reading your mail. But your fix is not quite correct, as we may have an individual routing table entry on "router" pointing back to "somebox" with a specific interface address (IFA) given, as reported by the "route -vn get -host " command, and we should actually use that as the source. The correct fix is a bit more complicated, and fortunately I have one. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message