summaryrefslogtreecommitdiff
path: root/src/ipcpd/unicast/routing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcpd/unicast/routing.c')
-rw-r--r--src/ipcpd/unicast/routing.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/ipcpd/unicast/routing.c b/src/ipcpd/unicast/routing.c
index 4efc3ea6..2ad7b234 100644
--- a/src/ipcpd/unicast/routing.c
+++ b/src/ipcpd/unicast/routing.c
@@ -30,31 +30,21 @@
struct routing_ops * r_ops;
-int routing_init(enum pol_routing pr)
+int routing_init(struct routing_config * conf,
+ enum pol_pff * pff_type)
{
- enum pol_pff pff_type;
+ void * cfg;
- switch (pr) {
+ switch (conf->pol) {
case ROUTING_LINK_STATE:
- pff_type = PFF_SIMPLE;
- r_ops = &link_state_ops;
- break;
- case ROUTING_LINK_STATE_LFA:
- pff_type = PFF_ALTERNATE;
- r_ops = &link_state_ops;
- break;
- case ROUTING_LINK_STATE_ECMP:
- pff_type=PFF_MULTIPATH;
r_ops = &link_state_ops;
+ cfg = &conf->ls;
break;
default:
return -ENOTSUP;
}
- if (r_ops->init(pr))
- return -1;
-
- return pff_type;
+ return r_ops->init(cfg, pff_type);
}
int routing_start(void)