diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2023-05-11 15:26:50 +0200 |
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2023-06-16 10:54:58 +0200 |
| commit | 98c615f05a0965d916964e389fde24c4237e0296 (patch) | |
| tree | 7e0ee9018052dcf24a8b3cc7f8ab04e38396f968 /bgpd/bgp_mplsvpn.h | |
| parent | 1069425868d108bd6e582f6b67a78a1d9ac4bd85 (diff) | |
bgpd: advertise mpls vpn routes with appropriate label
The advertised label value from mpls vpn routes is not modified
when the advertised next-hop is modified to next-hop-self.
Actually, the original label value received is redistributed as
is, whereas the new_label value bound in the nexthop label
bind entry should be used.
Only the VPN entries that contain MPLS information, and that
are redistributed between distinct peers, will have a label
value to advertise.
- no SRv6 attribute
- no local prefix
- no exported VPN prefixes from a VRF
If the advertisement to a given peer has the next-hop modified,
then the new label value will be picked up. The considered cases
are peers configured with 'next-hop-self' option, or ebgp peerings
without the 'next-hop-unchanged' option.
Note that the the NLRI format will follow the rfc3107 format, as
multiple label values for MPLS VPN NLRIs are not supported (the
rfc8277 is not supported).
Note also that the case where an outgoing route-map is applied to
the outgoing neighbor is not considered in this commit.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'bgpd/bgp_mplsvpn.h')
| -rw-r--r-- | bgpd/bgp_mplsvpn.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bgpd/bgp_mplsvpn.h b/bgpd/bgp_mplsvpn.h index 132e96f0f2..6ff7a0a020 100644 --- a/bgpd/bgp_mplsvpn.h +++ b/bgpd/bgp_mplsvpn.h @@ -332,6 +332,7 @@ bgp_mplsvpn_nh_label_bind_cmp(const struct bgp_mplsvpn_nh_label_bind_cache *a, extern void bgp_mplsvpn_path_nh_label_bind_unlink(struct bgp_path_info *pi); extern void bgp_mplsvpn_nh_label_bind_register_local_label( struct bgp *bgp, struct bgp_dest *dest, struct bgp_path_info *pi); +mpls_label_t bgp_mplsvpn_nh_label_bind_get_label(struct bgp_path_info *pi); /* used to bind a local label to the (label, nexthop) values * from an incoming BGP mplsvpn update |
