Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/ip_input.c
Show First 20 Lines • Show All 373 Lines • ▼ Show 20 Lines | |||||
#ifdef RSS | #ifdef RSS | ||||
netisr_register(&ip_direct_nh); | netisr_register(&ip_direct_nh); | ||||
#endif | #endif | ||||
} | } | ||||
SYSINIT(ip_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, ip_init, NULL); | SYSINIT(ip_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, ip_init, NULL); | ||||
#ifdef VIMAGE | #ifdef VIMAGE | ||||
static void | static void | ||||
ip_shutdown(void *unused __unused) | |||||
{ | |||||
/* Remove the IPv4 addresses from all interfaces. */ | |||||
in_ifscrub_all(); | |||||
/* Make sure the IPv4 routes are gone as well. */ | |||||
rib_flush_routes_family(AF_INET); | |||||
} | |||||
VNET_SHUTDOWN(ip_shutdown, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, ip_shutdown, NULL); | |||||
static void | |||||
ip_destroy(void *unused __unused) | ip_destroy(void *unused __unused) | ||||
{ | { | ||||
int error; | int error; | ||||
#ifdef RSS | #ifdef RSS | ||||
netisr_unregister_vnet(&ip_direct_nh); | netisr_unregister_vnet(&ip_direct_nh); | ||||
#endif | #endif | ||||
netisr_unregister_vnet(&ip_nh); | netisr_unregister_vnet(&ip_nh); | ||||
pfil_head_unregister(V_inet_pfil_head); | pfil_head_unregister(V_inet_pfil_head); | ||||
error = hhook_head_deregister(V_ipsec_hhh_in[HHOOK_IPSEC_INET]); | error = hhook_head_deregister(V_ipsec_hhh_in[HHOOK_IPSEC_INET]); | ||||
if (error != 0) { | if (error != 0) { | ||||
printf("%s: WARNING: unable to deregister input helper hook " | printf("%s: WARNING: unable to deregister input helper hook " | ||||
"type HHOOK_TYPE_IPSEC_IN, id HHOOK_IPSEC_INET: " | "type HHOOK_TYPE_IPSEC_IN, id HHOOK_IPSEC_INET: " | ||||
"error %d returned\n", __func__, error); | "error %d returned\n", __func__, error); | ||||
} | } | ||||
error = hhook_head_deregister(V_ipsec_hhh_out[HHOOK_IPSEC_INET]); | error = hhook_head_deregister(V_ipsec_hhh_out[HHOOK_IPSEC_INET]); | ||||
if (error != 0) { | if (error != 0) { | ||||
printf("%s: WARNING: unable to deregister output helper hook " | printf("%s: WARNING: unable to deregister output helper hook " | ||||
"type HHOOK_TYPE_IPSEC_OUT, id HHOOK_IPSEC_INET: " | "type HHOOK_TYPE_IPSEC_OUT, id HHOOK_IPSEC_INET: " | ||||
"error %d returned\n", __func__, error); | "error %d returned\n", __func__, error); | ||||
} | } | ||||
/* Remove the IPv4 addresses from all interfaces. */ | |||||
in_ifscrub_all(); | |||||
/* Make sure the IPv4 routes are gone as well. */ | |||||
rib_flush_routes_family(AF_INET); | |||||
/* Destroy IP reassembly queue. */ | /* Destroy IP reassembly queue. */ | ||||
ipreass_destroy(); | ipreass_destroy(); | ||||
/* Cleanup in_ifaddr hash table; should be empty. */ | /* Cleanup in_ifaddr hash table; should be empty. */ | ||||
hashdestroy(V_in_ifaddrhashtbl, M_IFADDR, V_in_ifaddrhmask); | hashdestroy(V_in_ifaddrhashtbl, M_IFADDR, V_in_ifaddrhmask); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 949 Lines • Show Last 20 Lines |