summaryrefslogtreecommitdiff
path: root/lib/json.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2023-05-11 13:56:16 +0200
committerPhilippe Guibert <philippe.guibert@6wind.com>2023-06-16 10:54:58 +0200
commit1069425868d108bd6e582f6b67a78a1d9ac4bd85 (patch)
treeaee07885b7faa1c1ed29666d4cc4fa5babfd2754 /lib/json.c
parent28d5c6e531b685725ee4c6fec90813041bfb2bc3 (diff)
bgpd: allocate label bound to received mpls vpn routes
Current implementation does not offer a new label to bind to a received VPN route entry to redistribute with that new label. This commit allocates a label for VPN entries that have a valid label, and a reachable next-hop interface that is configured as follows: > interface eth0 > mpls bgp l3vpn-multi-domain-switching > exit An mplsvpn next-hop label binding entry is created in an mpls vpn nexthop label bind hash table of the current BGP instance. That mpls vpn next-hop label entry is indexed by the (next-hop, orig_label) values provided by the incoming updates, and shared with other updates having the same (next-hop, orig_label) values. A new 'LP_TYPE_BGP_L3VPN_BIND' label value is picked up from the zebra mpls label pool, and assigned to the new_label attribute. The 'bgp_path_info' appends a 'bgp_mplsvpn_nh_label_bind' structure to the 'mplsvpn' union structure. Both structures in the union are not used at the same, as the paths are either VRF updates to export, or MPLS VPN updates. Using an union gives a 24 bytes memory gain compared to if the structures had not been in an union (24 bytes compared to 48 bytes). Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/json.c')
0 files changed, 0 insertions, 0 deletions