From 126215c1238eb42cc92d23aefbe1fac3b204438f Mon Sep 17 00:00:00 2001 From: Feng Lu Date: Fri, 22 May 2015 11:39:58 +0200 Subject: *: call if_init()/if_terminate() from vrf_init()/vrf_terminate() Later, an interface will belong to a specific VRF, and the interface initialization will be a part of the VRF initialization. So now call if_init() from vrf_init(), and if_terminate() from vrf_terminate(). Daemons have the according changes: - if if_init() was called or "iflist" was initialized, now call vrf_init() instead; - if if_terminate() was called or "iflist" was destroyed, now call vrf_terminate() instead. Signed-off-by: Feng Lu Reviewed-by: Alain Ritoux Signed-off-by: Nicolas Dichtel Acked-by: Vincent JARDIN Signed-off-by: David Lamparter --- pimd/pimd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pimd/pimd.c') diff --git a/pimd/pimd.c b/pimd/pimd.c index 855defcc..78c3ff5d 100644 --- a/pimd/pimd.c +++ b/pimd/pimd.c @@ -24,6 +24,7 @@ #include "log.h" #include "memory.h" +#include "vrf.h" #include "pimd.h" #include "pim_cmd.h" @@ -130,12 +131,12 @@ void pim_init() qpim_infinite_assert_metric.route_metric = PIM_ASSERT_ROUTE_METRIC_MAX; qpim_infinite_assert_metric.ip_address = qpim_inaddr_any; - pim_if_init(); pim_cmd_init(); pim_ssmpingd_init(); } void pim_terminate() { + vrf_terminate(); pim_free(); } -- cgit v1.2.3