projects
/
dnsseed-rust
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d47419
)
Fix handling failed route lookups
author
Matt Corallo
<git@bluematt.me>
Fri, 23 Aug 2019 01:14:53 +0000
(21:14 -0400)
committer
Matt Corallo
<git@bluematt.me>
Fri, 23 Aug 2019 03:42:07 +0000
(23:42 -0400)
src/bgp_client.rs
patch
|
blob
|
history
diff --git
a/src/bgp_client.rs
b/src/bgp_client.rs
index cb33305d4e17bde8b2d318fa438fb89775ddf2f4..a890dad9cd72b227c5948461eefab5d2979899c8 100644
(file)
--- a/
src/bgp_client.rs
+++ b/
src/bgp_client.rs
@@
-182,7
+182,7
@@
impl BGPClient {
.then(path_b.med.cmp(&path_a.med))
});
// TODO: Find last common ASN among all paths
- *path_vecs
[0].path.last(
).unwrap_or(&0)
+ *path_vecs
.first().map(|route| route.path.last().unwrap_or(&0)
).unwrap_or(&0)
}
pub fn disconnect(&self) {