| 2194 | #endif |
| 2195 | |
| 2196 | static void |
| 2197 | carp_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 | |
| 2232 | static int |
| 2233 | carp_mod_load(void) |
no test coverage detected