diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2024-01-13 14:51:59 +0100 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2024-01-13 14:51:59 +0100 |
commit | fe55bb15be7acb72394f8912ae7c861aa28ef15f (patch) | |
tree | 300119000d1a73b06e7bb691e43f991ce5ccf9b0 /mgmtd/mgmt_main.c | |
parent | Merge pull request #15138 from opensourcerouting/fix/drop_unused_var_bgp_damp (diff) | |
download | frr-fe55bb15be7acb72394f8912ae7c861aa28ef15f.tar.xz frr-fe55bb15be7acb72394f8912ae7c861aa28ef15f.zip |
mgmtd: remove full vrf initialization
We don't really need full VRF infrastructure in mgmtd. We only need to
register vty commands.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'mgmtd/mgmt_main.c')
-rw-r--r-- | mgmtd/mgmt_main.c | 53 |
1 files changed, 2 insertions, 51 deletions
diff --git a/mgmtd/mgmt_main.c b/mgmtd/mgmt_main.c index a70235717..72bb353b2 100644 --- a/mgmtd/mgmt_main.c +++ b/mgmtd/mgmt_main.c @@ -25,7 +25,6 @@ static const struct option longopts[] = { {0}}; static void mgmt_exit(int); -static void mgmt_vrf_terminate(void); /* privileges */ static zebra_capabilities_t _caps_p[] = {ZCAP_BIND, ZCAP_NET_RAW, @@ -114,8 +113,6 @@ static __attribute__((__noreturn__)) void mgmt_exit(int status) /* stop pthreads (if any) */ frr_pthread_stop_all(); - mgmt_vrf_terminate(); - frr_fini(); exit(status); } @@ -139,52 +136,6 @@ static struct frr_signal_t mgmt_signals[] = { }, }; -static int mgmt_vrf_new(struct vrf *vrf) -{ - zlog_debug("VRF Created: %s(%u)", vrf->name, vrf->vrf_id); - - return 0; -} - -static int mgmt_vrf_delete(struct vrf *vrf) -{ - zlog_debug("VRF Deletion: %s(%u)", vrf->name, vrf->vrf_id); - - return 0; -} - -static int mgmt_vrf_enable(struct vrf *vrf) -{ - zlog_debug("VRF Enable: %s(%u)", vrf->name, vrf->vrf_id); - - return 0; -} - -static int mgmt_vrf_disable(struct vrf *vrf) -{ - zlog_debug("VRF Disable: %s(%u)", vrf->name, vrf->vrf_id); - - /* Note: This is a callback, the VRF will be deleted by the caller. */ - return 0; -} - -static int mgmt_vrf_config_write(struct vty *vty) -{ - return 0; -} - -static void mgmt_vrf_init(void) -{ - vrf_init(mgmt_vrf_new, mgmt_vrf_enable, mgmt_vrf_disable, - mgmt_vrf_delete); - vrf_cmd_init(mgmt_vrf_config_write); -} - -static void mgmt_vrf_terminate(void) -{ - vrf_terminate(); -} - #ifdef HAVE_STATICD extern const struct frr_yang_module_info frr_staticd_info; #endif @@ -295,8 +246,8 @@ int main(int argc, char **argv) /* MGMTD master init. */ mgmt_master_init(frr_init(), buffer_size); - /* VRF Initializations. */ - mgmt_vrf_init(); + /* VRF commands initialization. */ + vrf_cmd_init(NULL); /* MGMTD related initialization. */ mgmt_init(); |