summaryrefslogtreecommitdiff
path: root/src/ipcpd/unicast/dt.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2020-02-12 22:31:18 +0100
committerSander Vrijders <sander@ouroboros.rocks>2020-02-16 18:21:41 +0100
commit0ae1f0dd600f6c21c34565cf4dc0c5ef0ae42709 (patch)
tree023e611cb59e4e14f03adaffa15190c835f80814 /src/ipcpd/unicast/dt.c
parent71eeedd1a05d5dd200c77527ea15086bf43e1a26 (diff)
downloadouroboros-0ae1f0dd600f6c21c34565cf4dc0c5ef0ae42709.tar.gz
ouroboros-0ae1f0dd600f6c21c34565cf4dc0c5ef0ae42709.zip
ipcpd: Configure PFF from routing policy
The Packet Forwarding Function (PFF) was user-configurable using the irm tool. However, this isn't really wanted since the PFF is dictated by the routing algorithm. This moves the responsability for selecting the correct PFF from the network admin to the unicast IPCP implementation. Each routing policy now has to specify which PFF it will use. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd/unicast/dt.c')
-rw-r--r--src/ipcpd/unicast/dt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ipcpd/unicast/dt.c b/src/ipcpd/unicast/dt.c
index cabc159d..ee14d28e 100644
--- a/src/ipcpd/unicast/dt.c
+++ b/src/ipcpd/unicast/dt.c
@@ -621,7 +621,6 @@ static void * dt_conn_handle(void * o)
}
int dt_init(enum pol_routing pr,
- enum pol_pff pp,
uint8_t addr_size,
uint8_t eid_size,
uint8_t max_ttl)
@@ -629,6 +628,7 @@ int dt_init(enum pol_routing pr,
int i;
int j;
char dtstr[256];
+ enum pol_pff pp;
struct conn_info info;
memset(&info, 0, sizeof(info));
@@ -659,7 +659,8 @@ int dt_init(enum pol_routing pr,
goto fail_connmgr_comp_init;
}
- if (routing_init(pr)) {
+ pp = routing_init(pr);
+ if (pp < 0) {
log_err("Failed to init routing.");
goto fail_routing;
}