]> git.proxmox.com Git - mirror_frr.git/commitdiff
ospfd: Remove unused function
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 21 Aug 2018 12:40:51 +0000 (08:40 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 21 Aug 2018 12:40:51 +0000 (08:40 -0400)
The ospf_external_route_lookup function was not
being used so let's just remove it.

Unfortunately the removal was not quite so simple as
that ospf_asbr.h was being used to generate a reference
for the `struct ospf_route` data structure, so we
need to fix up the compile by fixing up header
inclusions so that ospf_route.h is actually included

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
ospfclient/ospf_apiclient.c
ospfd/ospf_asbr.c
ospfd/ospf_asbr.h
ospfd/ospf_main.c
ospfd/ospf_snmp.c
ospfd/ospfd.c

index db624ae0741aaefaae71579a15e8198e6a8fb20f..50485cc7e25c334de1a40787e945d3809c8b13c0 100644 (file)
@@ -46,6 +46,7 @@
 #include "ospfd/ospf_lsdb.h"
 #include "ospfd/ospf_neighbor.h"
 #include "ospfd/ospf_dump.h"
+#include "ospfd/ospf_route.h"
 #include "ospfd/ospf_zebra.h"
 #include "ospfd/ospf_api.h"
 
index 18c1077da09427e2698968a89e5573b471002a04..8e8f65530529e5f4319973337c602385045582a5 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)
index 370c6787b4153c8cdb49e53d33d5904f43a76a67..ac7bd68b5f3d7cb9cd20ce341b21efdf1338dcf5 100644 (file)
@@ -68,8 +68,6 @@ extern void ospf_external_info_delete(struct ospf *, uint8_t, unsigned short,
 extern struct external_info *ospf_external_info_lookup(struct ospf *, uint8_t,
                                                       unsigned short,
                                                       struct prefix_ipv4 *);
-extern struct ospf_route *ospf_external_route_lookup(struct ospf *,
-                                                    struct prefix_ipv4 *);
 extern void ospf_asbr_status_update(struct ospf *, uint8_t);
 
 extern void ospf_redistribute_withdraw(struct ospf *, uint8_t, unsigned short);
index 6dadc05bbab42bcaa95d84d3ae5479ba3f3a2df8..8853802d07e58b3ab1d1f57d08e91eb166589091 100644 (file)
@@ -49,6 +49,7 @@
 #include "ospfd/ospf_lsdb.h"
 #include "ospfd/ospf_neighbor.h"
 #include "ospfd/ospf_dump.h"
+#include "ospfd/ospf_route.h"
 #include "ospfd/ospf_zebra.h"
 #include "ospfd/ospf_vty.h"
 #include "ospfd/ospf_bfd.h"
index c90db031dcf2f2137687d2cf81da53bc8e122980..19d2e6a95251f4fb1de862a5c56bda0105842370 100644 (file)
@@ -47,6 +47,7 @@
 #include "ospfd/ospf_flood.h"
 #include "ospfd/ospf_ism.h"
 #include "ospfd/ospf_dump.h"
+#include "ospfd/ospf_route.h"
 #include "ospfd/ospf_zebra.h"
 
 /* OSPF2-MIB. */
index ac8f0d92c322b988aa9a331676603185e2878269..bfaedf2fe70236495ac6906007a923df275017f2 100644 (file)
 #include "ospfd/ospf_spf.h"
 #include "ospfd/ospf_packet.h"
 #include "ospfd/ospf_dump.h"
+#include "ospfd/ospf_route.h"
 #include "ospfd/ospf_zebra.h"
 #include "ospfd/ospf_abr.h"
 #include "ospfd/ospf_flood.h"
-#include "ospfd/ospf_route.h"
 #include "ospfd/ospf_ase.h"