From owner-cvs-src@FreeBSD.ORG Mon Oct 29 00:08:24 2007 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7800C16A41B; Mon, 29 Oct 2007 00:08:24 +0000 (UTC) (envelope-from mtm@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6906113C465; Mon, 29 Oct 2007 00:08:24 +0000 (UTC) (envelope-from mtm@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l9T08ORs067360; Mon, 29 Oct 2007 00:08:24 GMT (envelope-from mtm@repoman.freebsd.org) Received: (from mtm@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l9T08Odw067359; Mon, 29 Oct 2007 00:08:24 GMT (envelope-from mtm) Message-Id: <200710290008.l9T08Odw067359@repoman.freebsd.org> From: Mike Makonnen Date: Mon, 29 Oct 2007 00:08:24 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sbin/route route.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2007 00:08:24 -0000 mtm 2007-10-29 00:08:24 UTC FreeBSD src repository Modified files: sbin/route route.c Log: Fix an error in bit shifting logic for network addresses. The route command would add incorrect routing entries if network numbers weren't fully "spelled" out according to their class. For example: # route add 128.0/16 (works) # route add 128/16 (doesn't work) # route add 193.0.0/24 (works) # route add 193/24 (doesn't work) Also, rework the way a netmask is deduced from network number if it [netmask] is not specified. Submitted by: Nuno Antunes (mostly) MFC after: 1 week Revision Changes Path 1.82 +24 -20 src/sbin/route/route.c