From owner-freebsd-bugs Fri Nov 30 2:40:26 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C132F37B419 for ; Fri, 30 Nov 2001 02:40:03 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fAUAe3n19037; Fri, 30 Nov 2001 02:40:03 -0800 (PST) (envelope-from gnats) Date: Fri, 30 Nov 2001 02:40:03 -0800 (PST) Message-Id: <200111301040.fAUAe3n19037@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Ruslan Ermilov Subject: Re: kern/31575: wrong src ip address for some ICMPs Reply-To: Ruslan Ermilov Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/31575; it has been noted by GNATS. 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 Date: Fri, 30 Nov 2001 12:34:57 +0200 [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-bugs" in the body of the message