MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ng_l2tp_shutdown

Function ng_l2tp_shutdown

freebsd/netgraph/ng_l2tp.c:647–670  ·  view source on GitHub ↗

* Destroy node */

Source from the content-addressed store, hash-verified

645 * Destroy node
646 */
647static int
648ng_l2tp_shutdown(node_p node)
649{
650 const priv_p priv = NG_NODE_PRIVATE(node);
651 struct l2tp_seq *const seq = &priv->seq;
652
653 /* Sanity check */
654 L2TP_SEQ_CHECK(seq);
655
656 /* Reset sequence number state */
657 ng_l2tp_seq_reset(priv);
658
659 /* Free private data if neither timer is running */
660 ng_uncallout(&seq->rack_timer, node);
661 ng_uncallout(&seq->xack_timer, node);
662
663 mtx_destroy(&seq->mtx);
664
665 free(priv, M_NETGRAPH_L2TP);
666
667 /* Unref node */
668 NG_NODE_UNREF(node);
669 return (0);
670}
671
672/*
673 * Hook disconnection

Callers

nothing calls this directly

Calls 3

ng_l2tp_seq_resetFunction · 0.85
ng_uncalloutFunction · 0.70
freeFunction · 0.50

Tested by

no test coverage detected