diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-02-03 09:56:20 -0500 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-02-03 17:45:08 -0500 | 
| commit | 0f9bc496479098d88750823e054ad6c372e7aa9f (patch) | |
| tree | afbcd65d6358c901437c4db3787a06cab446e16c /eigrpd/eigrp_zebra.c | |
| parent | 41e8603bfab2db06ac0f29bd57e95508bfae6798 (diff) | |
eigrpd: Modify code to pass down metric to zebra
Modify EIGRP code to pass its used metric down to zebra.
Additionally update topotests to pass with these changes.
Fixes: #3703
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_zebra.c')
| -rw-r--r-- | eigrpd/eigrp_zebra.c | 5 | 
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)) {  | 
