From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 13:35:05 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4F3E10656D6; Mon, 6 Apr 2009 13:35:05 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:203:6dff:fe1a:4ddc]) by mx1.freebsd.org (Postfix) with ESMTP id 3D9408FC17; Mon, 6 Apr 2009 13:35:05 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from [10.1.1.53] ([10.1.1.53]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id n36DZ3Tv039681 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Mon, 6 Apr 2009 09:35:04 -0400 (EDT) (envelope-from rrs@lakerest.net) DKIM-Signature: a=rsa-sha1; c=simple/simple; d=lakerest.net; s=mail; t=1239024904; h=Cc:Message-Id:From:To:In-Reply-To:Content-Type: Content-Transfer-Encoding:Mime-Version:Subject:Date:References: X-Mailer; b=jub88AaxtNrZXzITqGo8lVsRBOMpdJITO2SDom/cNCWOlDXbNEsuEzE VdiJl4jgSza0AKejJGQgww5JDR58eVg== Message-Id: <8ACFDA96-746E-49C9-B562-65DF82CD361B@lakerest.net> From: Randall Stewart To: Alexander Motin In-Reply-To: <49D9DBED.6050805@FreeBSD.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Mon, 6 Apr 2009 09:35:03 -0400 References: <200904061009.n36A9K6l063517@svn.freebsd.org> <49D9DBED.6050805@FreeBSD.org> X-Mailer: Apple Mail (2.930.3) Cc: svn-src-head@FreeBSD.org, Randall Stewart , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r190758 - head/sbin/route X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2009 13:35:06 -0000 Hmm. On Apr 6, 2009, at 6:39 AM, Alexander Motin wrote: > Randall Stewart wrote: >> Author: rrs >> Date: Mon Apr 6 10:09:20 2009 >> New Revision: 190758 >> URL: http://svn.freebsd.org/changeset/base/190758 >> >> Log: >> Class based addressing went out in the early 90's. Basically >> if a entry is not route add -net xxx/bits then we should use >> the addr (xxx) to establish the number of bits by looking at >> the first non-zero bit. So if we enter >> route add -net 10.1.1.0 10.1.3.5 >> this is the same as doing >> route add -net 10.1.1.0/24 >> Since the 8th bit (zero counting) is set to 1 we set bits >> to 32-8. >> >> Users can of course still use the /x to change this behavior >> or in cases where the network is in the trailing part >> of the address, a "netmask" argument can be supplied to >> override what is established from the interpretation of the >> address itself. e.g: >> >> route add -net 10.1.1.8 -netmask 0xff00ffff >> >> should overide and place the proper CIDR mask in place. >> >> PR: 131365 >> MFC after: 1 week > > Are you sure that this is a good idea? Is this behavior > described/recommended somewhere? IMHO specifying network without > explicitly defined netmask is at least dangerous, if not wrong, in > present classless addressing time. Changing existing behavior breaks > POLA for some set of users, while benefits are not so obvious to me. > With previous code networks 10.0.0.0 and 11.0.0.0 were treated as /8, > but with this change it became /7 and /8 respectively. Well it is how CIDR works.. and cidr's been around since before 1997. I can go dig up the RFC's that specifu this if you woudl like > > > Author of the PR referred here expects network 192.168 to be treated > as > /16, but with your algorithm it will probably become /13. Drat... your right.. hmm. I need to go back and see how the old 6.0 stuff used to work properly.. R > > > -- > Alexander Motin > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct)