summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_message.c
diff options
context:
space:
mode:
authorlynne <lynne@voltanet.io>2021-03-02 22:40:56 +0100
committerlynne <lynne@voltanet.io>2021-03-03 15:20:36 +0100
commitbac66c5c6410a2db1ce0e4e4394f97242eeecc27 (patch)
tree360290b238fd84ad30c142024dd2e3c15e963b8a /ospf6d/ospf6_message.c
parentMerge pull request #8170 from mjstapp/fix_sa_pim (diff)
downloadfrr-bac66c5c6410a2db1ce0e4e4394f97242eeecc27.tar.xz
frr-bac66c5c6410a2db1ce0e4e4394f97242eeecc27.zip
ospf6d: Don't advertise AS-External LSAs into stub area
If area is a normal area and has adjacencies up and then the user changes the area to a stub area, the code was leaving existing AS-External LSAs in the database and was sending AS-External LSAs into the stub area causing the adjacency to stay in Ex-Start. With this change we now cleanup the AS-External LSAs that existed when area was not a stub and do not advertise AS-External LSAs into the stub area. Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Diffstat (limited to 'ospf6d/ospf6_message.c')
-rw-r--r--ospf6d/ospf6_message.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c
index bd180a9f5..349dc50b8 100644
--- a/ospf6d/ospf6_message.c
+++ b/ospf6d/ospf6_message.c
@@ -1893,6 +1893,13 @@ int ospf6_dbdesc_send_newone(struct thread *thread)
so that ospf6_send_dbdesc () can send those LSAs */
size = sizeof(struct ospf6_lsa_header) + sizeof(struct ospf6_dbdesc);
for (ALL_LSDB(on->summary_list, lsa, lsanext)) {
+ /* if stub area then don't advertise AS-External LSAs */
+ if (IS_AREA_STUB(on->ospf6_if->area)
+ && ntohs(lsa->header->type) == OSPF6_LSTYPE_AS_EXTERNAL) {
+ ospf6_lsdb_remove(lsa, on->summary_list);
+ continue;
+ }
+
if (size + sizeof(struct ospf6_lsa_header)
> ospf6_packet_max(on->ospf6_if)) {
ospf6_lsdb_lsa_unlock(lsa);