diff options
Diffstat (limited to 'zebra/zebra_pw.c')
-rw-r--r-- | zebra/zebra_pw.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/zebra/zebra_pw.c b/zebra/zebra_pw.c index f76bf74..deed3b6 100644 --- a/zebra/zebra_pw.c +++ b/zebra/zebra_pw.c @@ -377,15 +377,18 @@ static int zebra_pw_client_close(struct zserv *client) return 0; } -void zebra_pw_init(struct zebra_vrf *zvrf) +static void zebra_pw_init(void) +{ + hook_register(zserv_client_close, zebra_pw_client_close); +} + +void zebra_pw_init_vrf(struct zebra_vrf *zvrf) { RB_INIT(zebra_pw_head, &zvrf->pseudowires); RB_INIT(zebra_static_pw_head, &zvrf->static_pseudowires); - - hook_register(zserv_client_close, zebra_pw_client_close); } -void zebra_pw_exit(struct zebra_vrf *zvrf) +void zebra_pw_exit_vrf(struct zebra_vrf *zvrf) { struct zebra_pw *pw; @@ -396,6 +399,11 @@ void zebra_pw_exit(struct zebra_vrf *zvrf) } } +void zebra_pw_terminate(void) +{ + hook_unregister(zserv_client_close, zebra_pw_client_close); +} + DEFUN_NOSH (pseudowire_if, pseudowire_if_cmd, "pseudowire IFNAME", @@ -837,4 +845,6 @@ void zebra_pw_vty_init(void) install_element(VIEW_NODE, &show_pseudowires_cmd); install_element(VIEW_NODE, &show_pseudowires_detail_cmd); + + zebra_pw_init(); } |