Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Jan 2014 21:26:58 +0400
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        Nikolay Denev <ndenev@gmail.com>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>, freebsd-bugs@freebsd.org, FreeBSD-gnats-submit@freebsd.org
Subject:   Re: misc/185092: panic: rtfree 2 (using RADIX_MPATH in a VNET jail)
Message-ID:  <52C6F2E2.4000709@FreeBSD.org>
In-Reply-To: <CA%2BP_MZGmZqeFjn73zXMN0_TrshAY6wRwx=75t8FbXHrj=eggig@mail.gmail.com>
References:  <201312221304.rBMD4q38060416@oldred.freebsd.org> <201312221310.rBMDA0KH022980@freefall.freebsd.org> <CA%2BP_MZHrGB0OdddCmhpOptA-sBUHOERCdjSfUFh20pJOQsZ7Kw@mail.gmail.com> <CA%2BP_MZEqn4iK%2BWC-ouVNFEhMrq2tpH91qgcT5zJyaUnX%2BkVn1g@mail.gmail.com> <CA%2BP_MZF4pMYqXV-BbrVfUjirfD7=qzr5Nz=k1NvOz6_wmT4GrQ@mail.gmail.com> <CA%2BP_MZGmZqeFjn73zXMN0_TrshAY6wRwx=75t8FbXHrj=eggig@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52C6F2E2.4000709>