diff options
author | Russ White <russ@riw.us> | 2019-09-30 13:46:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-30 13:46:19 +0200 |
commit | 9898a2fb3441e7382dba4190233f466b8271deae (patch) | |
tree | 9629a5ce665db95addf0d0bc0f46864ef71b5a49 /zebra/interface.c | |
parent | Merge pull request #5066 from ak503/libfrr_crash (diff) | |
parent | lib: delete interface if you can in upper level protocol (diff) | |
download | frr-9898a2fb3441e7382dba4190233f466b8271deae.tar.xz frr-9898a2fb3441e7382dba4190233f466b8271deae.zip |
Merge pull request #5009 from donaldsharp/interface_deletion
lib, zebra: Allow for interface deletion when kernel event happens
Diffstat (limited to 'zebra/interface.c')
-rw-r--r-- | zebra/interface.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index a724006e2..ef03cf87f 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -778,6 +778,13 @@ void if_delete_update(struct interface *ifp) memset(&zif->brslave_info, 0, sizeof(struct zebra_l2info_brslave)); } + + if (!ifp->configured) { + if (IS_ZEBRA_DEBUG_KERNEL) + zlog_debug("interface %s is being deleted from the system", + ifp->name); + if_delete(ifp); + } } /* VRF change for an interface */ @@ -3207,6 +3214,11 @@ void zebra_if_init(void) install_node(&interface_node, if_config_write); install_node(&link_params_node, NULL); if_cmd_init(); + /* + * This is *intentionally* setting this to NULL, signaling + * that interface creation for zebra acts differently + */ + if_zapi_callbacks(NULL, NULL, NULL, NULL); install_element(VIEW_NODE, &show_interface_cmd); install_element(VIEW_NODE, &show_interface_vrf_all_cmd); |