| 377 | |
| 378 | #ifdef VIMAGE |
| 379 | static void |
| 380 | ip_destroy(void *unused __unused) |
| 381 | { |
| 382 | int error; |
| 383 | |
| 384 | #ifdef RSS |
| 385 | netisr_unregister_vnet(&ip_direct_nh); |
| 386 | #endif |
| 387 | netisr_unregister_vnet(&ip_nh); |
| 388 | |
| 389 | pfil_head_unregister(V_inet_pfil_head); |
| 390 | error = hhook_head_deregister(V_ipsec_hhh_in[HHOOK_IPSEC_INET]); |
| 391 | if (error != 0) { |
| 392 | printf("%s: WARNING: unable to deregister input helper hook " |
| 393 | "type HHOOK_TYPE_IPSEC_IN, id HHOOK_IPSEC_INET: " |
| 394 | "error %d returned\n", __func__, error); |
| 395 | } |
| 396 | error = hhook_head_deregister(V_ipsec_hhh_out[HHOOK_IPSEC_INET]); |
| 397 | if (error != 0) { |
| 398 | printf("%s: WARNING: unable to deregister output helper hook " |
| 399 | "type HHOOK_TYPE_IPSEC_OUT, id HHOOK_IPSEC_INET: " |
| 400 | "error %d returned\n", __func__, error); |
| 401 | } |
| 402 | |
| 403 | /* Remove the IPv4 addresses from all interfaces. */ |
| 404 | in_ifscrub_all(); |
| 405 | |
| 406 | /* Make sure the IPv4 routes are gone as well. */ |
| 407 | rib_flush_routes_family(AF_INET); |
| 408 | |
| 409 | /* Destroy IP reassembly queue. */ |
| 410 | ipreass_destroy(); |
| 411 | |
| 412 | /* Cleanup in_ifaddr hash table; should be empty. */ |
| 413 | hashdestroy(V_in_ifaddrhashtbl, M_IFADDR, V_in_ifaddrhmask); |
| 414 | } |
| 415 | |
| 416 | VNET_SYSUNINIT(ip, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, ip_destroy, NULL); |
| 417 | #endif |
nothing calls this directly
no test coverage detected