]> git.puffer.fish Git - mirror/frr.git/commitdiff
eigrpd: Start conversion to use route install failure callback
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 10 Nov 2017 01:46:11 +0000 (20:46 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 27 Nov 2017 14:09:36 +0000 (09:09 -0500)
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>
eigrpd/eigrp_zebra.c

index b6e776f68a542aa0b66b7538d01f608314427c41..00438f2f47c0c2f7d69e19b4ac84a2b9ce75d853 100644 (file)
@@ -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;
 }