Skip to content

Commit

Permalink
add BGP capability support for vpn
Browse files Browse the repository at this point in the history
  • Loading branch information
v0tti committed Mar 14, 2024
1 parent bf7d66c commit 6e577b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bgp_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ pub async fn run_peer(
let mut caps = vec![
BgpCapability::SafiIPv4u,
BgpCapability::SafiIPv6u,
BgpCapability::SafiVPNv4u,
BgpCapability::SafiVPNv6u,
BgpCapability::CapRR,
BgpCapability::CapASN32(cfg.asn),
];
if cfg.add_path {
caps.push(BgpCapability::CapAddPath(vec![
BgpCapAddPath::new_from_cap(BgpCapability::SafiIPv4u, true, true).unwrap(),
BgpCapAddPath::new_from_cap(BgpCapability::SafiIPv6u, true, true).unwrap(),
BgpCapAddPath::new_from_cap(BgpCapability::SafiVPNv4u, true, true).unwrap(),
BgpCapAddPath::new_from_cap(BgpCapability::SafiVPNv6u, true, true).unwrap(),
]));
}

Expand Down

0 comments on commit 6e577b5

Please sign in to comment.