]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospf6d: Do not flood unknown LSAs if U-bit is clear
authorKaren Schoener <karen@voltanet.io>
Wed, 24 Mar 2021 16:49:59 +0000 (12:49 -0400)
committerKaren Schoener <karen@voltanet.io>
Wed, 24 Mar 2021 17:58:41 +0000 (13:58 -0400)
Do not flood unknown LSAs if U-bit is clear.

Signed-off-by: Karen Schoener <karen@voltanet.io>
ospf6d/ospf6_flood.c

index 2d896546faf5190313b7901024e88e6ddc316a4c..5f4815fec1ddd8533e4edb0d864a691487e21c24 100644 (file)
@@ -463,6 +463,19 @@ static void ospf6_flood_process(struct ospf6_neighbor *from,
        struct ospf6_area *oa;
 
        for (ALL_LIST_ELEMENTS(process->area_list, node, nnode, oa)) {
+
+               /* If unknown LSA and U-bit clear, treat as link local
+                * flooding scope
+                */
+               if (!OSPF6_LSA_IS_KNOWN(lsa->header->type)
+                   && !(ntohs(lsa->header->type) & OSPF6_LSTYPE_UBIT_MASK)
+                   && (oa != OSPF6_INTERFACE(lsa->lsdb->data)->area)) {
+
+                       if (IS_OSPF6_DEBUG_FLOODING)
+                               zlog_debug("Unknown LSA, do not flood");
+                       continue;
+               }
+
                if (OSPF6_LSA_SCOPE(lsa->header->type) == OSPF6_SCOPE_AREA
                    && oa != OSPF6_AREA(lsa->lsdb->data))
                        continue;