From owner-freebsd-bugs Thu Nov 29 9:30:10 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 7028637B43D for ; Thu, 29 Nov 2001 09:30:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fATHU2941176; Thu, 29 Nov 2001 09:30:02 -0800 (PST) (envelope-from gnats) Date: Thu, 29 Nov 2001 09:30:02 -0800 (PST) Message-Id: <200111291730.fATHU2941176@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Ruslan Ermilov Subject: Re: misc/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 misc/31575; it has been noted by GNATS. From: Ruslan Ermilov To: Igor M Podlesny Cc: bug-followup@FreeBSD.org Subject: Re: misc/31575: wrong src ip address for some ICMPs Date: Thu, 29 Nov 2001 19:25:00 +0200 On Sun, Oct 28, 2001 at 08:10:25PM -0800, Igor M Podlesny wrote: > > You might observe this bug doing traceroute while standing behind > a GW's interface with several IP-addresses (aliases). In this case > you always got ICMP.TIMXCEED (time exceeded) coming from IP-address > which is usually the first on the interface, even if your box is > not using this IP-address as its next-hop. Despite of the code > selecting right IP-address for this purpose is working well it's > being confused by wrong argument it is being given. This patch > (http://www.morning.ru/~poige/patchzone/ip_icmp.c.diff) fixes namely > this problem. > Let me see if I took you correctly. Suppose you have a gateway, GW: rl0: flags=8843 mtu 1500 inet 192.168.4.115 netmask 0xffffff00 broadcast 192.168.4.255 inet 192.168.4.200 netmask 0xffffffff broadcast 192.168.4.200 And another host H on the network has the following routing table entry: 10 192.168.4.200 UGSc 0 16030 fxp0 And you are complaining that when H sends an IP packet to the 10 network, with TTL <= 1, gateway replies with an ICMP time exceeded from 192.168.4.115 instead of expected 192.168.4.200, like this: traceroute to 10.0.0.1 (10.0.0.1), 1 hops max, 40 byte packets 1 192.168.4.115 0.448 ms Right? But if that's the case (and I just checked for sure that your patch doesn't make any difference), the GW doesn't know which of the 192.168.4.115 or 192.168.4.220 addresses have been used by H, because they both map to the same MAC address on H, and the MAC address is what's used when forwarding: ? (192.168.4.115) at 0:c0:df:3:2d:79 on fxp0 [ethernet] ? (192.168.4.200) at 0:c0:df:3:2d:79 on fxp0 [ethernet] > >How-To-Repeat: > You should have several ip-address on interface of NEXT-HOP router > running FreeBSD, then invoke traceroute some.where. > Yeah, that's exactly how I did it, and didn't notice any difference after applying your patch... 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