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

Function carp_mod_cleanup

freebsd/netinet/ip_carp.c:2196–2230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2194#endif
2195
2196static void
2197carp_mod_cleanup(void)
2198{
2199
2200#ifdef INET
2201 if (proto_reg[CARP_INET] == 0) {
2202 (void)ipproto_unregister(IPPROTO_CARP);
2203 pf_proto_unregister(PF_INET, IPPROTO_CARP, SOCK_RAW);
2204 proto_reg[CARP_INET] = -1;
2205 }
2206 carp_iamatch_p = NULL;
2207#endif
2208#ifdef INET6
2209 if (proto_reg[CARP_INET6] == 0) {
2210 (void)ip6proto_unregister(IPPROTO_CARP);
2211 pf_proto_unregister(PF_INET6, IPPROTO_CARP, SOCK_RAW);
2212 proto_reg[CARP_INET6] = -1;
2213 }
2214 carp_iamatch6_p = NULL;
2215 carp_macmatch6_p = NULL;
2216#endif
2217 carp_ioctl_p = NULL;
2218 carp_attach_p = NULL;
2219 carp_detach_p = NULL;
2220 carp_get_vhid_p = NULL;
2221 carp_linkstate_p = NULL;
2222 carp_forus_p = NULL;
2223 carp_output_p = NULL;
2224 carp_demote_adj_p = NULL;
2225 carp_master_p = NULL;
2226 mtx_unlock(&carp_mtx);
2227 taskqueue_drain(taskqueue_swi, &carp_sendall_task);
2228 mtx_destroy(&carp_mtx);
2229 sx_destroy(&carp_sx);
2230}
2231
2232static int
2233carp_mod_load(void)

Callers 2

carp_mod_loadFunction · 0.85
carp_modeventFunction · 0.85

Calls 6

ipproto_unregisterFunction · 0.85
pf_proto_unregisterFunction · 0.85
ip6proto_unregisterFunction · 0.85
taskqueue_drainFunction · 0.85
mtx_unlockFunction · 0.50
sx_destroyFunction · 0.50

Tested by

no test coverage detected