summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-05-29 08:56:03 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-05-29 08:56:03 -0400
commit38a8c751a4a1f55cb8ca31d17a761cecbe9dffb8 (patch)
tree30215d28c1e159dd1e3fa65cbce665bca9b862e9
parent362e887852aef627c9880a46406e81b99c2be69b (diff)
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>
-rw-r--r--bgpd/bgp_zebra.c3
1 files changed, 3 insertions, 0 deletions
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];