From 961b3824bfb82ddb00f85c1a7fbed7f802f48219 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Mon, 11 Aug 2025 20:32:23 +0200 Subject: 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 --- src/ipcpd/unicast/routing.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'src/ipcpd/unicast/routing.c') 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) -- cgit v1.2.3