[quagga-dev 4595] Re: [quagga-users 7979] Re: quagga-0.99.6: ripd does not increment metric(FreeBSD)

Andrew J. Schorr aschorr at telemetry-investments.com
Tue Feb 27 15:26:27 GMT 2007


On Thu, Jan 25, 2007 at 11:24:42PM +0700, Eugene Grosbein wrote:
> On Thu, Jan 25, 2007 at 09:41:24PM +0700, Eugene Grosbein wrote:
> 
> > > The bug is in zebra daemon, not in ripd.
> > > Zebra supplies ripd with wrong interface metric.
> > > 
> > > Here is a patch:
> > > 
> > > --- zebra/kernel_socket.c.orig  Thu Jan 25 17:40:54 2007
> > > +++ zebra/kernel_socket.c       Thu Jan 25 17:40:21 2007
> > > @@ -585,7 +585,7 @@
> > >    if (ifnlen && strncmp (ifp->name, ifname, INTERFACE_NAMSIZ))
> > >      isalias = 1;
> > >    
> > > -  ifp->metric = ifam->ifam_metric;
> > > +  ifp->metric = ifam->ifam_metric == 0 ? 1 : ifam->ifam_metric;
> > >    
> > >    /* Add connected address. */
> > >    switch (sockunion_family (&addr))
> > > 
> > > The reason is that FreeBSD kernel returns 0 with sysctl
> > > and it is not correct to use this zero value as increment value for RIP.
> > 
> > However, this patch is 'beta' (better than nothing) quality
> > as it still does not inherit interface metric from the kernel
> > Besides, here we have some kind of regression - I remember that
> > previos versions of quagga did utilize kernel interface metric
> > for FreeBSD.
> 
> I've just checked and found that quagga-0.99.2 does use
> kernel interface metric and quagga-0.99.3 (and later) does not.
> Hope this helps.

Does anybody have any insight into whether this patch is correct?
I don't use BSD...

Regards,
Andy



More information about the Quagga-dev mailing list