From owner-freebsd-net@FreeBSD.ORG Wed Jul 6 14:47:44 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 255F216A41C for ; Wed, 6 Jul 2005 14:47:44 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from mrout1.yahoo.com (mrout1.yahoo.com [216.145.54.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id 023E643D46 for ; Wed, 6 Jul 2005 14:47:43 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from minion.local.neville-neil.com (proxy7.corp.yahoo.com [216.145.48.98]) by mrout1.yahoo.com (8.13.4/8.13.4/y.out) with ESMTP id j66Ek0bb095849 for ; Wed, 6 Jul 2005 07:46:01 -0700 (PDT) Date: Wed, 06 Jul 2005 23:46:00 +0900 Message-ID: From: gnn@freebsd.org To: freebsd-net@freebsd.org User-Agent: Wanderlust/2.12.2 (99 Luftballons) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/21.2 (powerpc-apple-darwin) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Subject: A bit of a route socket bug... X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2005 14:47:44 -0000 Howdy, As was reported in http://www.freebsd.org/cgi/query-pr.cgi?pr=%0D%0A82974 if you do route change 10.3.2.1 127.0.0.1 on a system with a default route but no route on the 10 network at all, you wind up setting the default route to 127.0.0.1 which is rarely what you want. This is due to the fact that in rtsock.c around line 431 (in CURRENT) we do a rnh_lookup but don't make sure that the route we looked up was the one we sought. The radix code correctly finds the most useful route to 10.3.2.1, i.e the default route, and the dutifully hoses it. The question is, "What's the right fix here?" Right now I'm too tired to figure it out, so I figure in the 8 hours I'm asleep someone else might come up with a patch :-) Later, George