From owner-freebsd-bugs@FreeBSD.ORG Fri Jan 3 17:27:12 2014 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FDD0DDB; Fri, 3 Jan 2014 17:27:12 +0000 (UTC) Received: from mail.ipfw.ru (mail.ipfw.ru [IPv6:2a01:4f8:120:6141::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BDB4E10D8; Fri, 3 Jan 2014 17:27:11 +0000 (UTC) Received: from secured.by.ipfw.ru ([95.143.220.47] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1Vz4hI-000BNB-V0; Fri, 03 Jan 2014 17:21:57 +0400 Message-ID: <52C6F2E2.4000709@FreeBSD.org> Date: Fri, 03 Jan 2014 21:26:58 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130728 Thunderbird/17.0.7 MIME-Version: 1.0 To: Nikolay Denev Subject: Re: misc/185092: panic: rtfree 2 (using RADIX_MPATH in a VNET jail) References: <201312221304.rBMD4q38060416@oldred.freebsd.org> <201312221310.rBMDA0KH022980@freefall.freebsd.org> In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: multipart/mixed; boundary="------------010209010603090701000503" Cc: "freebsd-net@freebsd.org" , freebsd-bugs@freebsd.org, FreeBSD-gnats-submit@freebsd.org X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jan 2014 17:27:12 -0000 This is a multi-part message in MIME format. --------------010209010603090701000503 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Please check if attached patch solves your issues. This fix is temporary, more proper one is on the way. --------------010209010603090701000503 Content-Type: text/x-patch; name="radix_mpath.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="radix_mpath.diff" Index: route.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- route.c (revision 260226) +++ route.c (working copy) @@ -943,9 +992,20 @@ register struct radix_node *rn; int error =3D 0; =20 - rn =3D rnh->rnh_matchaddr(dst, rnh); + rn =3D rnh->rnh_lookup(dst, netmask, rnh); if (rn =3D=3D NULL) return (ESRCH); + + if (netmask =3D=3D NULL) { + /* + * Check 'perfect match' case + */ + if (!sa_equal(dst, rn->rn_key)) + return (ESRCH); + if (rn->rn_mask !=3D NULL) + return (ESRCH); + } + rto =3D rt =3D RNTORT(rn); rt =3D rt_mpath_matchgate(rt, gateway); if (rt =3D=3D NULL) --------------010209010603090701000503--