]> git.proxmox.com Git - mirror_frr.git/commitdiff
ospf6d: remove unnecessary check when translating Type-7 LSA
authorRenato Westphal <renato@opensourcerouting.org>
Wed, 6 Oct 2021 00:25:55 +0000 (21:25 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 6 Oct 2021 00:25:55 +0000 (21:25 -0300)
In addition to being unnecessary, this check is problematic for the
upcoming NSSA ranges feature since NSSA ranges aren't added to the
OSPF routing table. Remove this for simplicity.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ospf6d/ospf6_nssa.c

index f43397fd2649271e0741233671bba6e37b2ad74a..c02e7fcbc037895aea6996b01b9b898509ffd28d 100644 (file)
@@ -409,7 +409,6 @@ static struct ospf6_lsa *ospf6_lsa_translated_nssa_new(struct ospf6_area *area,
        caddr_t old_ptr, new_ptr;
        struct ospf6_as_external_lsa *nssa;
        struct prefix prefix;
-       struct ospf6_route *match;
        struct ospf6 *ospf6 = area->ospf6;
        ptrdiff_t tag_offset = 0;
        route_tag_t network_order;
@@ -448,15 +447,6 @@ static struct ospf6_lsa *ospf6_lsa_translated_nssa_new(struct ospf6_area *area,
        prefix.prefixlen = nssa->prefix.prefix_length;
        ospf6_prefix_in6_addr(&prefix.u.prefix6, nssa, &nssa->prefix);
 
-       /* Find the LSA from the external route */
-       match = ospf6_route_lookup(&prefix, area->route_table);
-       if (match == NULL) {
-               if (IS_OSPF6_DEBUG_NSSA)
-                       zlog_debug("%s : no matching route %pFX", __func__,
-                                  &prefix);
-               return NULL;
-       }
-
        /* set Prefix */
        memcpy(new_ptr, old_ptr, OSPF6_PREFIX_SPACE(ext->prefix.prefix_length));
        ospf6_prefix_apply_mask(&extnew->prefix);