summaryrefslogtreecommitdiffstats
path: root/eigrpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-11-10 02:46:11 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-11-27 15:09:36 +0100
commitca890872db2bd95234bd0bc7304164d699653c05 (patch)
treecdeb9a65404285130fce04c205ac4d987b209efa /eigrpd
parentzebra: Add notification for Route Install events (diff)
downloadfrr-ca890872db2bd95234bd0bc7304164d699653c05.tar.xz
frr-ca890872db2bd95234bd0bc7304164d699653c05.zip
eigrpd: Start conversion to use route install failure callback
EIGRP must not advertise routes that have failed to install. This commit turns on the notification for EIGRP. We still need to start handling this correctly. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd')
-rw-r--r--eigrpd/eigrp_zebra.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/eigrpd/eigrp_zebra.c b/eigrpd/eigrp_zebra.c
index b6e776f68..00438f2f4 100644
--- a/eigrpd/eigrp_zebra.c
+++ b/eigrpd/eigrp_zebra.c
@@ -94,6 +94,18 @@ static int eigrp_router_id_update_zebra(int command, struct zclient *zclient,
return 0;
}
+static int eigrp_zebra_notify_owner(int command, struct zclient *zclient,
+ zebra_size_t length, vrf_id_t vrf_id)
+{
+ struct prefix p;
+ enum zapi_route_notify_owner note;
+
+ if (!zapi_route_notify_decode(zclient->ibuf, &p, &note))
+ return -1;
+
+ return 0;
+}
+
static void eigrp_zebra_connected(struct zclient *zclient)
{
zclient_send_reg_requests(zclient, VRF_DEFAULT);
@@ -101,7 +113,9 @@ static void eigrp_zebra_connected(struct zclient *zclient)
void eigrp_zebra_init(void)
{
- zclient = zclient_new_notify(master, &zclient_options_default);
+ struct zclient_options opt = { .receive_notify = false };
+
+ zclient = zclient_new_notify(master, &opt);
zclient_init(zclient, ZEBRA_ROUTE_EIGRP, 0, &eigrpd_privs);
zclient->zebra_connected = eigrp_zebra_connected;
@@ -114,6 +128,7 @@ void eigrp_zebra_init(void)
zclient->interface_address_delete = eigrp_interface_address_delete;
zclient->redistribute_route_add = eigrp_zebra_read_route;
zclient->redistribute_route_del = eigrp_zebra_read_route;
+ zclient->notify_owner = eigrp_zebra_notify_owner;
}