From 950b49f80c758f13b660729fb875969666eb506c Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Tue, 31 Aug 2021 00:48:38 -0300 Subject: [PATCH] ospf6d: fix unguarded GR debug message The message about ignoring a one-way hello should only be logged when the router is acting a helper for another one. Signed-off-by: Renato Westphal --- ospf6d/ospf6_message.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index cd73e3d406..3dcc74589a 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -515,12 +515,12 @@ static void ospf6_hello_recv(struct in6_addr *src, struct in6_addr *dst, if (twoway) thread_execute(master, twoway_received, on, 0); else { - if (IS_DEBUG_OSPF6_GR) - zlog_debug( - "%s, Received oneway hello from RESTARTER so ignore here.", - __PRETTY_FUNCTION__); - - if (!OSPF6_GR_IS_ACTIVE_HELPER(on)) { + if (OSPF6_GR_IS_ACTIVE_HELPER(on)) { + if (IS_DEBUG_OSPF6_GR) + zlog_debug( + "%s, Received oneway hello from RESTARTER so ignore here.", + __PRETTY_FUNCTION__); + } else { /* If the router is DR_OTHER, RESTARTER will not wait * until it receives the hello from it if it receives * from DR and BDR.