From owner-cvs-all@FreeBSD.ORG Wed Mar 15 21:15:08 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C768616A425 for ; Wed, 15 Mar 2006 21:15:08 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF40443D58 for ; Wed, 15 Mar 2006 21:15:06 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 83980 invoked from network); 15 Mar 2006 21:12:18 -0000 Received: from c00l3r.networx.ch (HELO freebsd.org) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 15 Mar 2006 21:12:18 -0000 Message-ID: <441883DD.B0B5A18C@freebsd.org> Date: Wed, 15 Mar 2006 22:15:09 +0100 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Gleb Smirnoff References: <200603151939.k2FJd91g080489@repoman.freebsd.org> <20060315204402.GK1102@FreeBSD.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/net route.h rtsock.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 21:15:08 -0000 Gleb Smirnoff wrote: > > Andre, > > On Wed, Mar 15, 2006 at 07:39:09PM +0000, Andre Oppermann wrote: > A> - The unused rtm_use field in struct rt_msghdr is redesignated as > A> rtm_fmask field to communicate route flag changes in RTM_CHANGE > A> messages from userland. The use count of a route was moved to > A> rtm_rmx a long time ago. For source code compatibility reasons > A> a define of rtm_use to rtm_fmask is provided. > > Be careful. rtm_use isn't unused - it is used sysctl_dumpentry() > to return the usage of route to userland. However, I don't see > programs netstat(1) and route(1) to read it. Anyway, I think > it deserves a comment. It does copy it but it also copies struct rt_rmx. Probably rtm_use should be defined to alias to rt_rmx.rmx_pksent to get this right. > A> These changes faciliate running of multiple cooperating routing > A> daemons at the same time without causing undesired interference. > A> Open[BGP|OSPF]D make use of these features to have IGP routes > A> override EGP ones. > > Please explain how is this done. Does radix allow presence of two > identical prefixes in tree, and we distinguish them by rt->rt_flags? No. If you've got the same prefix in BGP and OSPF with different next hops then the OSPF one should win. Normally the two daemons would get into a fight about this and indefinatly try to replace each others route again. This change makes it possible for two cooperating daemons to avoid this. With the change to flags OSPFD may take over an existing route by chaning the PROTO flag to itself. BGPD then knows it got an override. Before OSPFD had to delete the route and re-add it with its own parameters. However upon the delete message BGPD would try to add it again. When OSPFD removes a route that was identical to a BGP one BGPD will re-add its own version of it. -- Andre