summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2021-05-31 15:27:51 +0200
committerRenato Westphal <renato@opensourcerouting.org>2021-06-08 16:41:33 +0200
commit802a5739336dcee558a1e651db4c5d5cf12e5aeb (patch)
tree38a19da0eb84ff6ecca412085689b2d7080813e7 /ospfd
parentospfd: fix GR helper initialization and termination (diff)
downloadfrr-802a5739336dcee558a1e651db4c5d5cf12e5aeb.tar.xz
frr-802a5739336dcee558a1e651db4c5d5cf12e5aeb.zip
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>
Diffstat (limited to 'ospfd')
-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 8ee4207b0..6e6e7b5c7 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);