summaryrefslogtreecommitdiffstats
path: root/isisd/isis_adjacency.c
diff options
context:
space:
mode:
authorPeter Szilagyi <peszilagyi@gmail.com>2009-04-13 13:31:14 +0200
committerDavid Lamparter <equinox@diac24.net>2010-02-03 05:09:28 +0100
commit10860f3ba4ab6a39bf41c01e90b06122f347765a (patch)
tree4bf3fc75ec28be43dfb7bbbd13cab52482d18468 /isisd/isis_adjacency.c
parente3cd2efcf2c46825ea0a3f5962df581f37d5ebc6 (diff)
downloadquagga-10860f3ba4ab6a39bf41c01e90b06122f347765a.tar.bz2
quagga-10860f3ba4ab6a39bf41c01e90b06122f347765a.tar.xz
isisd: fixes 4/7: circuit state machine
isisd has a so-called circuit state machine that takes care about the interface state changes, such as initializing, down, up. When an interface was brought down by a link failure, the interface information was deleted and set to NULL. When the link was restored later, the interface was looked up by the old pointer, but since it was cleared, it was never found again, resulting in an interface never entering the up state again. Also, the program regularly crashed because of a deleted pointer in the same context which was later accessed without any further checking. Signed-off-by: Fritz Reichmann <fritz@reichmann.nl>
Diffstat (limited to 'isisd/isis_adjacency.c')
-rw-r--r--isisd/isis_adjacency.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/isisd/isis_adjacency.c b/isisd/isis_adjacency.c
index aab8d1a3..de34bea9 100644
--- a/isisd/isis_adjacency.c
+++ b/isisd/isis_adjacency.c
@@ -172,7 +172,7 @@ isis_adj_state_change (struct isis_adjacency *adj, enum isis_adj_state state,
circuit->upadjcount[level - 1]++;
if (state == ISIS_ADJ_DOWN)
{
- isis_delete_adj (adj, adj->circuit->u.bc.adjdb[level - 1]);
+ listnode_delete (adj->circuit->u.bc.adjdb[level - 1], adj);
circuit->upadjcount[level - 1]--;
}