From owner-freebsd-net Mon Apr 29 2: 6:55 2002 Delivered-To: freebsd-net@freebsd.org Received: from web12201.mail.yahoo.com (web12201.mail.yahoo.com [216.136.173.85]) by hub.freebsd.org (Postfix) with SMTP id EC82F37B400 for ; Mon, 29 Apr 2002 02:06:52 -0700 (PDT) Message-ID: <20020429090652.92612.qmail@web12201.mail.yahoo.com> Received: from [203.124.128.243] by web12201.mail.yahoo.com via HTTP; Mon, 29 Apr 2002 02:06:52 PDT Date: Mon, 29 Apr 2002 02:06:52 -0700 (PDT) From: kshitij gunjikar Subject: IP options related question 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? I'm sure something is wrong in my understanding can somebody please point out. Regards Kshitij __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message