From owner-cvs-src@FreeBSD.ORG Tue May 16 19:11:28 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E724416B073; Tue, 16 May 2006 19:11:28 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B075D43D5D; Tue, 16 May 2006 19:11:28 +0000 (GMT) (envelope-from qingli@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k4GJBBuJ076698; Tue, 16 May 2006 19:11:11 GMT (envelope-from qingli@repoman.freebsd.org) Received: (from qingli@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k4GJBBdG076697; Tue, 16 May 2006 19:11:11 GMT (envelope-from qingli) Message-Id: <200605161911.k4GJBBdG076697@repoman.freebsd.org> From: Qing Li Date: Tue, 16 May 2006 19:11:11 +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/sys/net 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: Tue, 16 May 2006 19:11:38 -0000 qingli 2006-05-16 19:11:11 UTC FreeBSD src repository Modified files: sys/net route.c Log: The current routing code allows insertion of indirect routes that have gateways which are unreachable except through the default router. For example, assuming there is a default route configured, and inserting a route "route add 64.102.54.0/24 60.80.1.1" is currently allowed even when 60.80.1.1 is only reachable through the default route. However, an error is thrown when this route is utilized, say, "ping 64.102.54.1" will return an error This type of route insertion should be disallowed becasue: 1) Let's say that somehow our code allowed this packet to flow to the default router, and the default router knows the next hop is 60.80.1.1, then the question is why bother inserting this route in the 1st place, just simply use the default route. 2) Since we're not talking about source routing here, the default router could very well choose a different path than using 60.80.1.1 for the next hop, again it defeats the purpose of adding this route. Reviewed by: ru, gnn, bz Approved by: andre Revision Changes Path 1.116 +19 -0 src/sys/net/route.c