From owner-freebsd-net Thu May 30 21:44:24 2002 Delivered-To: freebsd-net@freebsd.org Received: from patrocles.silby.com (d19.as29.nwbl0.wi.voyager.net [169.207.73.19]) by hub.freebsd.org (Postfix) with ESMTP id C559D37B401 for ; Thu, 30 May 2002 21:44:16 -0700 (PDT) Received: from patrocles.silby.com (localhost [127.0.0.1]) by patrocles.silby.com (8.12.3/8.12.3) with ESMTP id g4V4jTOA022201; Thu, 30 May 2002 23:45:29 -0500 (CDT) (envelope-from silby@silby.com) Received: from localhost (silby@localhost) by patrocles.silby.com (8.12.3/8.12.3/Submit) with ESMTP id g4V4jScU022198; Thu, 30 May 2002 23:45:29 -0500 (CDT) X-Authentication-Warning: patrocles.silby.com: silby owned process doing -bs Date: Thu, 30 May 2002 23:45:28 -0500 (CDT) From: Mike Silbersack To: Andre Oppermann Cc: freebsd-net@freebsd.org Subject: Re: Bug in net/route.[ch] with rmx_pksent while cloning In-Reply-To: <3CF6B748.E8CA7FC6@pipeline.ch> Message-ID: <20020530233919.K22164-100000@patrocles.silby.com> 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 On Fri, 31 May 2002, Andre Oppermann wrote: Ok, here we go. > if (req == RTM_RESOLVE) { > rt->rt_rmx = (*ret_nrt)->rt_rmx; /* copy metrics */ > + rt->rt_rmx.rmx_pksent = 0; /* reset packet counter */ This has been committed to -current, and will be MFC'd after 4.6-release is tagged and away. I guess this could really throw stats off for some people, good catch! > - int rtm_use; /* from rtentry */ > + u_long rtm_use; /* from rtentry */ On i386 systems, making such a change should be safe, as int and u_long are both 32 bits, if I recall correctly. However, changing this will change the size of the structure on 64-bit architectures, so I'm not sure I want to touch it. I know that if you change the size of rtentry, you need to recompile route to match the kernel if you want any routing functions to work. Will similar breakage occur if rt_msghdr is changed? I agree that your change is correct, I just don't want to break anything in the process of making it better. :) > - printf("%6ld %8ld ", rt->rt_refcnt, rt->rt_use); > + printf("%6ld %8lu ", rt->rt_refcnt, rt->rt_use); Also committed and slated for MFC. Mike "Silby" Silbersack To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message