/* ----------------------------------------------------------------------------- Called when we need to remove the L2TP protocol from the domain ----------------------------------------------------------------------------- */ int l2tp_remove(struct domain *domain) { int err; err = net_del_proto(l2tp.pr_type, l2tp.pr_protocol, domain); if (err) return err; // shall we test that all the pcbs have been freed ? return KERN_SUCCESS; }
/* ----------------------------------------------------------------------------- Called when we need to remove the L2TP protocol from the domain ----------------------------------------------------------------------------- */ int l2tp_remove(struct domain *domain) { int err; lck_mtx_assert(ppp_domain_mutex, LCK_MTX_ASSERT_OWNED); /* Cleanup timer thread */ if (l2tp_timer_thread_is_dead == 0) { l2tp_timer_thread_is_dying++; /* Tell thread to die */ wakeup(&l2tp_timer_thread_is_dying); /* Wake thread */ msleep(&l2tp_timer_thread_is_dead, ppp_domain_mutex, PSOCK, "l2tp_timer_sleep", 0); } err = net_del_proto(l2tp.pr_type, l2tp.pr_protocol, domain); if (err) return err; // shall we test that all the pcbs have been freed ? return KERN_SUCCESS; }