[PATCH] Fix Bird/Bird6 wrong LSA collisions detection

Ondrej Zajicek santiago at crfreenet.org
Tue Nov 6 16:15:34 CET 2018


On Tue, Nov 06, 2018 at 08:53:35AM +0000, Mikkelsen, Asbjorn wrote:
> Bird/Bird6 can wrongly report wrong LSA collisions and stop working. A route
> fib can in certain cases be released (believing nobody are using them) and
> still be used (but not dereferenced).
> 
> A PR can be found here:
> https://github.com/BIRD/bird/pull/3

Hi

Thanks for the patch, i have some questions:

1) Am i understand correctly the cause that there is struct top_hash_entry
and associated struct ort entry, but struct ort entry got removed while
struct top_hash_entry still links to it, so when new struct ort for given
network is allocated, it is technically different from old one and that
cause the collision?

2) The comment says that nf is NULL in this case:

  if (!en->nf || !en->lsa_body)
    en->nf = lsa->nf;

  if (en->lsa_body && (en->lsa.age == LSA_MAXAGE))
  {
    /* en could be an unexpected self-originated lsa in which case nf is NULL */
    log(L_INFO "%s: Found flushing LSA while originating %I/%d with fib: %p",
      p->p.name, lsa->nf->fn.prefix, lsa->nf->fn.pxlen, en->nf);
    en->nf = lsa->nf;
  }

But if en->nf is null, the issue is handled by the first condition above,
so the second condition is not necessary? So i assume the comment is not
correct?


3) There are some unrelated OSPF_TRACE() to log(L_INFO) changes in the
patch, could be removed?


4) Who the patch should be attributed to? To you (as per commit), or to
@jcharbon (as noted in the comment in the PR)?

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."


More information about the Bird-users mailing list