diff options
| author | Mitesh Kanjariya <mitesh@cumulusnetworks.com> | 2018-02-21 00:36:58 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-21 00:36:58 -0800 |
| commit | f487dcaf74c9bd7a716a749d15281d5b92d363d4 (patch) | |
| tree | 5362b8a4081b3b8a13038fa520c8d66a95c0192e /ospf6d/ospf6_lsa.c | |
| parent | 7fdaec88941d66d831363d32084cc88c5b98ac6c (diff) | |
| parent | 4298f5e937a1fa689047697395f8b741fb9b3d15 (diff) | |
Merge branch 'master' into evpn-bug-fixes
Diffstat (limited to 'ospf6d/ospf6_lsa.c')
| -rw-r--r-- | ospf6d/ospf6_lsa.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index cca4616c16..4a1ba992e3 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -706,6 +706,37 @@ int ospf6_lsa_refresh(struct thread *thread) return 0; } +void ospf6_flush_self_originated_lsas_now(void) +{ + struct listnode *node; + struct ospf6_area *oa; + struct ospf6_lsa *lsa; + const struct route_node *end = NULL; + uint32_t type, adv_router; + + ospf6->inst_shutdown = 1; + + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, node, oa)) { + end = ospf6_lsdb_head(oa->lsdb_self, 0, 0, + ospf6->router_id, &lsa); + while (lsa) { + /* RFC 2328 (14.1): Set MAXAGE */ + lsa->header->age = htons(OSPF_LSA_MAXAGE); + /* Flood MAXAGE LSA*/ + ospf6_flood(NULL, lsa); + + lsa = ospf6_lsdb_next(end, lsa); + } + } + + type = htons(OSPF6_LSTYPE_AS_EXTERNAL); + adv_router = ospf6->router_id; + for (ALL_LSDB_TYPED_ADVRTR(ospf6->lsdb, type, adv_router, lsa)) { + /* RFC 2328 (14.1): Set MAXAGE */ + lsa->header->age = htons(OSPF_LSA_MAXAGE); + ospf6_flood(NULL, lsa); + } +} /* Fletcher Checksum -- Refer to RFC1008. */ |
