[quagga-dev 1295] Re: ospfd dies -- bug in ospf_spf_consider_nexthop
Andrew J. Schorr
aschorr at telemetry-investments.com
Fri Jun 18 16:04:00 BST 2004
On Fri, Jun 18, 2004 at 03:10:43AM +0600, Kir Kostuchenko wrote:
> We can see dumb error in deleting list element in the LIST_LOOP:
> ospf_spf_consider_nexthop() function after listnode_delete (nexthops, hop);
That certainly does look like a bug to me (accessing the node
after it was deleted).
However, you replaced the call to listnode_delete with a call
to the macro LISTNODE_DELETE (which is smart, there's no need to search
the list), but the LISTNODE_DELETE macro does not actually delete
the node (if you look at the macro, it removes the links but fails
to call listnode_free).
It looks like the LISTNODE_DELETE macro is never actually used anywhere
in quagga, so it's probably just a bug in that macro. It might
make sense to patch the macro to call listnode_free, and to
patch the linklist.c:listnode_delete() function to use the macro.
More information about the Quagga-dev