Skip to content

Commit

Permalink
Integrate roto-api in Krill replacing RISwhois (#1233)
Browse files Browse the repository at this point in the history
This PR replaces the downloading and parsing of RISwhois files in Krill
with the roto-api.
  • Loading branch information
Koenvh1 authored Dec 20, 2024
1 parent 5fa686c commit 6da2c80
Show file tree
Hide file tree
Showing 18 changed files with 885 additions and 968,923 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

7 changes: 3 additions & 4 deletions defaults/krill.conf
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,10 @@
#
### ca_refresh_jitter_seconds = 43200

# Enable loading BGP Dumps from RIS for ROA vs BGP analysis.
# Enable loading information from bgp-api.net for ROA vs BGP analysis.
#
# bgp_risdumps_enabled = true
# bgp_risdump_v4_uri = "http://www.ris.ripe.net/dumps/riswhoisdump.IPv4.gz"
# bgp_risdump_v6_uri = "http://www.ris.ripe.net/dumps/riswhoisdump.IPv6.gz"
# bgp_api_enabled = true
# bgp_api_uri = "https://rest.bgp-api.net"

# Restrict size of messages sent to the API.
#
Expand Down
5 changes: 0 additions & 5 deletions doc/development/06_ca_manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,6 @@ persistent queue - to ensure that the tasks are not lost (typically they
would be around 1 year into the future on every issuance). Plus we would
need logic to clean up tasks for removed objects - so this needs some thought.

### Task::RefreshAnnouncementsInfo

This task checks whether the time has come to try and re-fetch RIS Whois
BGP information and update the `Arc<BgpAnalyser>`.

### Task::SweepLoginCache

This task triggers that expired logins are removed from the cache in
Expand Down
24 changes: 24 additions & 0 deletions src/commons/api/roas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,18 @@ impl FromStr for TypedPrefix {
}
}

impl From<Ipv4Prefix> for TypedPrefix {
fn from(prefix: Ipv4Prefix) -> Self {
TypedPrefix::V4(prefix)
}
}

impl From<Ipv6Prefix> for TypedPrefix {
fn from(prefix: Ipv6Prefix) -> Self {
TypedPrefix::V6(prefix)
}
}

impl fmt::Debug for TypedPrefix {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", &self)
Expand Down Expand Up @@ -854,6 +866,12 @@ impl fmt::Debug for Ipv4Prefix {
}
}

impl From<Prefix> for Ipv4Prefix {
fn from(prefix: Prefix) -> Self {
Ipv4Prefix(prefix)
}
}

//------------ Ipv6Prefix --------------------------------------------------
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
pub struct Ipv6Prefix(Prefix);
Expand All @@ -876,6 +894,12 @@ impl fmt::Debug for Ipv6Prefix {
}
}

impl From<Prefix> for Ipv6Prefix {
fn from(prefix: Prefix) -> Self {
Ipv6Prefix(prefix)
}
}

//------------ AsNumber ----------------------------------------------------

#[derive(Clone, Copy, Deserialize, Eq, Hash, PartialEq, Serialize)]
Expand Down
Loading

0 comments on commit 6da2c80

Please sign in to comment.