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

Function ng_nat_shutdown

freebsd/netgraph/ng_nat.c:905–925  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

903}
904
905static int
906ng_nat_shutdown(node_p node)
907{
908 const priv_p priv = NG_NODE_PRIVATE(node);
909
910 NG_NODE_SET_PRIVATE(node, NULL);
911 NG_NODE_UNREF(node);
912
913 /* Free redirects list. */
914 while (!STAILQ_EMPTY(&priv->redirhead)) {
915 struct ng_nat_rdr_lst *entry = STAILQ_FIRST(&priv->redirhead);
916 STAILQ_REMOVE_HEAD(&priv->redirhead, entries);
917 free(entry, M_NETGRAPH);
918 }
919
920 /* Final free. */
921 LibAliasUninit(priv->lib);
922 free(priv, M_NETGRAPH);
923
924 return (0);
925}
926
927static int
928ng_nat_disconnect(hook_p hook)

Callers

nothing calls this directly

Calls 2

LibAliasUninitFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected