return NULL;
}
+ /* If the RT was changed via extended communities as an
+ * import/export list, we should withdraw implicitly the old
+ * path from VRFs.
+ * For instance, RT list was modified using route-maps:
+ * route-map test permit 10
+ * set extcommunity rt none
+ */
+ if (CHECK_FLAG(bpi->attr->flag,
+ ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES)) &&
+ CHECK_FLAG(new_attr->flag,
+ ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES))) {
+ if (!ecommunity_cmp(bpi->attr->ecommunity,
+ new_attr->ecommunity)) {
+ vpn_leak_to_vrf_withdraw(bgp, bpi);
+ bgp_aggregate_decrement(bgp, p, bpi, afi, safi);
+ bgp_path_info_delete(bn, bpi);
+ }
+ }
+
/* attr is changed */
bgp_path_info_set_flag(bn, bpi, BGP_PATH_ATTR_CHANGED);