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

Function vnet_ipsec_uninit

freebsd/net/if_ipsec.c:292–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290 vnet_ipsec_init, NULL);
291
292static void
293vnet_ipsec_uninit(const void *unused __unused)
294{
295
296 if_clone_detach(V_ipsec_cloner);
297 free(V_ipsec_idhtbl, M_IPSEC);
298 /*
299 * Use V_ipsec_idhtbl pointer as indicator that VNET is going to be
300 * destroyed, it is used by ipsec_srcaddr() callback.
301 */
302 V_ipsec_idhtbl = NULL;
303 IPSEC_WAIT();
304
305#ifdef INET
306 if (IS_DEFAULT_VNET(curvnet))
307 ip_encap_unregister_srcaddr(ipsec4_srctab);
308 free(V_ipsec4_srchtbl, M_IPSEC);
309#endif
310#ifdef INET6
311 if (IS_DEFAULT_VNET(curvnet))
312 ip6_encap_unregister_srcaddr(ipsec6_srctab);
313 free(V_ipsec6_srchtbl, M_IPSEC);
314#endif
315}
316VNET_SYSUNINIT(vnet_ipsec_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY,
317 vnet_ipsec_uninit, NULL);
318

Callers

nothing calls this directly

Calls 4

if_clone_detachFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected