Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Jan 2014 18:05:46 +0400
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        melifaro@FreeBSD.org
Cc:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/185092: panic: rtfree 2 (using RADIX_MPATH in a VNET jail)
Message-ID:  <52C6C3BA.8050600@FreeBSD.org>
In-Reply-To: <201401021334.s02DYvaw069064@freefall.freebsd.org>
References:  <201401021334.s02DYvaw069064@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------010201000905080404010002
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Please check if attached patch solves your issues.

This fix is temporary, more proper one is on the way.

--------------010201000905080404010002
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)

--------------010201000905080404010002--



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