diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c index 7d92b2b12b9a..9472149af772 100644 --- a/sys/net/bridgestp.c +++ b/sys/net/bridgestp.c @@ -2069,6 +2069,7 @@ bstp_modevent(module_t mod, int type, void *data) bstp_linkstate_p = bstp_linkstate; break; case MOD_UNLOAD: + bstp_linkstate_p = NULL; mtx_destroy(&bstp_list_mtx); break; default: diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index dff683217e4a..f3bf6accb5a9 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -459,7 +459,6 @@ bridge_modevent(module_t mod, int type, void *data) bridge_input_p = bridge_input; bridge_output_p = bridge_output; bridge_dn_p = bridge_dummynet; - bstp_linkstate_p = bstp_linkstate; bridge_detach_cookie = EVENTHANDLER_REGISTER( ifnet_departure_event, bridge_ifdetach, NULL, EVENTHANDLER_PRI_ANY); @@ -472,7 +471,6 @@ bridge_modevent(module_t mod, int type, void *data) bridge_input_p = NULL; bridge_output_p = NULL; bridge_dn_p = NULL; - bstp_linkstate_p = NULL; mtx_destroy(&bridge_list_mtx); break; default: