diff options
author | Mobashshera Rasool <mrasool@vmware.com> | 2021-05-28 11:33:03 +0200 |
---|---|---|
committer | Mobashshera Rasool <mrasool@vmware.com> | 2021-07-21 07:16:54 +0200 |
commit | 4dc43886914a1304b8331e0836a00f0eb605c7c9 (patch) | |
tree | 7009b59fc5a4d1286eb6fda74820025990304b46 /ospf6d/ospf6_flood.c | |
parent | Merge pull request #9098 from donaldsharp/if_secondary_bsd (diff) | |
download | frr-4dc43886914a1304b8331e0836a00f0eb605c7c9.tar.xz frr-4dc43886914a1304b8331e0836a00f0eb605c7c9.zip |
ospf6d: ASBR Summarisation feature implementation
Feature Implementation.
========================
This feature will help in advertising the External LSAs with aggregation.
The commands allow us to tune the advertisement with different parameters
as mentioned in the CLI List below.
It can also help in case we do not want to advertise any prefix with the
no-advertise option.
New CLIs added:
===============
summary-address X:X::X:X/M$prefix [tag (1-4294967295)] [{metric (0-16777215) | metric-type (1-2)}]
no summary-address X:X::X:X/M$prefix [tag (1-4294967295)] [{metric (0-16777215) | metric-type (1-2)}]
summary-address X:X::X:X/M$prefix no-advertise
no summary-address X:X::X:X/M$prefix no-advertise
aggregation timer (5-1800)
no aggregation timer (5-1800)
show ipv6 ospf6 summary-address [detail$detail] [json]
debug ospf6 lsa aggregation
CAT RUN:
========
QE to add test scripts
Signed-Off-by: Mobashshera Rasool <mrassol@vmware.com>
Diffstat (limited to 'ospf6d/ospf6_flood.c')
-rw-r--r-- | ospf6d/ospf6_flood.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index 738c2218f..ca834b963 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -106,7 +106,7 @@ void ospf6_lsa_originate(struct ospf6_lsa *lsa) lsdb_self = ospf6_get_scoped_lsdb_self(lsa); ospf6_lsdb_add(ospf6_lsa_copy(lsa), lsdb_self); - lsa->refresh = NULL; + THREAD_OFF(lsa->refresh); thread_add_timer(master, ospf6_lsa_refresh, lsa, OSPF_LS_REFRESH_TIME, &lsa->refresh); @@ -139,6 +139,31 @@ void ospf6_lsa_originate_interface(struct ospf6_lsa *lsa, ospf6_lsa_originate(lsa); } +void ospf6_remove_id_from_external_id_table(struct ospf6 *ospf6, + uint32_t id) +{ + struct prefix prefix_id; + struct route_node *node; + + /* remove binding in external_id_table */ + prefix_id.family = AF_INET; + prefix_id.prefixlen = 32; + prefix_id.u.prefix4.s_addr = id; + node = route_node_lookup(ospf6->external_id_table, &prefix_id); + assert(node); + node->info = NULL; + route_unlock_node(node); /* to free the lookup lock */ + route_unlock_node(node); /* to free the original lock */ + +} + +void ospf6_external_lsa_purge(struct ospf6 *ospf6, struct ospf6_lsa *lsa) +{ + ospf6_lsa_purge(lsa); + + ospf6_remove_id_from_external_id_table(ospf6, lsa->header->id); +} + void ospf6_lsa_purge(struct ospf6_lsa *lsa) { struct ospf6_lsa *self; |