diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-08-21 14:40:51 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-08-21 14:40:51 +0200 |
commit | 19c0412aadd7ee454c9cfb4beffad69232c27330 (patch) | |
tree | cb72177857ea5c669182e4a420e987ac0d166dfb | |
parent | Merge pull request #2867 from dslicenc/show-route-leak-json (diff) | |
download | frr-19c0412aadd7ee454c9cfb4beffad69232c27330.tar.xz frr-19c0412aadd7ee454c9cfb4beffad69232c27330.zip |
ospfd: Remove unused function
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>
-rw-r--r-- | ospfclient/ospf_apiclient.c | 1 | ||||
-rw-r--r-- | ospfd/ospf_asbr.c | 20 | ||||
-rw-r--r-- | ospfd/ospf_asbr.h | 2 | ||||
-rw-r--r-- | ospfd/ospf_main.c | 1 | ||||
-rw-r--r-- | ospfd/ospf_snmp.c | 1 | ||||
-rw-r--r-- | ospfd/ospfd.c | 2 |
6 files changed, 4 insertions, 23 deletions
diff --git a/ospfclient/ospf_apiclient.c b/ospfclient/ospf_apiclient.c index db624ae07..50485cc7e 100644 --- a/ospfclient/ospf_apiclient.c +++ b/ospfclient/ospf_apiclient.c @@ -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" diff --git a/ospfd/ospf_asbr.c b/ospfd/ospf_asbr.c index 18c1077da..8e8f65530 100644 --- a/ospfd/ospf_asbr.c +++ b/ospfd/ospf_asbr.c @@ -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) diff --git a/ospfd/ospf_asbr.h b/ospfd/ospf_asbr.h index 370c6787b..ac7bd68b5 100644 --- a/ospfd/ospf_asbr.h +++ b/ospfd/ospf_asbr.h @@ -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); diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c index 6dadc05bb..8853802d0 100644 --- a/ospfd/ospf_main.c +++ b/ospfd/ospf_main.c @@ -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" diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c index c90db031d..19d2e6a95 100644 --- a/ospfd/ospf_snmp.c +++ b/ospfd/ospf_snmp.c @@ -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. */ diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index ac8f0d92c..bfaedf2fe 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -52,10 +52,10 @@ #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" |