From 38a8c751a4a1f55cb8ca31d17a761cecbe9dffb8 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 29 May 2019 08:56:03 -0400 Subject: [PATCH] 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 --- bgpd/bgp_zebra.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index a45480fdc2..42aff52891 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -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];