[quagga-dev 11698] Re: [PATCH V2] zebra: MBGP routes should not be installed in the kernel

David Lamparter equinox at opensourcerouting.org
Thu Oct 30 11:28:32 GMT 2014


On Mon, Oct 27, 2014 at 05:05:53PM -0200, Everton Marques wrote:
> On Thu, Oct 23, 2014 at 2:25 PM, Balaji.G <balajig81 at gmail.com> wrote:
> > MBGP routes are used only for PIM RPF checks and hence should
> > not be installed in the kernel's FIB. Ignore route node set to Multicast
> > SAFI.

Almost forgot the "Applied, thanks!" on this.

I moved down one bit:

> >
> > Signed-off-by: Balaji.G <balajig81 at gmail.com>
> > ---
> >  zebra/zebra_rib.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
> > index dc7e1ca..3f393d9 100644
> > --- a/zebra/zebra_rib.c
> > +++ b/zebra/zebra_rib.c
> > @@ -1249,6 +1249,7 @@ rib_process (struct route_node *rn)
> >    struct nexthop *nexthop = NULL, *tnexthop;
> >    int recursing;
> >    char buf[INET6_ADDRSTRLEN];

This:

> > +  rib_table_info_t *info = rn->table->info;
> >
> >    assert (rn);

is now below the assert, like:
  rib_table_info_t *info;
  assert (rn);
  info = rn->table->info;

because otherwise the assert is useless and will never trigger since
it'll already crash on rn->table deref if rn == NULL.


-David

> >
> > @@ -1286,6 +1287,9 @@ rib_process (struct route_node *rn)
> >        if (! nexthop_active_update (rn, rib, 0))
> >          continue;
> >
> > +      if (info->safi == SAFI_MULTICAST)
> > +       continue;
> > +
> >        /* Infinit distance. */
> >        if (rib->distance == DISTANCE_INFINITY)
> >          continue;
> > --
> > 1.9.1
> >
> >
> This fix is really needed.
> Only comment is the description could be more generic because it fixes MRIB
> routes installed from other sources than MBGP as well.
> 
> Everton

> _______________________________________________
> Quagga-dev mailing list
> Quagga-dev at lists.quagga.net
> https://lists.quagga.net/mailman/listinfo/quagga-dev





More information about the Quagga-dev mailing list