From 802a5739336dcee558a1e651db4c5d5cf12e5aeb Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Mon, 31 May 2021 10:27:51 -0300 Subject: [PATCH] ospfd: fix small issue when exiting from the GR helper mode When exiting from the GR helper mode, recalculate the DR only for interfaces of the appropriate types (broadcast and NMBA). This fixes a problem where the state of a neighbor reachable over a p2p interface was changing from Full/DROther to Full/Backup across a graceful restart. Signed-off-by: Renato Westphal --- ospfd/ospf_gr_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ospfd/ospf_gr_helper.c b/ospfd/ospf_gr_helper.c index 8ee4207b04..6e6e7b5c7d 100644 --- a/ospfd/ospf_gr_helper.c +++ b/ospfd/ospf_gr_helper.c @@ -725,7 +725,8 @@ void ospf_gr_helper_exit(struct ospf_neighbor *nbr, } /*Recalculate the DR for the network segment */ - ospf_dr_election(oi); + if (oi->type == OSPF_IFTYPE_BROADCAST || oi->type == OSPF_IFTYPE_NBMA) + ospf_dr_election(oi); /* Originate a router LSA */ ospf_router_lsa_update_area(oi->area);