From: Donald Sharp Date: Mon, 20 Mar 2017 00:29:35 +0000 (-0400) Subject: eigrpd: Fix non-installation of routes into zebra X-Git-Tag: reindent-master-before~197^2~28 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=ab443321bb0a966ae22de2b948885b4a6947339d;p=mirror%2Ffrr.git eigrpd: Fix non-installation of routes into zebra EIGRP was not installing routes it learned from it's neighbors into the rib. This is probably a hack, but zebra now knows about the routes. robot.cumulusnetworks.com# show ip route Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, P - PIM, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, > - selected route, * - FIB route K>* 0.0.0.0/0 via 10.0.2.2, enp0s3 C>* 10.0.2.0/24 is directly connected, enp0s3 E 192.168.2.0/24 [0/0] via 127.0.0.1, enp0s10 inactive C>* 192.168.2.0/24 is directly connected, enp0s10 E>* 192.168.3.4/32 [0/0] via 192.168.2.144, enp0s10 E>* 192.168.4.5/32 [0/0] via 192.168.2.144, enp0s10 E>* 192.168.4.6/32 [0/0] via 192.168.2.144, enp0s10 C>* 192.168.22.11/32 is directly connected, lo robot.cumulusnetworks.com# show ip route 192.168.4.5 Routing entry for 192.168.4.5/32 Known via "eigrp", distance 0, metric 0, best * 192.168.2.144, via enp0s10 robot.cumulusnetworks.com# Signed-off-by: Donald Sharp --- diff --git a/eigrpd/eigrp_update.c b/eigrpd/eigrp_update.c index 63c0eb27bf..6857b53a6c 100644 --- a/eigrpd/eigrp_update.c +++ b/eigrpd/eigrp_update.c @@ -454,6 +454,26 @@ eigrp_update_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header * pe->req_action |= EIGRP_FSM_NEED_UPDATE; listnode_add(eigrp->topology_changes_internalIPV4, pe); + + /* + * This code is a guess. I am not actually + * sure that we should be doing this here. + * But for the moment it installs routes + * into the rib. Which is good? + */ + struct eigrp_fsm_action_message *msg; + msg = XCALLOC(MTYPE_EIGRP_FSM_MSG, + sizeof(struct eigrp_fsm_action_message)); + + msg->packet_type = EIGRP_OPC_UPDATE; + msg->eigrp = eigrp; + msg->data_type =EIGRP_TLV_IPv4_INT; + msg->adv_router = nbr; + msg->data.ipv4_int_type = tlv; + msg->entry = ne; + msg->prefix = pe; + int event = eigrp_get_fsm_event(msg); + eigrp_fsm_event(msg, event); } eigrp_IPv4_InternalTLV_free (tlv); }