| 267 | } |
| 268 | |
| 269 | static void |
| 270 | vnet_ipsec_init(const void *unused __unused) |
| 271 | { |
| 272 | |
| 273 | V_ipsec_idhtbl = ipsec_hashinit(); |
| 274 | #ifdef INET |
| 275 | V_ipsec4_srchtbl = ipsec_hashinit(); |
| 276 | if (IS_DEFAULT_VNET(curvnet)) |
| 277 | ipsec4_srctab = ip_encap_register_srcaddr(ipsec_srcaddr, |
| 278 | NULL, M_WAITOK); |
| 279 | #endif |
| 280 | #ifdef INET6 |
| 281 | V_ipsec6_srchtbl = ipsec_hashinit(); |
| 282 | if (IS_DEFAULT_VNET(curvnet)) |
| 283 | ipsec6_srctab = ip6_encap_register_srcaddr(ipsec_srcaddr, |
| 284 | NULL, M_WAITOK); |
| 285 | #endif |
| 286 | V_ipsec_cloner = if_clone_simple(ipsecname, ipsec_clone_create, |
| 287 | ipsec_clone_destroy, 0); |
| 288 | } |
| 289 | VNET_SYSINIT(vnet_ipsec_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, |
| 290 | vnet_ipsec_init, NULL); |
| 291 |
nothing calls this directly
no test coverage detected