summaryrefslogtreecommitdiff
path: root/bgpd/bgp_updgrp_adv.c
diff options
context:
space:
mode:
authorAbhinay Ramesh <rabhinay@vmware.com>2022-02-18 07:36:45 +0000
committerIqra Siddiqui <imujeebsiddi@vmware.com>2022-04-12 19:55:54 -0700
commitf78cfba9c9746534855c5739bb90d48c6ed9e0d1 (patch)
tree62477892e596aa63352b03b979cf652e6e2ebb12 /bgpd/bgp_updgrp_adv.c
parent695c24c3b0fed1e3dc5d0ccd6bc91cc98301ee89 (diff)
bgpd: Metric not set with default route.
Description: - When default route is originated using the neighbor default-originate command, MED is not set as part of the update message attribute. - Changes are done to set the MED value and MED flag for default route. Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com> Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
Diffstat (limited to 'bgpd/bgp_updgrp_adv.c')
-rw-r--r--bgpd/bgp_updgrp_adv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgp_updgrp_adv.c b/bgpd/bgp_updgrp_adv.c
index 0d8ee79ae5..87558f9c35 100644
--- a/bgpd/bgp_updgrp_adv.c
+++ b/bgpd/bgp_updgrp_adv.c
@@ -818,6 +818,8 @@ void subgroup_default_originate(struct update_subgroup *subgrp, int withdraw)
assert(attr.aspath);
attr.local_pref = bgp->default_local_pref;
+ attr.med = 0;
+ attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_MULTI_EXIT_DISC);
if ((afi == AFI_IP6) || peer_cap_enhe(peer, afi, safi)) {
/* IPv6 global nexthop must be included. */