]> git.proxmox.com Git - mirror_frr.git/commit - ospfd/ospf_spf.c
ospfd: avoid exhausting memory with OSPF vertices (BZ#476)
authorDavid Lamparter <equinox@opensourcerouting.org>
Mon, 23 Jul 2012 16:17:57 +0000 (18:17 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Wed, 25 Jul 2012 16:02:31 +0000 (18:02 +0200)
commit7b92589c225ae46417fc3fa0714a1b6f53f19c51
tree38e1add198ee857211684250858a3b946c05c6a9
parentaa5cf24b9de96245f2166ef1c4e9612890ced1b3
ospfd: avoid exhausting memory with OSPF vertices (BZ#476)

This was found in scale testing at OSR;  ospfd is adding the same link
over and over again to the SPF tree.  This fix prevents the resulting
memory corruption from happening and adds a debug message to track
occurence of this issue and/or confirm a proper fix.

(This version was improved by Scott Feldman over the earlier RFC.)

* ospfd/ospf_spf.c: (ospf_spf_add_parent) loop over existing vertices
  and refuse to add duplicates.

Tested-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
ospfd/ospf_spf.c