[quagga-dev 7398] Re: [PATCH 0/7] ospfd: Fix and cleanup nbrs

Joakim Tjernlund joakim.tjernlund at transmode.se
Sat Nov 21 11:53:16 GMT 2009

Bartek Kania <mrbk at gnarf.org> wrote on 21/11/2009 11:39:39:
> Hash: SHA256
> On Thu, 19 Nov 2009, Joakim Tjernlund wrote:
> > Bartek, here you have a bunch of patches to test :)
> > The most interseting for your problem is:
> > ospfd: Self nbrs needs to be rebuilt when router ID changes.
> > Please try all patches and if there are problems, back out
> > one pacth at the time, starting from 7 and work your
> > way backwards.
> Hi!
> I've applied all patches and the problem persists.
> However I think the valgrind traces are a bit different. The traces
> include "ospf_router_id_update()"
> I've attached the trace to this email.
> Your patches don't seem to break anything that wasn't broken
> before. So at least they didn't make it worse =)
> Do you still want me to back them out one by one and see if anything
> changes?

Nope, I found the problem I think.

> Other tests
>    Not setting a router-id, ospfd crashes.
>    Setting router-id in ospfd.conf, ospfd works fine.
>    Setting router-id in zebra.conf, ospfd crashes.
>    Starting ospfd without a vlink, ospfd works fine.
>    Adding "area virtual-link x.y.A.B" after ospfd is started
>    via vtysh, ospfd still works fine and vlink connects as it should.
>    THe problem only appears when ospfd is started with no router-id def
>    in the config, and a vlink in the config. If router-id is present or
>    vlink is configured after ospfd start then all is good.
> So it appears that some neighbors are created before ospfd decides
> what router-id it has and then ospfd gets confused or somesuch.

This all confirm my theory but the fix was somewhat wrong :)
cold you change patch ospfd: Self nbrs needs to be rebuilt when router ID changes.
+		   ospf_nbr_delete(oi->nbr_self);
+		   ospf_nbr_add_self(oi);
+		   ospf_nbr_delete(oi->nbr_self);
+		   oi->nbr_self = ospf_nbr_new (oi);
+		   ospf_nbr_add_self(oi);

Will be offline as of tomorrow until Thursday.

More information about the Quagga-dev mailing list