From 7fd6cd819ff98f0580b745ba637990df9c20ef0f Mon Sep 17 00:00:00 2001 From: Peter Szilagyi Date: Sat, 1 Oct 2011 17:11:45 +0400 Subject: isisd: fix 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 --- isisd/isis_lsp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'isisd/isis_lsp.c') diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c index e12e4ca8..9db0db9d 100644 --- a/isisd/isis_lsp.c +++ b/isisd/isis_lsp.c @@ -2037,6 +2037,8 @@ lsp_tick (struct thread *thread) { for (ALL_LIST_ELEMENTS_RO (area->circuit_list, cnode, circuit)) { + if (circuit->state != C_STATE_UP) + continue; for (ALL_LIST_ELEMENTS_RO (lsp_list, lspnode, lsp)) { if (ISIS_CHECK_FLAG (lsp->SRMflags, circuit)) -- cgit v1.2.1