Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Aug 2011 13:28:13 +0800
From:      Kevin Lo <kevlo@FreeBSD.org>
To:        Andrew Boyer <aboyer@averesystems.com>
Cc:        Jeremiah Lott <jlott@averesystems.com>, freebsd-current@FreeBSD.org, Svatopluk Kraus <onwahe@gmail.com>
Subject:   Re: [patch] Problem with two NIC on same NET (in_scrubprefix: err=17, new prefix add failed)
Message-ID:  <1312781293.2521.1.camel@srgsec>
In-Reply-To: <92B5D566-9816-4134-9358-2306D0F7DAFC@averesystems.com>
References:  <CAFHCsPUpkr-vne%2B9cLnovUXDGeVrOzHrKp1YAub=TjJW_3aVtg@mail.gmail.com> <92B5D566-9816-4134-9358-2306D0F7DAFC@averesystems.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Andrew,

I just committed Svatopluk's fix to HEAD, thanks!

	Kevin

On Wed, 2011-08-03 at 11:11 -0400, Andrew Boyer wrote:
> 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=17, new prefix add failed).
> > 
> >  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.
> > 
> >  When I've done more investigation, it looks similar to
> > http://svnweb.freebsd.org/base?view=revision&revision=201543. So, I
> > propose the following patch.
> > 
> > Index: sys/net/route.c
> > ===================================================================
> > --- 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 = ifa;
> > -		info.rti_flags = flags | ifa->ifa_flags;
> > +		info.rti_flags = flags | (ifa->ifa_flags & ~IFA_RTSELF);
> > 		info.rti_info[RTAX_DST] = dst;
> > 		/*
> > 		 * doing this for compatibility reason
> > 
> > 
> >  Is the patch sufficient?
> > 
> >      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
> 
> 
> 
> 
> _______________________________________________
> 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"





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