summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/dt.c
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2017-05-15 18:08:53 +0200
committerSander Vrijders <[email protected]>2017-05-15 18:21:45 +0200
commit5d87cec1757c4e1c23ae778f2814363c1e39b43c (patch)
treeea57e4a1e634d3b7e7325b61f6dba36d941e03ae /src/ipcpd/normal/dt.c
parent0fc0f3701ef4f504e71eadcc92a93faf1dd33bf4 (diff)
downloadouroboros-5d87cec1757c4e1c23ae778f2814363c1e39b43c.tar.gz
ouroboros-5d87cec1757c4e1c23ae778f2814363c1e39b43c.zip
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.
Diffstat (limited to 'src/ipcpd/normal/dt.c')
-rw-r--r--src/ipcpd/normal/dt.c9
1 files changed, 8 insertions, 1 deletions
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;
}