From: Renato Westphal Date: Mon, 31 May 2021 13:27:51 +0000 (-0300) Subject: ospfd: fix logging of what triggered the SPF run X-Git-Tag: frr-8.0~15^2~10 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8f2eb9573e13625fc432a932b353caf6dc017b45;p=mirror%2Ffrr.git ospfd: fix logging of what triggered the SPF run Signed-off-by: Renato Westphal --- diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c index 3849d4b7ea..43d6ff44ba 100644 --- a/ospfd/ospf_spf.c +++ b/ospfd/ospf_spf.c @@ -1889,19 +1889,19 @@ static int ospf_spf_calculate_schedule_worker(struct thread *thread) rbuf[0] = '\0'; if (spf_reason_flags) { - if (spf_reason_flags & SPF_FLAG_ROUTER_LSA_INSTALL) + if (spf_reason_flags & (1 << SPF_FLAG_ROUTER_LSA_INSTALL)) strlcat(rbuf, "R, ", sizeof(rbuf)); - if (spf_reason_flags & SPF_FLAG_NETWORK_LSA_INSTALL) + if (spf_reason_flags & (1 << SPF_FLAG_NETWORK_LSA_INSTALL)) strlcat(rbuf, "N, ", sizeof(rbuf)); - if (spf_reason_flags & SPF_FLAG_SUMMARY_LSA_INSTALL) + if (spf_reason_flags & (1 << SPF_FLAG_SUMMARY_LSA_INSTALL)) strlcat(rbuf, "S, ", sizeof(rbuf)); - if (spf_reason_flags & SPF_FLAG_ASBR_SUMMARY_LSA_INSTALL) + if (spf_reason_flags & (1 << SPF_FLAG_ASBR_SUMMARY_LSA_INSTALL)) strlcat(rbuf, "AS, ", sizeof(rbuf)); - if (spf_reason_flags & SPF_FLAG_ABR_STATUS_CHANGE) + if (spf_reason_flags & (1 << SPF_FLAG_ABR_STATUS_CHANGE)) strlcat(rbuf, "ABR, ", sizeof(rbuf)); - if (spf_reason_flags & SPF_FLAG_ASBR_STATUS_CHANGE) + if (spf_reason_flags & (1 << SPF_FLAG_ASBR_STATUS_CHANGE)) strlcat(rbuf, "ASBR, ", sizeof(rbuf)); - if (spf_reason_flags & SPF_FLAG_MAXAGE) + if (spf_reason_flags & (1 << SPF_FLAG_MAXAGE)) strlcat(rbuf, "M, ", sizeof(rbuf)); size_t rbuflen = strlen(rbuf);