MIX(extra->aggregator_addr.s_addr);
MIX(extra->weight);
MIX(extra->mp_nexthop_global_in.s_addr);
+ MIX(extra->originator_id.s_addr);
}
if (attr->aspath)
&& IPV4_ADDR_SAME (&ae1->mp_nexthop_global_in, &ae2->mp_nexthop_global_in)
&& ae1->ecommunity == ae2->ecommunity
&& ae1->cluster == ae2->cluster
- && ae1->transit == ae2->transit)
+ && ae1->transit == ae2->transit
+ && IPV4_ADDR_SAME (&ae1->originator_id, &ae2->originator_id))
return 1;
else if (ae1 || ae2)
return 0;
attr->local_pref = bgp->default_local_pref;
}
+ /* If originator-id is not set and the route is to be reflected,
+ set the originator id */
+ if (peer && from && peer->sort == BGP_PEER_IBGP &&
+ from->sort == BGP_PEER_IBGP &&
+ (! (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_ORIGINATOR_ID))))
+ {
+ attr->extra = bgp_attr_extra_get(attr);
+ IPV4_ADDR_COPY(&(attr->extra->originator_id), &(from->remote_id));
+ SET_FLAG(attr->flag, BGP_ATTR_ORIGINATOR_ID);
+ }
+
/* Remove MED if its an EBGP peer - will get overwritten by route-maps */
if (peer->sort == BGP_PEER_EBGP
&& attr->flag & ATTR_FLAG_BIT (BGP_ATTR_MULTI_EXIT_DISC))