]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_ase.c
ospfd: ospf routing table update upon Changing area from normal to nssa
[mirror_frr.git] / ospfd / ospf_ase.c
index aaacebca14df6f081ed24b7b59bf56b2bc33a35c..e9fb891d7e0f8681063b14aac5d4a6d9aeba3bfd 100644 (file)
@@ -280,6 +280,19 @@ int ospf_ase_calculate_route(struct ospf *ospf, struct ospf_lsa *lsa)
                return 0;
        }
 
+       /* Type-5 shouldn't be calculated if it is originated from NSSA ASBR.
+        * As per RFC 3101, expectation is to receive type-7 lsas from
+        * NSSA ASBR. Ignore calculation, if the current LSA is type-5 and
+        * originated ASBR's area is NSSA.
+        */
+       if ((lsa->data->type == OSPF_AS_EXTERNAL_LSA)
+           && (asbr_route->u.std.external_routing != OSPF_AREA_DEFAULT)) {
+               if (IS_DEBUG_OSPF(lsa, LSA))
+                       zlog_debug(
+                               "Route[External]: Ignore, If type-5 LSA from NSSA area.");
+               return 0;
+       }
+
        /*     Else, this LSA describes an AS external path to destination
               N.  Examine the forwarding address specified in the AS-
               external-LSA.  This indicates the IP address to which