summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-09-24 16:32:30 +0200
committerDonald Sharp <sharpd@nvidia.com>2021-09-27 18:38:08 +0200
commit3d174ce08db7489e2424ac16f35557c9627c75e0 (patch)
tree699c167065fe54bdabe4a3e7d83e8f7247741ed1
parentospf6d: Make ospfv3 use normal address resolution instead of import route (diff)
downloadfrr-3d174ce08db7489e2424ac16f35557c9627c75e0.tar.xz
frr-3d174ce08db7489e2424ac16f35557c9627c75e0.zip
*: Remove the ZEBRA_IMPORT_ROUTE_XXX zapi messages
These are no longer really needed. The client just needs to call nexthop resolution instead. So let's remove the zapi types. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r--bgpd/bgp_nht.c16
-rw-r--r--bgpd/bgp_zebra.c7
-rw-r--r--lib/log.c3
-rw-r--r--lib/zclient.c7
-rw-r--r--lib/zclient.h4
-rw-r--r--sharpd/sharp_zebra.c14
-rw-r--r--zebra/zapi_msg.c4
-rw-r--r--zebra/zebra_rnh.c4
8 files changed, 8 insertions, 51 deletions
diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index 90fa90730..061fa6f08 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -899,11 +899,9 @@ static void sendmsg_zebra_rnh(struct bgp_nexthop_cache *bnc, int command)
flog_warn(EC_BGP_ZEBRA_SEND,
"sendmsg_nexthop: zclient_send_message() failed");
- if ((command == ZEBRA_NEXTHOP_REGISTER)
- || (command == ZEBRA_IMPORT_ROUTE_REGISTER))
+ if (command == ZEBRA_NEXTHOP_REGISTER)
SET_FLAG(bnc->flags, BGP_NEXTHOP_REGISTERED);
- else if ((command == ZEBRA_NEXTHOP_UNREGISTER)
- || (command == ZEBRA_IMPORT_ROUTE_UNREGISTER))
+ else if (command == ZEBRA_NEXTHOP_UNREGISTER)
UNSET_FLAG(bnc->flags, BGP_NEXTHOP_REGISTERED);
return;
}
@@ -928,10 +926,7 @@ static void register_zebra_rnh(struct bgp_nexthop_cache *bnc,
return;
}
- if (is_bgp_import_route)
- sendmsg_zebra_rnh(bnc, ZEBRA_IMPORT_ROUTE_REGISTER);
- else
- sendmsg_zebra_rnh(bnc, ZEBRA_NEXTHOP_REGISTER);
+ sendmsg_zebra_rnh(bnc, ZEBRA_NEXTHOP_REGISTER);
}
/**
@@ -953,10 +948,7 @@ static void unregister_zebra_rnh(struct bgp_nexthop_cache *bnc,
return;
}
- if (is_bgp_import_route)
- sendmsg_zebra_rnh(bnc, ZEBRA_IMPORT_ROUTE_UNREGISTER);
- else
- sendmsg_zebra_rnh(bnc, ZEBRA_NEXTHOP_UNREGISTER);
+ sendmsg_zebra_rnh(bnc, ZEBRA_NEXTHOP_UNREGISTER);
}
/**
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 2a67bb2f8..9358be8be 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -112,12 +112,6 @@ static int bgp_read_nexthop_update(ZAPI_CALLBACK_ARGS)
return 0;
}
-static int bgp_read_import_check_update(ZAPI_CALLBACK_ARGS)
-{
- bgp_parse_nexthop_update(cmd, vrf_id);
- return 0;
-}
-
/* Set or clear interface on which unnumbered neighbor is configured. This
* would in turn cause BGP to initiate or turn off IPv6 RAs on this
* interface.
@@ -3185,7 +3179,6 @@ void bgp_zebra_init(struct thread_master *master, unsigned short instance)
zclient->redistribute_route_add = zebra_read_route;
zclient->redistribute_route_del = zebra_read_route;
zclient->nexthop_update = bgp_read_nexthop_update;
- zclient->import_check_update = bgp_read_import_check_update;
zclient->fec_update = bgp_read_fec_update;
zclient->local_es_add = bgp_zebra_process_local_es_add;
zclient->local_es_del = bgp_zebra_process_local_es_del;
diff --git a/lib/log.c b/lib/log.c
index 936422104..8be171613 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -355,9 +355,6 @@ static const struct zebra_desc_table command_types[] = {
DESC_ENTRY(ZEBRA_INTERFACE_NBR_ADDRESS_ADD),
DESC_ENTRY(ZEBRA_INTERFACE_NBR_ADDRESS_DELETE),
DESC_ENTRY(ZEBRA_INTERFACE_BFD_DEST_UPDATE),
- DESC_ENTRY(ZEBRA_IMPORT_ROUTE_REGISTER),
- DESC_ENTRY(ZEBRA_IMPORT_ROUTE_UNREGISTER),
- DESC_ENTRY(ZEBRA_IMPORT_CHECK_UPDATE),
DESC_ENTRY(ZEBRA_BFD_DEST_REGISTER),
DESC_ENTRY(ZEBRA_BFD_DEST_DEREGISTER),
DESC_ENTRY(ZEBRA_BFD_DEST_UPDATE),
diff --git a/lib/zclient.c b/lib/zclient.c
index bdc7cd5c7..96c3d67ba 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -4017,13 +4017,6 @@ static int zclient_read(struct thread *thread)
(*zclient->nexthop_update)(command, zclient, length,
vrf_id);
break;
- case ZEBRA_IMPORT_CHECK_UPDATE:
- if (zclient_debug)
- zlog_debug("zclient rcvd import check update");
- if (zclient->import_check_update)
- (*zclient->import_check_update)(command, zclient,
- length, vrf_id);
- break;
case ZEBRA_BFD_DEST_REPLAY:
if (zclient->bfd_dest_replay)
(*zclient->bfd_dest_replay)(command, zclient, length,
diff --git a/lib/zclient.h b/lib/zclient.h
index d21ea621e..a6d104301 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -126,9 +126,6 @@ typedef enum {
ZEBRA_INTERFACE_NBR_ADDRESS_ADD,
ZEBRA_INTERFACE_NBR_ADDRESS_DELETE,
ZEBRA_INTERFACE_BFD_DEST_UPDATE,
- ZEBRA_IMPORT_ROUTE_REGISTER,
- ZEBRA_IMPORT_ROUTE_UNREGISTER,
- ZEBRA_IMPORT_CHECK_UPDATE,
ZEBRA_BFD_DEST_REGISTER,
ZEBRA_BFD_DEST_DEREGISTER,
ZEBRA_BFD_DEST_UPDATE,
@@ -362,7 +359,6 @@ struct zclient {
int (*interface_nbr_address_delete)(ZAPI_CALLBACK_ARGS);
int (*interface_vrf_update)(ZAPI_CALLBACK_ARGS);
int (*nexthop_update)(ZAPI_CALLBACK_ARGS);
- int (*import_check_update)(ZAPI_CALLBACK_ARGS);
int (*bfd_dest_replay)(ZAPI_CALLBACK_ARGS);
int (*redistribute_route_add)(ZAPI_CALLBACK_ARGS);
int (*redistribute_route_del)(ZAPI_CALLBACK_ARGS);
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c
index 48c9e8ced..67cff378e 100644
--- a/sharpd/sharp_zebra.c
+++ b/sharpd/sharp_zebra.c
@@ -626,17 +626,10 @@ void sharp_zebra_nexthop_watch(struct prefix *p, vrf_id_t vrf_id, bool import,
{
int command;
- if (!import) {
- command = ZEBRA_NEXTHOP_REGISTER;
+ command = ZEBRA_NEXTHOP_REGISTER;
- if (!watch)
- command = ZEBRA_NEXTHOP_UNREGISTER;
- } else {
- command = ZEBRA_IMPORT_ROUTE_REGISTER;
-
- if (!watch)
- command = ZEBRA_IMPORT_ROUTE_UNREGISTER;
- }
+ if (!watch)
+ command = ZEBRA_NEXTHOP_UNREGISTER;
if (zclient_send_rnh(zclient, command, p, connected, false, vrf_id)
== ZCLIENT_SEND_FAILURE)
@@ -984,7 +977,6 @@ void sharp_zebra_init(void)
zclient->interface_address_delete = interface_address_delete;
zclient->route_notify_owner = route_notify_owner;
zclient->nexthop_update = sharp_nexthop_update;
- zclient->import_check_update = sharp_nexthop_update;
zclient->nhg_notify_owner = nhg_notify_owner;
zclient->zebra_buffer_write_ready = sharp_zclient_buffer_ready;
zclient->redistribute_route_add = sharp_redistribute_route;
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 775e2a4b0..0ed905ad7 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -1167,8 +1167,6 @@ int zsend_zebra_srv6_locator_delete(struct zserv *client,
const int cmd2type[] = {
[ZEBRA_NEXTHOP_REGISTER] = RNH_NEXTHOP_TYPE,
[ZEBRA_NEXTHOP_UNREGISTER] = RNH_NEXTHOP_TYPE,
- [ZEBRA_IMPORT_ROUTE_REGISTER] = RNH_IMPORT_CHECK_TYPE,
- [ZEBRA_IMPORT_ROUTE_UNREGISTER] = RNH_IMPORT_CHECK_TYPE,
};
/* Nexthop register */
@@ -3690,8 +3688,6 @@ void (*const zserv_handlers[])(ZAPI_HANDLER_ARGS) = {
[ZEBRA_HELLO] = zread_hello,
[ZEBRA_NEXTHOP_REGISTER] = zread_rnh_register,
[ZEBRA_NEXTHOP_UNREGISTER] = zread_rnh_unregister,
- [ZEBRA_IMPORT_ROUTE_REGISTER] = zread_rnh_register,
- [ZEBRA_IMPORT_ROUTE_UNREGISTER] = zread_rnh_unregister,
[ZEBRA_BFD_DEST_UPDATE] = zebra_ptm_bfd_dst_register,
[ZEBRA_BFD_DEST_REGISTER] = zebra_ptm_bfd_dst_register,
[ZEBRA_BFD_DEST_DEREGISTER] = zebra_ptm_bfd_dst_deregister,
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c
index 636fa9271..ae03a7058 100644
--- a/zebra/zebra_rnh.c
+++ b/zebra/zebra_rnh.c
@@ -1286,8 +1286,6 @@ int zebra_send_rnh_update(struct rnh *rnh, struct zserv *client,
struct route_node *rn;
int ret;
uint32_t message = 0;
- int cmd = (type == RNH_IMPORT_CHECK_TYPE) ? ZEBRA_IMPORT_CHECK_UPDATE
- : ZEBRA_NEXTHOP_UPDATE;
rn = rnh->node;
re = rnh->state;
@@ -1295,7 +1293,7 @@ int zebra_send_rnh_update(struct rnh *rnh, struct zserv *client,
/* Get output stream. */
s = stream_new(ZEBRA_MAX_PACKET_SIZ);
- zclient_create_header(s, cmd, vrf_id);
+ zclient_create_header(s, ZEBRA_NEXTHOP_UPDATE, vrf_id);
/* Message flags. */
if (srte_color)