From owner-freebsd-net Wed Apr 24 4:14:10 2002 Delivered-To: freebsd-net@freebsd.org Received: from web12208.mail.yahoo.com (web12208.mail.yahoo.com [216.136.173.92]) by hub.freebsd.org (Postfix) with SMTP id 97A7937B41A for ; Wed, 24 Apr 2002 04:14:01 -0700 (PDT) Message-ID: <20020424111242.77223.qmail@web12208.mail.yahoo.com> Received: from [203.124.128.243] by web12208.mail.yahoo.com via HTTP; Wed, 24 Apr 2002 04:12:42 PDT Date: Wed, 24 Apr 2002 04:12:42 -0700 (PDT) From: kshitij gunjikar Subject: Record Routes To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi All, I have a question related to record routes in the FreeBSD code. In the ip_dooptions() fn in ip_input.c there is this code in the Record Route option. /* * If no space remains, ignore. */ off--; /* 0 origin */ if (off > optlen - (int)sizeof(struct in_addr)) break; (void)memcpy(&ipaddr.sin_addr, &ip->ip_dst, sizeof(ipaddr.sin_addr)); /* * locate outgoing interface; if we're the destination, * use the incoming interface (should be same). */ if ((ia = (INA)ifa_ifwithaddr((SA)&ipaddr)) == 0 && (ia = ip_rtaddr(ipaddr.sin_addr)) == 0) { type = ICMP_UNREACH; code = ICMP_UNREACH_HOST; goto bad; } 1. Why is the ICMP_UNREACH_HOST generated? 2. Because if a route is not found, then am I wrong in saying ICMP_UNREACH_NETWORK must be generated. Also, how does ip_rtaddr() find out that the IP address is not of the directly connected networks? Thanks in advance. Regards Kshitij __________________________________________________ Do You Yahoo!? Yahoo! Games - play chess, backgammon, pool and more http://games.yahoo.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message