From owner-cvs-src@FreeBSD.ORG Thu Nov 6 17:47:53 2003 Return-Path: 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 C189C16A4CE; Thu, 6 Nov 2003 17:47:53 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 576C443FA3; Thu, 6 Nov 2003 17:47:53 -0800 (PST) (envelope-from sam@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hA71lrXJ086422; Thu, 6 Nov 2003 17:47:53 -0800 (PST) (envelope-from sam@repoman.freebsd.org) Received: (from sam@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hA71lrPS086421; Thu, 6 Nov 2003 17:47:53 -0800 (PST) (envelope-from sam) Message-Id: <200311070147.hA71lrPS086421@repoman.freebsd.org> From: Sam Leffler Date: Thu, 6 Nov 2003 17:47:53 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/netinet ip_input.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 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: Fri, 07 Nov 2003 01:47:53 -0000 sam 2003/11/06 17:47:53 PST FreeBSD src repository Modified files: sys/netinet ip_input.c Log: Fix locking of the ip forwarding cache. We were holding a reference to a routing table entry w/o bumping the reference count or locking against the entry being free'd. This caused major havoc (for some reason it appeared most frequently for folks running natd). Fix is to bump the reference count whenever we copy the route cache contents into a private copy so the entry cannot be reclaimed out from under us. This is a short term fix as the forthcoming routing table changes will eliminate this cache entirely. Supported by: FreeBSD Foundation Revision Changes Path 1.250 +21 -11 src/sys/netinet/ip_input.c