zebra: use the passed proto from zapi

We were hard coding proto bgp for use with the NHG creation.

Use the actual passed one from zapi now that it exists.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
Stephen Worley 2020-05-13 17:55:14 -04:00
parent ac5d1091dc
commit cd53e3a6e6

View file

@ -1806,7 +1806,7 @@ static void zread_nhg_reader(ZAPI_HANDLER_ARGS)
*/
// TODO: Forcing AF_UNSPEC/AF_IP for now
nhe = zebra_nhg_proto_add(id, ZEBRA_ROUTE_BGP, nhg,
nhe = zebra_nhg_proto_add(id, proto, nhg,
((nhops > 1) ? AFI_UNSPEC : AFI_IP));
nexthop_group_delete(&nhg);