| 290 | vnet_ipsec_init, NULL); |
| 291 | |
| 292 | static void |
| 293 | vnet_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 | } |
| 316 | VNET_SYSUNINIT(vnet_ipsec_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, |
| 317 | vnet_ipsec_uninit, NULL); |
| 318 |
nothing calls this directly
no test coverage detected