]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_asbr.c
lib: enforce vrf_name_to_id by returning default_vrf when name is null
[mirror_frr.git] / ospfd / ospf_asbr.c
index 18c1077da09427e2698968a89e5573b471002a04..ba2e04bf766b23b4f8daa2ad0e0b520fd6e3f9bd 100644 (file)
@@ -73,26 +73,6 @@ void ospf_external_route_remove(struct ospf *ospf, struct prefix_ipv4 *p)
                  p->prefixlen);
 }
 
-/* Lookup external route. */
-struct ospf_route *ospf_external_route_lookup(struct ospf *ospf,
-                                             struct prefix_ipv4 *p)
-{
-       struct route_node *rn;
-
-       rn = route_node_lookup(ospf->old_external_route, (struct prefix *)p);
-       if (rn) {
-               route_unlock_node(rn);
-               if (rn->info)
-                       return rn->info;
-       }
-
-       zlog_warn("Route[%s/%d]: lookup, no such prefix", inet_ntoa(p->prefix),
-                 p->prefixlen);
-
-       return NULL;
-}
-
-
 /* Add an External info for AS-external-LSA. */
 struct external_info *ospf_external_info_new(uint8_t type,
                                             unsigned short instance)
@@ -155,11 +135,12 @@ ospf_external_info_add(struct ospf *ospf, uint8_t type, unsigned short instance,
 
                        inet_ntop(AF_INET, (void *)&nexthop.s_addr, inetbuf,
                                  INET6_BUFSIZ);
-                       zlog_warn(
-                               "Redistribute[%s][%d][%u]: %s/%d discarding old info with NH %s.",
-                               ospf_redist_string(type), instance,
-                               ospf->vrf_id, inet_ntoa(p.prefix), p.prefixlen,
-                               inetbuf);
+                       if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
+                               zlog_debug(
+                                       "Redistribute[%s][%d][%u]: %s/%d discarding old info with NH %s.",
+                                       ospf_redist_string(type), instance,
+                                       ospf->vrf_id, inet_ntoa(p.prefix),
+                                       p.prefixlen, inetbuf);
                        XFREE(MTYPE_OSPF_EXTERNAL_INFO, rn->info);
                        rn->info = NULL;
                }