From owner-freebsd-net@FreeBSD.ORG Wed Sep 5 17:31:15 2007 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 C6EEF16A419 for ; Wed, 5 Sep 2007 17:31:15 +0000 (UTC) (envelope-from ivo.vachkov@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.228]) by mx1.freebsd.org (Postfix) with ESMTP id 813EA13C465 for ; Wed, 5 Sep 2007 17:31:15 +0000 (UTC) (envelope-from ivo.vachkov@gmail.com) Received: by wx-out-0506.google.com with SMTP id i29so1960266wxd for ; Wed, 05 Sep 2007 10:30:59 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UcRB0iuCMAZS545VPjr5VwtRFJpYZfqiwJ7sMFXGy5nhYJPFFcxIvEwLsUi7tyuYjnbTJrWEH5dKA/0grkJvmuAmeZEiwQbwrQjnXDSsDr7VZ2ViJVR4GGviupmCQnIZDqjTDg1cPr0LtFg1Q8cdgLdiF/dhEbzZrIHLCuQrzz4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=q9vljca5J29TtTk0qRetsZ10GoyBaE3RUp0ESKquxmCEuGdE3sdiiVvCSj+NMSVB/Q/6TlTx8DTHhQQwlyZ2PKPmoZHK1pL3Jytbm7KRuFnAAIar59S+Wf3cBNnTB+VItWy2U0Jrso+GYWo60i4JMhscz5+7Pla3sBsuhsBRWB0= Received: by 10.90.75.10 with SMTP id x10mr337247aga.1189013459213; Wed, 05 Sep 2007 10:30:59 -0700 (PDT) Received: by 10.90.114.13 with HTTP; Wed, 5 Sep 2007 10:30:59 -0700 (PDT) Message-ID: Date: Wed, 5 Sep 2007 20:30:59 +0300 From: "Ivo Vachkov" To: freebsd-net In-Reply-To: <46DEC668.50509@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <46DD2A1E.3060109@FreeBSD.org> <46DEC668.50509@FreeBSD.org> Subject: Re: Network stack locking question 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, 05 Sep 2007 17:31:15 -0000 On 9/5/07, Bruce M. Simpson wrote: > You need to remember to drop the lock which rtalloc() acquires on your > behalf using RTFREE() before leaving the function or possibly calling a > function which needs exclusive/write access to the rtentry. > > If your code needs this rtentry to remain in the system, a call to > RT_ADDREF() with the lock held may be necessary, although you should > remember to RT_REMREF() with the lock held when done with the rtentry. > > See =ABnet/route.h=BB for more info. actually, a simple bzero(&out_rt, sizeof(struct route_in6)); (i'll test it tonight with just a 'out_rt.ro_rt =3D NULL;') fixed the problem. > regards, > BMS > thanks again for the help.