From 1e37e35c3ea88672c677ea7ac63fe0b9df609b0c Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Wed, 22 Mar 2017 15:00:07 +0100 Subject: 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. --- proto/bgp/bgp.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'proto/bgp/bgp.c') diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 5e95e6b4..976fbd90 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -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, -- cgit v1.2.3