diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2023-03-01 21:31:56 +0100 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2023-03-02 23:38:03 +0100 |
commit | cb1f47c2eb46c3ca7bd485c15fed024f31c50be6 (patch) | |
tree | 3597e37abb9aea4eff6516c695a7465418af8d69 /ospf6d/ospf6_flood.c | |
parent | ospf6d: fix missing intra-area-prefix-LSA after a graceful restart (diff) | |
download | frr-cb1f47c2eb46c3ca7bd485c15fed024f31c50be6.tar.xz frr-cb1f47c2eb46c3ca7bd485c15fed024f31c50be6.zip |
ospfd, ospf6d: perform GR consistency check only when necessary
The GR code should check for topology changes only upon the receipt
of Router-LSAs and Network-LSAs. Other LSAs types don't affect the
topology as far as a restarting router is concerned.
This optimization reduces unnecessary computations when the
restarting router receives thousands of inter-area LSAs or external
LSAs while coming back up.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_flood.c')
-rw-r--r-- | ospf6d/ospf6_flood.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index 2d2069566..db1520ff2 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -1105,9 +1105,12 @@ void ospf6_receive_lsa(struct ospf6_neighbor *from, &new->refresh); } + /* GR: check for network topology change. */ struct ospf6 *ospf6 = from->ospf6_if->area->ospf6; struct ospf6_area *area = from->ospf6_if->area; - if (ospf6->gr_info.restart_in_progress) + if (ospf6->gr_info.restart_in_progress && + (new->header->type == ntohs(OSPF6_LSTYPE_ROUTER) || + new->header->type == ntohs(OSPF6_LSTYPE_NETWORK))) ospf6_gr_check_lsdb_consistency(ospf6, area); return; |