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>
This commit is contained in:
Abhinay Ramesh 2022-02-18 07:36:45 +00:00 committed by Iqra Siddiqui
parent 695c24c3b0
commit f78cfba9c9

View File

@ -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. */