summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_message.c
diff options
context:
space:
mode:
authorChirag Shah <chirag@cumulusnetworks.com>2018-01-26 14:53:43 -0800
committerChirag Shah <chirag@cumulusnetworks.com>2018-02-14 17:37:34 -0800
commit76249532faadfb429f46dd94cf6bbc61d78b3f26 (patch)
tree455710600f2083f5373e87304383fac17bb086de /ospf6d/ospf6_message.c
parentd0a6f3e0c5a28ef927cc4bae9b24b284f966d0bd (diff)
ospf6d: Handle Premature Aging of LSAs
RFC 2328 (14.1) Premature aging of LSAs from routing domain : When ospf6d is going away (router going down), send MAXAGEd self originated LSAs to all neighbors in routing domain to trigger Premature aging to remove from resepective LSDBs. Neighbor Router Reboot: Upon receiving Self-originate MAXAGEd LSA, simply discard, Current copy could be non maxaged latest. For neighbor advertised LSA's (current copy in LSDB) is set to MAXAGE but received new LSA with Non-MAXAGE (with current age), discard the current MAXAGE LSA, Send latest copy of LSA to neighbors and update the LSDB with new LSA. When a neighbor transition to FULL, trigger AS-External LSAs update from external LSDB to new neighbor. Testing: R1 ---- DUT --- R5 | \ R2 R3 | R4 Area 1: R5 and DUT Area 0: DUT, R1, R2, R3 Area 2: R2 R4 Add IPv6 static routes at R5 Redistribute kernel routes at R5, Validate routes at R4, redistributed via backbone to area 2. Stop n start frr.service at R5 and validated MAXAGE LSAs then recent age LSAs in Database at DUT-R4. Validated external routes installed DUT to R4. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Diffstat (limited to 'ospf6d/ospf6_message.c')
-rw-r--r--ospf6d/ospf6_message.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c
index d76438ea50..fe74ddc982 100644
--- a/ospf6d/ospf6_message.c
+++ b/ospf6d/ospf6_message.c
@@ -2163,6 +2163,40 @@ int ospf6_lsupdate_send_neighbor(struct thread *thread)
return 0;
}
+int ospf6_lsupdate_send_neighbor_now(struct ospf6_neighbor *on,
+ struct ospf6_lsa *lsa)
+{
+ struct ospf6_header *oh;
+ struct ospf6_lsupdate *lsupdate;
+ u_char *p;
+ int lsa_cnt = 0;
+
+ memset(sendbuf, 0, iobuflen);
+ oh = (struct ospf6_header *)sendbuf;
+ lsupdate = (struct ospf6_lsupdate *)((caddr_t)oh
+ + sizeof(struct ospf6_header));
+
+ p = (u_char *)((caddr_t)lsupdate + sizeof(struct ospf6_lsupdate));
+ ospf6_lsa_age_update_to_send(lsa, on->ospf6_if->transdelay);
+ memcpy(p, lsa->header, OSPF6_LSA_SIZE(lsa->header));
+ p += OSPF6_LSA_SIZE(lsa->header);
+ lsa_cnt++;
+
+ oh->type = OSPF6_MESSAGE_TYPE_LSUPDATE;
+ oh->length = htons(p - sendbuf);
+ lsupdate->lsa_number = htonl(lsa_cnt);
+
+ if (IS_OSPF6_DEBUG_FLOODING ||
+ IS_OSPF6_DEBUG_MESSAGE(OSPF6_MESSAGE_TYPE_LSUPDATE, SEND))
+ zlog_debug("%s: Send lsupdate with lsa %s (age %u)",
+ __PRETTY_FUNCTION__, lsa->name,
+ ntohs(lsa->header->age));
+
+ ospf6_send_lsupdate(on, NULL, oh);
+
+ return 0;
+}
+
int ospf6_lsupdate_send_interface(struct thread *thread)
{
struct ospf6_interface *oi;