From: Christian Franke Date: Thu, 15 Nov 2018 12:05:35 +0000 (+0100) Subject: fabricd: Fix flooding bug X-Git-Tag: frr-7.1-dev~169^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=253faee999ed4473a9183872d67b16d0ec8e303b;p=mirror%2Ffrr.git fabricd: Fix flooding bug Due to `lsp` getting shadowed, we would send each T0 its own LSP whenever we actually wanted to flood a different LSP. Fix this and set -Wshadow=local in my build environment. m( Signed-off-by: Christian Franke --- diff --git a/isisd/fabricd.c b/isisd/fabricd.c index 76c8087f2d..2b3116b1ff 100644 --- a/isisd/fabricd.c +++ b/isisd/fabricd.c @@ -585,17 +585,19 @@ void fabricd_lsp_flood(struct isis_lsp *lsp) while (!skiplist_next(f->neighbors, NULL, (void **)&n, &cursor)) { n->present = true; - struct isis_lsp *lsp = lsp_for_vertex(f->spftree, n->vertex); - if (!lsp || !lsp->tlvs || !lsp->tlvs->spine_leaf) - continue; - - if (!lsp->tlvs->spine_leaf->has_tier - || lsp->tlvs->spine_leaf->tier != 0) + struct isis_lsp *node_lsp = lsp_for_vertex(f->spftree, + n->vertex); + if (!node_lsp + || !node_lsp->tlvs + || !node_lsp->tlvs->spine_leaf + || !node_lsp->tlvs->spine_leaf->has_tier + || node_lsp->tlvs->spine_leaf->tier != 0) { continue; + } if (isis->debugs & DEBUG_FABRICD_FLOODING) { zlog_debug("Moving %s to DNR because it's T0", - rawlspid_print(lsp->hdr.lsp_id)); + rawlspid_print(node_lsp->hdr.lsp_id)); } move_to_dnr(lsp, n);