Comment 3 for bug 1426175

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/7951
Committed: http://github.org/Juniper/contrail-controller/commit/8faa77e791f22b43667702d7104cb9383c049dc7
Submitter: Zuul
Branch: R1.10

commit 8faa77e791f22b43667702d7104cb9383c049dc7
Author: Prakash Bailkeri <email address hidden>
Date: Mon Mar 2 02:10:06 2015 -0800

Don'tuse edge_id as IFMAPLink table key

"edge_id" is valid only when the edge is present in the graph.
In the current code, even after deleting the edge from the graph,
the edge_id(stored in DBGraphEdge) is used for compare and lookp.
This is a problem as we could be referring to freed/reused memory.

In the problem case, the edge_id gets reused for next IFMapLink/Edge that gets added to the graph.

Problem solution:
1. we don't use "edge_id" for tree compare function (i.e. edge_id is not a key for IFMapLink Table)
2. Use string (meta data + left node + right node) as key to IFMapLink table
3. Assert if "edge_id()" is invoked on deleted DBGraphEdge()

Closes-Bug: 1426175

Change-Id: I3f8d5041cf80900a43c365adc164e44acd5b5bc3