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

[-- Attachment #1 --]
Please check if attached patch solves your issues.

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

[-- Attachment #2 --]
Index: route.c
===================================================================
--- route.c	(revision 260226)
+++ route.c	(working copy)
@@ -943,9 +992,20 @@
 	register struct radix_node *rn;
 	int error = 0;
 
-	rn = rnh->rnh_matchaddr(dst, rnh);
+	rn = rnh->rnh_lookup(dst, netmask, rnh);
 	if (rn == NULL)
 		return (ESRCH);
+
+	if (netmask == NULL) {
+		/*
+		 * Check 'perfect match' case
+		 */
+		if (!sa_equal(dst, rn->rn_key))
+			return (ESRCH);
+		if (rn->rn_mask != NULL)
+			return (ESRCH);
+	}
+
 	rto = rt = RNTORT(rn);
 	rt = rt_mpath_matchgate(rt, gateway);
 	if (rt == NULL)

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