From owner-freebsd-net@FreeBSD.ORG Thu May 29 18:14:38 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 228671065676 for ; Thu, 29 May 2008 18:14:38 +0000 (UTC) (envelope-from steveleroy123@gmail.com) Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.185]) by mx1.freebsd.org (Postfix) with ESMTP id 8BFB98FC18 for ; Thu, 29 May 2008 18:14:36 +0000 (UTC) (envelope-from steveleroy123@gmail.com) Received: by gv-out-0910.google.com with SMTP id n8so1037783gve.39 for ; Thu, 29 May 2008 11:14:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=BvDcrDu97SVKpRi5cKtV66lKonOv8RvVWKtSCTdo9Xw=; b=dNXixpWk6BO7F1EwDjiwBTFJ01APzk9FGE0WzCMaDhMffcemcA5lO6wKQThXYVyt/kAE3zB0ADmXfk6pYI9Je3OHLMEEI125wJqY/CA6k2EqCKnouNJgHYEj8XY5EJDlIvENjB8Xp5vK5/vx/wAM9k1SKcstnRyjdefrCSd39UY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=KICHBwXaE+ckcOq5wJKu1G9Aew1w2NvQz6vCloaQ8NE2LPlRPvgJPiOp8sSH3Dq8N6fgKE82+rDdriBZQESn3Cb5wVTcel+297yOChDHTrP6elz6a4GaG4ePd0TyxTVtS8OfnBRoF2avledYX1/ntWRclC9dEZy4s3NdpdY10KA= Received: by 10.78.183.8 with SMTP id g8mr948226huf.118.1212083186701; Thu, 29 May 2008 10:46:26 -0700 (PDT) Received: by 10.78.121.20 with HTTP; Thu, 29 May 2008 10:46:25 -0700 (PDT) Message-ID: Date: Thu, 29 May 2008 23:16:25 +0530 From: "stephen leroy" To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: FreeBSD 5.4: routetbl leak for a static route if the interface address is removed 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: Thu, 29 May 2008 18:14:38 -0000 Hi. I am using FreeBSD 5.4. with a ethernet interface configured with an IP address. I have installed a static route with a gateway that lies on that interface's subnet. So I now effectively have 3 routes on that interface, the interface's subnet route, the static route, and an ARP entry for the gateway. When I delete the IP address on that interface, I expect all the 3 routes to be removed and routetbl count to go down correspondingly. However, it gets decremented by 1, accounting only for the interface's subnet route, and not for the static route and the arp. I found that in in_ifadownkill() which is invoked on deletion of the IP address, there's a call to rtexpunge(), which frees up the references to the rtentry, but does not actually call an rtfree. I would like to know who will free the rtentry for the route cleaned up by rtexpunge. - Steve