mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
BGP: Support for MPLS labels and VPN SAFI
Basic support for SAFI 4 and 128 (MPLS labeled IP and VPN) for IPv4 and IPv6. Should work for route reflector, but does not properly handle originating routes with next hop self. Based on patches from Jan Matejka.
This commit is contained in:
@@ -86,6 +86,7 @@
|
||||
|
||||
|
||||
struct linpool *bgp_linpool; /* Global temporary pool */
|
||||
struct linpool *bgp_linpool2; /* Global temporary pool for bgp_rt_notify() */
|
||||
static list bgp_sockets; /* Global list of listening sockets */
|
||||
|
||||
|
||||
@@ -151,7 +152,10 @@ bgp_open(struct bgp_proto *p)
|
||||
add_tail(&bgp_sockets, &bs->n);
|
||||
|
||||
if (!bgp_linpool)
|
||||
bgp_linpool = lp_new(proto_pool, 4080);
|
||||
{
|
||||
bgp_linpool = lp_new(proto_pool, 4080);
|
||||
bgp_linpool2 = lp_new(proto_pool, 4080);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -187,6 +191,9 @@ bgp_close(struct bgp_proto *p)
|
||||
|
||||
rfree(bgp_linpool);
|
||||
bgp_linpool = NULL;
|
||||
|
||||
rfree(bgp_linpool2);
|
||||
bgp_linpool2 = NULL;
|
||||
}
|
||||
|
||||
static inline int
|
||||
@@ -1970,7 +1977,7 @@ struct protocol proto_bgp = {
|
||||
.template = "bgp%d",
|
||||
.attr_class = EAP_BGP,
|
||||
.preference = DEF_PREF_BGP,
|
||||
.channel_mask = NB_IP | NB_FLOW4 | NB_FLOW6,
|
||||
.channel_mask = NB_IP | NB_VPN | NB_FLOW,
|
||||
.proto_size = sizeof(struct bgp_proto),
|
||||
.config_size = sizeof(struct bgp_config),
|
||||
.postconfig = bgp_postconfig,
|
||||
|
||||
Reference in New Issue
Block a user