From owner-freebsd-current@FreeBSD.ORG Wed Aug 3 15:12:00 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAA3E106566C for ; Wed, 3 Aug 2011 15:12:00 +0000 (UTC) (envelope-from aboyer@averesystems.com) Received: from zimbra.averesystems.com (75-149-8-245-Pennsylvania.hfc.comcastbusiness.net [75.149.8.245]) by mx1.freebsd.org (Postfix) with ESMTP id 65D6D8FC08 for ; Wed, 3 Aug 2011 15:12:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra.averesystems.com (Postfix) with ESMTP id 0323D446002; Wed, 3 Aug 2011 11:14:52 -0400 (EDT) X-Virus-Scanned: amavisd-new at averesystems.com Received: from zimbra.averesystems.com ([127.0.0.1]) by localhost (zimbra.averesystems.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ix+AdqojZZRC; Wed, 3 Aug 2011 11:14:48 -0400 (EDT) Received: from riven.arriad.com (fw.arriad.com [10.0.0.16]) by zimbra.averesystems.com (Postfix) with ESMTPSA id C30B98BC001; Wed, 3 Aug 2011 11:14:48 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Andrew Boyer In-Reply-To: Date: Wed, 3 Aug 2011 11:11:56 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <92B5D566-9816-4134-9358-2306D0F7DAFC@averesystems.com> References: To: Svatopluk Kraus X-Mailer: Apple Mail (2.1084) Cc: Jeremiah Lott , freebsd-current@freebsd.org Subject: Re: [patch] Problem with two NIC on same NET (in_scrubprefix: err=17, new prefix add failed) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2011 15:12:00 -0000 We found and fixed a similar issue with an identical patch. It has been = working fine for us under stable/8. Unfortunately I am weeks and weeks behind on pushing fixes back to the = tree, so you had to duplicate the work. If it can be committed (and = MFC'd to 8, please) it would save others the trouble. -Andrew On Aug 3, 2011, at 10:51 AM, Svatopluk Kraus wrote: > I have two NIC on same NET (both are up). If a NIC which installs > network route is going down then an error happens during network route > replacement (in_scrubprefix: err=3D17, new prefix add failed). >=20 > I've done a little bit investigation. In rtinit1(), before > rtrequest1_fib() is called, info.rti_flags is initialized by flags > (function argument) or-ed with ifa->ifa_flags. Both NIC has a loopback > route to itself, so IFA_RTSELF is set on ifa(s). As IFA_RTSELF is > defined by RTF_HOST, rtrequest1_fib() is called with RTF_HOST flag > even if netmask is not NULL. Consequently, netmask is set to zero in > rtrequest1_fib(), and request to add network route is changed under > hands to request to add host route. It is the reason of logged info > and my problem. >=20 > When I've done more investigation, it looks similar to > http://svnweb.freebsd.org/base?view=3Drevision&revision=3D201543. So, = I > propose the following patch. >=20 > Index: sys/net/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 > --- sys/net/route.c (revision 224635) > +++ sys/net/route.c (working copy) > @@ -1478,7 +1478,7 @@ > */ > bzero((caddr_t)&info, sizeof(info)); > info.rti_ifa =3D ifa; > - info.rti_flags =3D flags | ifa->ifa_flags; > + info.rti_flags =3D flags | (ifa->ifa_flags & = ~IFA_RTSELF); > info.rti_info[RTAX_DST] =3D dst; > /* > * doing this for compatibility reason >=20 >=20 > Is the patch sufficient? >=20 > Svata > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to = "freebsd-current-unsubscribe@freebsd.org" -------------------------------------------------- Andrew Boyer aboyer@averesystems.com