summaryrefslogtreecommitdiff
path: root/src/ipcpd/unicast/pol/pft.c
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2020-02-16 13:42:18 +0100
committerSander Vrijders <[email protected]>2020-02-16 18:32:21 +0100
commitaf8e7f78af9b13c2cf6615dc9eb6c52c51b2bc2c (patch)
treed9ff5e60b3bf8be2477b46ee98fc441c815cab63 /src/ipcpd/unicast/pol/pft.c
parent52e44a55d3b12819a79566067ff0361854da5002 (diff)
downloadouroboros-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/pft.c')
-rw-r--r--src/ipcpd/unicast/pol/pft.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ipcpd/unicast/pol/pft.c b/src/ipcpd/unicast/pol/pft.c
index 924efbe1..53acc08e 100644
--- a/src/ipcpd/unicast/pol/pft.c
+++ b/src/ipcpd/unicast/pol/pft.c
@@ -149,6 +149,7 @@ int pft_insert(struct pft * pft,
struct list_head * p;
assert(pft);
+ assert(len > 0);
lookup_key = calc_key(pft, dst);