From owner-freebsd-net Fri Jun 2 11:50:31 2000 Delivered-To: freebsd-net@freebsd.org Received: from yagosys.com (mail.yagosys.com [207.135.89.130]) by hub.freebsd.org (Postfix) with ESMTP id 6A6ED37B709 for ; Fri, 2 Jun 2000 11:50:28 -0700 (PDT) (envelope-from shiva@yagosys.com) Received: from yagosys.com by yagosys.com (8.8.8+Sun/SMI-SVR4-Yago) id LAA29721; Fri, 2 Jun 2000 11:48:28 -0700 (PDT) Message-ID: <393801D4.84C60B59@yagosys.com> Date: Fri, 02 Jun 2000 11:49:56 -0700 From: Shiva Shenoy Reply-To: shiva@yagosys.com Organization: Cabletron Systems, Inc. X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.5.1 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: Garrett Wollman Cc: freebsd-net@FreeBSD.ORG Subject: Re: [Q] Clarification regarding RTF_PRCLONING and RTF_CLONING. References: <3937F28A.5168FABC@yagosys.com> <200006021822.OAA42179@khavrinen.lcs.mit.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Garrett Wollman wrote: > > < said: > > > 1. What is the difference between RTF_PRCLONING and RTF_CLONING > > I see that these 2 attributes are mutually exclusive. > > One is enabled by the protocol and the other is enabled by the > interface or by a routing process. The former was a hack perpetrated > by yours truly to make the routing table behave like a per-host > cache. I know better now, but I haven't had the time or inclination > over the past four years to sit down and fix it. > > > 2. Do ARP entries, cloned off of interface routes, get deleted > > when an interface route is brought down or deleted? > > I don't recall. I think there was some code to support that, but I > don't know whether it was actually effective or not. > (All code snippets below are from net/route.c) The code that may have been there is under RTM_DELETE. This call here after the route has been deleted was intended to do that, I think. rnh->rnh_walktree_from(rnh, dst, netmask, rt_fixdelete, rt); When an interface route is blown away, arp entries are not removed. Reason: rt_fixdelete() - the first line precludes arp entries, cloned off of the interface route from passing the test. The parent route is NULL for arp entries! if (rt->rt_parent == rt0 && !(rt->rt_flags & RTF_PINNED)) { This can be fixed by changing the line in rtrequest: if ((*ret_nrt)->rt_flags & RTF_PRCLONING) { rt->rt_parent = (*ret_nrt); to: if ((*ret_nrt)->rt_flags & (RTF_CLONING | RTF_PRCLONING)) { rt->rt_parent = (*ret_nrt); Do you see any serious problem in this logic? > > 3. How come ARP rtentries do not have rt_parent set to the > > interface routes that they are cloned off of? In fact they > > are set to NULL. > > Because they are created from RTF_CLONING routes and not RTF_PRCLONING > routes. This may actually be a bug. Thanks again for your feedback. -Shiva Shenoy To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message