[quagga-dev 7835] Re: A mystery: Re: [PATCH 05/10] ospfd: remove unneeded memset from a very hot function

Joakim Tjernlund joakim.tjernlund at transmode.se
Sun Mar 7 17:45:09 GMT 2010


paul at jakma.org wrote on 2010/03/07 18:11:27:
>
> On Sat, 6 Mar 2010, Joakim Tjernlund wrote:
>
> > in ospf_lsdb_delete()
> > ...
> >  rn = route_node_lookup (table, (struct prefix *) &lp);
> >  if (rn && (rn->info == lsa))
> >    {
> >      ospf_lsdb_delete_entry (lsdb, rn);
> >      route_unlock_node (rn); /* route_node_lookup */
> >    }
> > should probably read:
> >  rn = route_node_lookup (table, (struct prefix *) &lp);
> >  if (rn)
> >    {
> >       if  (rn->info == lsa)
> >           ospf_lsdb_delete_entry (lsdb, rn);
> >       route_unlock_node (rn); /* route_node_lookup */
> >    }
>
> Ah, yes. Good catch.
>
> > ospf_lsdb_lookup_by_id_next()
> > Uses route_node_get() when it probably should use route_node_lookup()
> > route_node_get will create an empty node if there isn't a match.
>
> Oof, ouch.
>
> Looks like it's trying to do a "closest match", but yeah that's bad.
> Though, it can't explain the problem I've been seeing as I'm not
> using SNMP.
>
> Looks like the following changes might be in order, no (inc your
> suggestions):

BTW, does the bug trigger with only my suggestions? I am not clear on
if a NULL leaf that currently triggers the bug is allowed or not?

 Jocke




More information about the Quagga-dev mailing list