mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 03:47:47 +00:00
Merge pull request #527 from LabNConsulting/working/master/patch-set/issue471+473
Master: Restore label distribution for VPN safi
This commit is contained in:
commit
59371d4f21
@ -42,7 +42,8 @@ extern int bgp_nlri_parse_label (struct peer *peer, struct attr *attr,
|
|||||||
static inline int
|
static inline int
|
||||||
bgp_labeled_safi (safi_t safi)
|
bgp_labeled_safi (safi_t safi)
|
||||||
{
|
{
|
||||||
if ((safi == SAFI_LABELED_UNICAST) || (safi == SAFI_MPLS_VPN))
|
if ((safi == SAFI_LABELED_UNICAST) || (safi == SAFI_MPLS_VPN) ||
|
||||||
|
(safi == SAFI_EVPN))
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1270,7 +1270,7 @@ subgroup_announce_check (struct bgp_node *rn, struct bgp_info *ri,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If it's labeled safi, make sure the route has a valid label. */
|
/* If it's labeled safi, make sure the route has a valid label. */
|
||||||
if (bgp_labeled_safi(safi))
|
if (safi == SAFI_LABELED_UNICAST)
|
||||||
{
|
{
|
||||||
u_char *tag = bgp_adv_label(rn, ri, peer, afi, safi);
|
u_char *tag = bgp_adv_label(rn, ri, peer, afi, safi);
|
||||||
if (!bgp_is_valid_label(tag))
|
if (!bgp_is_valid_label(tag))
|
||||||
@ -1941,9 +1941,9 @@ bgp_process_main (struct work_queue *wq, void *data)
|
|||||||
* Right now, since we only deal with per-prefix labels, it is not necessary
|
* Right now, since we only deal with per-prefix labels, it is not necessary
|
||||||
* to do this upon changes to best path except of the label index changes.
|
* to do this upon changes to best path except of the label index changes.
|
||||||
*/
|
*/
|
||||||
bgp_table_lock (bgp_node_table (rn));
|
if (safi == SAFI_LABELED_UNICAST)
|
||||||
if (bgp_labeled_safi (safi))
|
|
||||||
{
|
{
|
||||||
|
bgp_table_lock (bgp_node_table (rn));
|
||||||
if (new_select)
|
if (new_select)
|
||||||
{
|
{
|
||||||
if (!old_select ||
|
if (!old_select ||
|
||||||
@ -2848,7 +2848,7 @@ bgp_update (struct peer *peer, struct prefix *p, u_int32_t addpath_id,
|
|||||||
new = info_make(type, sub_type, 0, peer, attr_new, rn);
|
new = info_make(type, sub_type, 0, peer, attr_new, rn);
|
||||||
|
|
||||||
/* Update MPLS tag. */
|
/* Update MPLS tag. */
|
||||||
if (bgp_labeled_safi(safi) || safi == SAFI_EVPN)
|
if (bgp_labeled_safi(safi))
|
||||||
memcpy ((bgp_info_extra_get (new))->tag, tag, 3);
|
memcpy ((bgp_info_extra_get (new))->tag, tag, 3);
|
||||||
|
|
||||||
/* Update Overlay Index */
|
/* Update Overlay Index */
|
||||||
|
@ -60,16 +60,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|||||||
|
|
||||||
static struct peer_group *
|
static struct peer_group *
|
||||||
listen_range_exists (struct bgp *bgp, struct prefix *range, int exact);
|
listen_range_exists (struct bgp *bgp, struct prefix *range, int exact);
|
||||||
#if 0
|
|
||||||
#define INSTALL_CMD_ON_AF_NODES(cmd) \
|
|
||||||
install_element(BGP_IPV4_NODE, cmd); \
|
|
||||||
install_element(BGP_IPV4M_NODE, cmd); \
|
|
||||||
install_element(BGP_IPV4L_NODE, cmd); \
|
|
||||||
install_element(BGP_IPV6_NODE, cmd); \
|
|
||||||
install_element(BGP_IPV6M_NODE, cmd); \
|
|
||||||
install_element(BGP_IPV6L_NODE, cmd); \
|
|
||||||
install_element(BGP_VPNV4_NODE, cmd);
|
|
||||||
#endif
|
|
||||||
static enum node_type
|
static enum node_type
|
||||||
bgp_node_type (afi_t afi, safi_t safi)
|
bgp_node_type (afi_t afi, safi_t safi)
|
||||||
{
|
{
|
||||||
@ -111,7 +102,7 @@ bgp_node_type (afi_t afi, safi_t safi)
|
|||||||
return BGP_VPNV6_NODE;
|
return BGP_VPNV6_NODE;
|
||||||
break;
|
break;
|
||||||
case SAFI_ENCAP:
|
case SAFI_ENCAP:
|
||||||
return BGP_ENCAP_NODE;
|
return BGP_ENCAPV6_NODE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1198,6 +1198,7 @@ add_vnc_route (
|
|||||||
bgp, prd, table, p, new);
|
bgp, prd, table, p, new);
|
||||||
}
|
}
|
||||||
bgp_unlock_node (prn);
|
bgp_unlock_node (prn);
|
||||||
|
encode_label (label_val, bn->local_label);
|
||||||
}
|
}
|
||||||
|
|
||||||
bgp_unlock_node (bn);
|
bgp_unlock_node (bn);
|
||||||
|
Loading…
Reference in New Issue
Block a user