Skip to content

Commit

Permalink
temporary stable zettabgp without FQDN capability support
Browse files Browse the repository at this point in the history
  • Loading branch information
yu-re-ka committed Jan 31, 2023
1 parent 60254ba commit b308e58
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ tokio = { version = "1.23.0", features = ["rt", "macros", "time", "rt-multi-thre
tokio-stream = "0.1.11"
tokio-util = { version = "0.7.4", features = ["codec"] }
weak-table = "0.3.2"
zettabgp = { git = "https://github.com/wobcom/zettabgp", branch = "more-capabilities" }
zettabgp = "0.3.3"
nibbletree = { version = "0.1.0", path = "./nibbletree", features = ["ipnet"] }

[[bin]]
Expand Down
13 changes: 1 addition & 12 deletions src/bgp_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,10 @@ pub async fn run_peer(cfg: PeerConfig, table: impl Table, stream: TcpStream, cli
),
stream,
);
let open_message = dumper.start_active().await?;
dumper.start_active().await?;
let stream = dumper.lifecycle();
pin_mut!(stream);
let client_name = cfg.name_override
.or(open_message.caps.iter().find_map(|x| {
if let BgpCapability::CapFQDN(hostname, domainname) = x {
let mut name = hostname.to_string();
if domainname != "" {
name = format!("{}.{}", name, domainname);
}
Some(name)
} else {
None
}
}))
.unwrap_or(client_addr.ip().to_string());
table.client_up(client_addr, Client { client_name, ..Default::default() }).await;
loop {
Expand Down

0 comments on commit b308e58

Please sign in to comment.