diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2025-08-11 20:32:23 +0200 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2025-08-18 08:29:23 +0200 |
commit | 961b3824bfb82ddb00f85c1a7fbed7f802f48219 (patch) | |
tree | f36d3f29f2a8a875b26db25307cb735db09f7711 /src/ipcpd/unicast/routing.c | |
parent | f3a8b05a9e71473b88132919f8f1813eb577f71a (diff) | |
download | ouroboros-961b3824bfb82ddb00f85c1a7fbed7f802f48219.tar.gz ouroboros-961b3824bfb82ddb00f85c1a7fbed7f802f48219.zip |
ipcpd: Configure link-state at bootstrap
The link-state component had some values defined in the source such as
link-state advertisement interval, link timeout period and the PFF
recalculation time. These can now be configured from the config file
or via "irm ipcp bootstrap" on the command line.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd/unicast/routing.c')
-rw-r--r-- | src/ipcpd/unicast/routing.c | 22 |
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) |