diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-03-22 15:00:07 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-03-22 18:16:49 +0100 |
commit | 1e37e35c3ea88672c677ea7ac63fe0b9df609b0c (patch) | |
tree | 8400d1b28ae6d4d0146ad1573c7ebd3653152ace /proto/bgp/bgp.c | |
parent | ead7b8f498ddefc0b7373cbba78f9a7ba1dddaa9 (diff) |
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.
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r-- | proto/bgp/bgp.c | 11 |
1 files changed, 9 insertions, 2 deletions
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, |