Skip to content

Commit

Permalink
routing: implement static routes
Browse files Browse the repository at this point in the history
Signed-off-by: Renato Westphal <[email protected]>
  • Loading branch information
rwestphal committed Nov 3, 2023
1 parent 0502e64 commit e1ad5ed
Show file tree
Hide file tree
Showing 9 changed files with 444 additions and 15 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ Holo supports the following IETF RFCs and Internet drafts:
| ietf-bfd@2022-09-22 | 100.00% | 100.00% | - | - | [100.00%](http://westphal.com.br/holo/ietf-bfd.html) |
| ietf-interfaces@2018-01-09 | 100.00% | 0.00% | - | - | [22.22%](http://westphal.com.br/holo/ietf-interfaces.html) |
| ietf-ip@2018-01-09 | 17.39% | 0.00% | - | - | [13.33%](http://westphal.com.br/holo/ietf-ip.html) |
| ietf-ipv4-unicast-routing@2018-03-13 | 0.00% | 100.00% | - | - | [18.75%](http://westphal.com.br/holo/ietf-ipv4-unicast-routing.html) |
| ietf-ipv6-unicast-routing@2018-03-13 | 0.00% | 100.00% | - | - | [8.57%](http://westphal.com.br/holo/ietf-ipv6-unicast-routing.html) |
| ietf-ipv4-unicast-routing@2018-03-13 | 100.00% | 100.00% | - | - | [100.00%](http://westphal.com.br/holo/ietf-ipv4-unicast-routing.html) |
| ietf-ipv6-unicast-routing@2018-03-13 | 40.62% | 100.00% | - | - | [45.71%](http://westphal.com.br/holo/ietf-ipv6-unicast-routing.html) |
| ietf-key-chain@2017-04-18 | 100.00% | 100.00% | - | - | [100.00%](http://westphal.com.br/holo/ietf-key-chain.html) |
| ietf-mpls-ldp@2022-03-14 | 86.96% | 92.31% | 100.00% | 100.00% | [92.38%](http://westphal.com.br/holo/ietf-mpls-ldp.html) |
| ietf-mpls@2020-12-18 | 0.00% | 57.14% | - | - | [35.29%](http://westphal.com.br/holo/ietf-mpls.html) |
Expand All @@ -204,7 +204,7 @@ Holo supports the following IETF RFCs and Internet drafts:
| ietf-ospfv3-extended-lsa@2023-08-21 | 50.00% | 85.28% | - | - | [84.85%](http://westphal.com.br/holo/ietf-ospfv3-extended-lsa.html) |
| ietf-rip@2020-02-20 | 27.91% | 93.33% | 100.00% | - | [55.41%](http://westphal.com.br/holo/ietf-rip.html) |
| ietf-routing-policy@2021-10-11 | 100.00% | 0.00% | - | - | [98.11%](http://westphal.com.br/holo/ietf-routing-policy.html) |
| ietf-routing@2018-03-13 | 91.67% | 85.71% | - | - | [88.46%](http://westphal.com.br/holo/ietf-routing.html) |
| ietf-routing@2018-03-13 | 100.00% | 85.71% | - | - | [92.31%](http://westphal.com.br/holo/ietf-routing.html) |
| ietf-segment-routing-mpls@2021-05-26 | 62.50% | 0.00% | - | 23.53% | [32.76%](http://westphal.com.br/holo/ietf-segment-routing-mpls.html) |
| ietf-segment-routing@2021-05-26 | 100.00% | - | - | - | [100.00%](http://westphal.com.br/holo/ietf-segment-routing.html) |

Expand Down
6 changes: 5 additions & 1 deletion holo-routing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ use holo_utils::ibus::{IbusMsg, IbusReceiver, IbusSender};
use holo_utils::protocol::Protocol;
use holo_utils::sr::SrCfg;
use holo_utils::Database;
use ipnetwork::IpNetwork;
use tokio::sync::mpsc;
use tracing::Instrument;

use crate::rib::Rib;
use crate::rib::{Rib, StaticRoute};

pub struct Master {
// Northbound Tx channel.
Expand All @@ -42,6 +43,8 @@ pub struct Master {
pub netlink_handle: rtnetlink::Handle,
// RIB.
pub rib: Rib,
// Static routes.
pub static_routes: BTreeMap<IpNetwork, StaticRoute>,
// SR configuration data.
pub sr_config: SrCfg,
// Protocol instances.
Expand Down Expand Up @@ -176,6 +179,7 @@ pub fn start(
event_recorder_config,
netlink_handle: netlink::init(),
rib: Default::default(),
static_routes: Default::default(),
sr_config: Default::default(),
instances: Default::default(),
};
Expand Down
Loading

0 comments on commit e1ad5ed

Please sign in to comment.