From af8e7f78af9b13c2cf6615dc9eb6c52c51b2bc2c Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sun, 16 Feb 2020 13:42:18 +0100 Subject: 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 Signed-off-by: Sander Vrijders --- src/ipcpd/unicast/pol/simple_pff.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/ipcpd/unicast/pol/simple_pff.c') diff --git a/src/ipcpd/unicast/pol/simple_pff.c b/src/ipcpd/unicast/pol/simple_pff.c index c5780703..5bd73d8a 100644 --- a/src/ipcpd/unicast/pol/simple_pff.c +++ b/src/ipcpd/unicast/pol/simple_pff.c @@ -26,14 +26,14 @@ #include -#include -#include - #include "pft.h" #include "simple_pff.h" +#include +#include + struct pff_i { - struct pft * pft; + struct pft * pft; pthread_rwlock_t lock; }; @@ -101,6 +101,7 @@ int simple_pff_add(struct pff_i * pff_i, int * fds; assert(pff_i); + assert(fd); assert(len > 0); (void) len; @@ -127,6 +128,7 @@ int simple_pff_update(struct pff_i * pff_i, int * fds; assert(pff_i); + assert(fd); assert(len > 0); (void) len; -- cgit v1.2.3