summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2021-05-31 10:27:51 -0300
committerRenato Westphal <renato@opensourcerouting.org>2021-06-08 11:41:33 -0300
commit802a5739336dcee558a1e651db4c5d5cf12e5aeb (patch)
tree38a19da0eb84ff6ecca412085689b2d7080813e7
parent51f8588eb999429eb2181f1897742fa503c17a51 (diff)
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 <renato@opensourcerouting.org>
-rw-r--r--ospfd/ospf_gr_helper.c3
1 files changed, 2 insertions, 1 deletions
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);