diff options
author | Feng Lu <lu.feng@6wind.com> | 2015-05-22 11:39:58 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2015-06-02 06:58:12 +0200 |
commit | 126215c1238eb42cc92d23aefbe1fac3b204438f (patch) | |
tree | 22910b50f39003e297efc6236711581cbf3b2ada /ripd | |
parent | 2fc97f6335dd5d7df2c285b363c6ef56bb98dcf8 (diff) | |
download | quagga-126215c1238eb42cc92d23aefbe1fac3b204438f.tar.bz2 quagga-126215c1238eb42cc92d23aefbe1fac3b204438f.tar.xz |
*: 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 <lu.feng@6wind.com>
Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ripd')
-rw-r--r-- | ripd/rip_interface.c | 1 | ||||
-rw-r--r-- | ripd/rip_main.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 35685a75..f26ef48a 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -2055,7 +2055,6 @@ void rip_if_init (void) { /* Default initial size of interface vector. */ - if_init(); if_add_hook (IF_NEW_HOOK, rip_interface_new_hook); if_add_hook (IF_DELETE_HOOK, rip_interface_delete_hook); diff --git a/ripd/rip_main.c b/ripd/rip_main.c index e81e61b8..95b1f6d4 100644 --- a/ripd/rip_main.c +++ b/ripd/rip_main.c @@ -33,6 +33,7 @@ #include "privs.h" #include "sigevent.h" #include "zclient.h" +#include "vrf.h" #include "ripd/ripd.h" @@ -280,6 +281,7 @@ main (int argc, char **argv) vty_init (master); memory_init (); keychain_init (); + vrf_init (); /* RIP related initialization. */ rip_init (); |