diff options
author | Dimitri Staessens <[email protected]> | 2020-02-16 13:42:18 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2020-02-16 18:32:21 +0100 |
commit | af8e7f78af9b13c2cf6615dc9eb6c52c51b2bc2c (patch) | |
tree | d9ff5e60b3bf8be2477b46ee98fc441c815cab63 /src/ipcpd/unicast/pol/link_state.c | |
parent | 52e44a55d3b12819a79566067ff0361854da5002 (diff) | |
download | ouroboros-af8e7f78af9b13c2cf6615dc9eb6c52c51b2bc2c.tar.gz ouroboros-af8e7f78af9b13c2cf6615dc9eb6c52c51b2bc2c.zip |
Add equal-cost multipath routing policy
This adds an equal-cost multipath routing policy to Ouroboros, based
on Nick Aerts' code. When selected, flows will send packets over all
paths with equal cost (hop count). Path selection is round-robin. It
does not yet take into account flows that are down.
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/ipcpd/unicast/pol/link_state.c')
-rw-r--r-- | src/ipcpd/unicast/pol/link_state.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ipcpd/unicast/pol/link_state.c b/src/ipcpd/unicast/pol/link_state.c index e2656a98..5360f556 100644 --- a/src/ipcpd/unicast/pol/link_state.c +++ b/src/ipcpd/unicast/pol/link_state.c @@ -934,6 +934,10 @@ int link_state_init(enum pol_routing pr) log_dbg("Using Loop-Free Alternates policy."); ls.routing_algo = ROUTING_LFA; break; + case ROUTING_LINK_STATE_ECMP: + log_dbg("Using Equal-Cost Multipath policy."); + ls.routing_algo = ROUTING_ECMP; + break; default: goto fail_graph; } @@ -974,8 +978,8 @@ int link_state_init(enum pol_routing pr) if (rib_reg(LSDB, &r_ops)) goto fail_rib_reg; - ls.db_len = 0; - ls.nbs_len = 0; + ls.db_len = 0; + ls.nbs_len = 0; return 0; |