summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_intra.h
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_intra.h
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_intra.h')
-rw-r--r--ospf6d/ospf6_intra.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/ospf6d/ospf6_intra.h b/ospf6d/ospf6_intra.h
index b511a92005..2ae17f0700 100644
--- a/ospf6d/ospf6_intra.h
+++ b/ospf6d/ospf6_intra.h
@@ -185,11 +185,21 @@ struct ospf6_intra_prefix_lsa {
0, &(oi)->thread_intra_prefix_lsa); \
} while (0)
+#define OSPF6_AS_EXTERN_LSA_SCHEDULE(oi) \
+ do { \
+ if (!CHECK_FLAG((oi)->flag, OSPF6_INTERFACE_DISABLE)) \
+ thread_add_event( \
+ master, \
+ ospf6_orig_as_external_lsa, oi, \
+ 0, &(oi)->thread_as_extern_lsa); \
+ } while (0)
+
#define OSPF6_NETWORK_LSA_EXECUTE(oi) \
do { \
THREAD_OFF((oi)->thread_network_lsa); \
thread_execute(master, ospf6_network_lsa_originate, oi, 0); \
} while (0)
+
#define OSPF6_INTRA_PREFIX_LSA_EXECUTE_TRANSIT(oi) \
do { \
THREAD_OFF((oi)->thread_intra_prefix_lsa); \
@@ -198,6 +208,11 @@ struct ospf6_intra_prefix_lsa {
0); \
} while (0)
+#define OSPF6_AS_EXTERN_LSA_EXECUTE(oi) \
+ do { \
+ THREAD_OFF((oi)->thread_as_extern_lsa); \
+ thread_execute(master, ospf6_orig_as_external_lsa, oi, 0); \
+ } while (0)
/* Function Prototypes */
extern char *ospf6_router_lsdesc_lookup(u_char type, u_int32_t interface_id,
@@ -215,7 +230,7 @@ extern int ospf6_intra_prefix_lsa_originate_transit(struct thread *);
extern int ospf6_intra_prefix_lsa_originate_stub(struct thread *);
extern void ospf6_intra_prefix_lsa_add(struct ospf6_lsa *lsa);
extern void ospf6_intra_prefix_lsa_remove(struct ospf6_lsa *lsa);
-
+extern int ospf6_orig_as_external_lsa(struct thread *thread);
extern void ospf6_intra_route_calculation(struct ospf6_area *oa);
extern void ospf6_intra_brouter_calculation(struct ospf6_area *oa);