From owner-freebsd-net@FreeBSD.ORG Sun Oct 24 16:48:48 2004 Return-Path: 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 B8FBE16A4CE for ; Sun, 24 Oct 2004 16:48:48 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D5DF43D2F for ; Sun, 24 Oct 2004 16:48:48 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.208] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CLlXx-0007bS-00; Sun, 24 Oct 2004 18:48:46 +0200 Received: from [84.128.128.40] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1CLlXx-0004gP-00; Sun, 24 Oct 2004 18:48:46 +0200 From: Max Laier To: Gilbert Cao Date: Sun, 24 Oct 2004 18:48:28 +0200 User-Agent: KMail/1.7 References: <20041024144754.GA1670@bsdmon.com> <200410241722.34910.max@love2party.net> <20041024160235.GA1016@bsdmon.com> In-Reply-To: <20041024160235.GA1016@bsdmon.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart6540196.794D3IZyG3"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200410241848.35446.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 cc: freebsd-net@freebsd.org Subject: Re: Kernel panic with pf X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Oct 2004 16:48:48 -0000 --nextPart6540196.794D3IZyG3 Content-Type: multipart/mixed; boundary="Boundary-01=_ez9eB3CzEWHq24F" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_ez9eB3CzEWHq24F Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 24 October 2004 18:02, Gilbert Cao wrote: > On Sun, Oct 24, 2004 at 05:22:27PM +0200, Max Laier wrote: > > Are you running with debug.mpsafenet=3D0? In order to use user/group ru= le > > modificators you have to run with debug.mpsafenet=3D0 as there is a pro= blem > > with locks. This is mentioned in the BUGS section of pf.conf(5). Please > > tell me if the problem is persistent with debug.mpsafenet turned off. > > > > Thanks. > > I have debug.mpsafenet=3D1 when my kernel panics, > but I just have the same problem with debug.mpsafenet=3D0 in > /boot/loader.conf ... Hmmm ... that's bad. Can you please test the attached patch. It is a wild=20 guess as I am currently not able to test. Please tell me if it helps. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --Boundary-01=_ez9eB3CzEWHq24F Content-Type: text/x-diff; charset="iso-8859-1"; name="pf.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pf.c.diff" Index: pf.c =================================================================== RCS file: /usr/store/mlaier/fcvs/src/sys/contrib/pf/net/pf.c,v retrieving revision 1.18.2.2 diff -u -r1.18.2.2 pf.c --- pf.c 3 Oct 2004 17:04:39 -0000 1.18.2.2 +++ pf.c 24 Oct 2004 16:45:33 -0000 @@ -2506,6 +2506,11 @@ } #ifdef __FreeBSD__ INP_LOCK(inp); + if ((inp->inp_socket == NULL) || (inp->inp_socket->so_cred == NULL)) { + INP_UNLOCK(inp); + INP_INFO_RUNLOCK(pi); + return (0); + } *uid = inp->inp_socket->so_cred->cr_uid; *gid = inp->inp_socket->so_cred->cr_groups[0]; INP_UNLOCK(inp); --Boundary-01=_ez9eB3CzEWHq24F-- --nextPart6540196.794D3IZyG3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBe9zjXyyEoT62BG0RAns+AJ9g6kemq3w1u1YUlDBlPc6y+TxsvgCePdR+ o7yI7P1a/Tht8RW1Bp5eHF0= =/4LZ -----END PGP SIGNATURE----- --nextPart6540196.794D3IZyG3--