summaryrefslogtreecommitdiff
path: root/eigrpd/eigrp_zebra.c
diff options
context:
space:
mode:
Diffstat (limited to 'eigrpd/eigrp_zebra.c')
-rw-r--r--eigrpd/eigrp_zebra.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/eigrpd/eigrp_zebra.c b/eigrpd/eigrp_zebra.c
index a810e01468..09d876afaa 100644
--- a/eigrpd/eigrp_zebra.c
+++ b/eigrpd/eigrp_zebra.c
@@ -353,7 +353,8 @@ static struct interface *zebra_interface_if_lookup(struct stream *s)
return if_lookup_by_name(ifname_tmp, VRF_DEFAULT);
}
-void eigrp_zebra_route_add(struct prefix *p, struct list *successors)
+void eigrp_zebra_route_add(struct prefix *p, struct list *successors,
+ uint32_t distance)
{
struct zapi_route api;
struct zapi_nexthop *api_nh;
@@ -368,9 +369,11 @@ void eigrp_zebra_route_add(struct prefix *p, struct list *successors)
api.vrf_id = VRF_DEFAULT;
api.type = ZEBRA_ROUTE_EIGRP;
api.safi = SAFI_UNICAST;
+ api.metric = distance;
memcpy(&api.prefix, p, sizeof(*p));
SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);
+ SET_FLAG(api.message, ZAPI_MESSAGE_METRIC);
/* Nexthop, ifindex, distance and metric information. */
for (ALL_LIST_ELEMENTS_RO(successors, node, te)) {