From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 15:09:23 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 E9E3F1065754 for ; Mon, 6 Apr 2009 15:09:23 +0000 (UTC) (envelope-from cokane@FreeBSD.org) Received: from mail-out2.fuse.net (mail-out2.fuse.net [216.68.8.171]) by mx1.freebsd.org (Postfix) with ESMTP id A9B208FC21 for ; Mon, 6 Apr 2009 15:09:23 +0000 (UTC) (envelope-from cokane@FreeBSD.org) X-CNFS-Analysis: v=1.0 c=1 a=yWHZTcLBkW0A:10 a=JrIlpGgeJDMA:10 a=6I5d2MoRAAAA:8 a=t2WoRTrMK5oZo7IxT4EA:9 a=_pUQ5zzRPM-F0prS8s8A:7 a=PyLuERE6lk2IZQIH2caW8wILcSQA:4 a=LY0hPdMaydYA:10 a=-Ntob9ACUMHZU6Pd:21 a=kvL1sugTb9cZYlzz:21 a=1fHtYjTDPEesxH8vWskA:9 a=cQ7BgO7rXyB3LoBiE7m5dvrayhsA:4 a=rPt6xJ-oxjAA:10 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Authentication-Results: gwout2 smtp.mail=cokane@FreeBSD.org; spf=softfail Received-SPF: softfail (gwout2: transitional domain FreeBSD.org does not designate 74.215.227.9 as permitted sender) Received: from [74.215.227.9] ([74.215.227.9:50955] helo=mail.cokane.org) by gwout2 (envelope-from ) (ecelerity 2.2.2.37 r(28805/28810M)) with ESMTP id FE/B0-25989-22B1AD94; Mon, 06 Apr 2009 11:09:22 -0400 Received: from [10.128.128.2] (unknown [10.128.128.2]) by mail.cokane.org (Postfix) with ESMTPSA id 29C4B1143C; Mon, 6 Apr 2009 12:14:19 -0400 (EDT) From: Coleman Kane To: Randall Stewart In-Reply-To: <200904061427.n36ERTVF074015@svn.freebsd.org> References: <200904061427.n36ERTVF074015@svn.freebsd.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-ppb+PrdMf9zgXtHOMppw" Organization: FreeBSD Project Date: Mon, 06 Apr 2009 11:07:39 -0400 Message-Id: <1239030459.1946.4.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 FreeBSD GNOME Team Port Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r190775 - 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 15:09:24 -0000 --=-ppb+PrdMf9zgXtHOMppw Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 2009-04-06 at 14:27 +0000, Randall Stewart wrote: > Author: rrs > Date: Mon Apr 6 14:27:28 2009 > New Revision: 190775 > URL: http://svn.freebsd.org/changeset/base/190775 >=20 > Log: > Ok, looking at the solution a bit closer, the level > calculation was too agressive. Instead we should only > look at each nibble. This makes it so we make > 10.2.0.0 become 10.2/16 NOT 10.2/17. I presume you meant "NOT 10.2/15" here? Correct me if I'm wrong, but that's what I gathered by the discussion of "the bug" in the previous thread. > =20 > Need to explore the non-cidr address issue. The two > may not be seperable.. > =20 > MFC after: 1 week >=20 > Modified: > head/sbin/route/route.c >=20 > Modified: head/sbin/route/route.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sbin/route/route.c Mon Apr 6 14:12:22 2009 (r190774) > +++ head/sbin/route/route.c Mon Apr 6 14:27:28 2009 (r190775) > @@ -808,15 +808,15 @@ inet_makenetandmask(net, sin, bits) > * CIDR address. > */ > if ((bits =3D=3D 0) && (addr !=3D 0)) { > - int i, j; > - for(i=3D0,j=3D1; i<32; i++) { > + u_long i, j; > + for(i=3D0,j=3D0xff; i<4; i++) { > if (addr & j) { > break; > } > - j <<=3D 1; > + j <<=3D 8; > } > /* i holds the first non zero bit */ > - bits =3D 32 - i;=09 > + bits =3D 32 - (i*8);=09 > } > mask =3D 0xffffffff << (32 - bits); > =20 --=20 Coleman Kane --=-ppb+PrdMf9zgXtHOMppw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAknaGrgACgkQcMSxQcXat5ciAwCfeyrBjKtTQBb9zKghtVf4kmQ0 ALEAnifpZqjeplB5uCE3Akq1bzBB20pe =kPs7 -----END PGP SIGNATURE----- --=-ppb+PrdMf9zgXtHOMppw--