bgpd: Always send down correct admin distance

In all cases that we are sending routes down to zebra send the
correct admin distance.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2019-05-29 08:56:03 -04:00
parent 362e887852
commit 38a8c751a4

View File

@ -2960,6 +2960,9 @@ void bgp_zebra_announce_default(struct bgp *bgp, struct nexthop *nh,
SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);
api_nh = &api.nexthops[0];
api.distance = ZEBRA_EBGP_DISTANCE_DEFAULT;
SET_FLAG(api.message, ZAPI_MESSAGE_DISTANCE);
/* redirect IP */
if (nh->gate.ipv4.s_addr) {
char buff[PREFIX_STRLEN];