From owner-cvs-src-old@FreeBSD.ORG Mon Apr 6 10:09:38 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C63D1065673 for ; Mon, 6 Apr 2009 10:09:38 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2A9EC8FC18 for ; Mon, 6 Apr 2009 10:09:38 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n36A9c0O042660 for ; Mon, 6 Apr 2009 10:09:38 GMT (envelope-from rrs@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n36A9cBD042659 for cvs-src-old@freebsd.org; Mon, 6 Apr 2009 10:09:38 GMT (envelope-from rrs@repoman.freebsd.org) Message-Id: <200904061009.n36A9cBD042659@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to rrs@repoman.freebsd.org using -f From: Randall Stewart Date: Mon, 6 Apr 2009 10:09:20 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sbin/route route.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2009 10:09:38 -0000 rrs 2009-04-06 10:09:20 UTC FreeBSD src repository Modified files: sbin/route route.c Log: SVN rev 190758 on 2009-04-06 10:09:20Z by rrs 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 Revision Changes Path 1.88 +17 -16 src/sbin/route/route.c