From 5d87cec1757c4e1c23ae778f2814363c1e39b43c Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Mon, 15 May 2017 18:08:53 +0200 Subject: ipcpd: normal: Make routing a policy This makes the routing component into a policy since different approaches may exist to do this, depending on how high the rank of the DIF is. --- src/ipcpd/normal/dt.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/ipcpd/normal/dt.c') diff --git a/src/ipcpd/normal/dt.c b/src/ipcpd/normal/dt.c index 33070fa2..b22fb59c 100644 --- a/src/ipcpd/normal/dt.c +++ b/src/ipcpd/normal/dt.c @@ -143,6 +143,13 @@ int dt_init(void) int i; int j; struct conn_info info; + enum pol_routing pr; + + if (rib_read(BOOT_PATH "/dt/routing/type", &pr, sizeof(pr)) + != sizeof(pr)) { + log_err("Failed to read policy for routing."); + return -1; + } if (dt_pci_init()) { log_err("Failed to init shm dt_pci."); @@ -175,7 +182,7 @@ int dt_init(void) goto fail_nbs; } - if (routing_init(dt.nbs)) { + if (routing_init(pr, dt.nbs)) { log_err("Failed to init routing."); goto fail_nbs_notifier; } -- cgit v1.2.3