Changeset View
Changeset View
Standalone View
Standalone View
sys/netgraph/ng_ip_input.c
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | |||||
ngipi_rcvdata(hook_p hook, item_p item) | ngipi_rcvdata(hook_p hook, item_p item) | ||||
{ | { | ||||
struct mbuf *m; | struct mbuf *m; | ||||
NGI_GET_M(item, m); | NGI_GET_M(item, m); | ||||
NG_FREE_ITEM(item); | NG_FREE_ITEM(item); | ||||
if (curthread->td_ng_outbound) | if (curthread->td_ng_outbound) | ||||
netisr_queue(NETISR_IP, m); | netisr_queue(NETISR_IP, m); | ||||
else | else { | ||||
struct epoch_tracker et; | |||||
NET_EPOCH_ENTER(et); | |||||
netisr_dispatch(NETISR_IP, m); | netisr_dispatch(NETISR_IP, m); | ||||
NET_EPOCH_EXIT(et); | |||||
} | |||||
return 0; | return 0; | ||||
} | } | ||||
/* | /* | ||||
* Hook disconnection | * Hook disconnection | ||||
*/ | */ | ||||
static int | static int | ||||
ngipi_disconnect(hook_p hook) | ngipi_disconnect(hook_p hook) | ||||
{ | { | ||||
if (NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) | if (NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) | ||||
ng_rmnode_self(NG_HOOK_NODE(hook)); | ng_rmnode_self(NG_HOOK_NODE(hook)); | ||||
return (0); | return (0); | ||||
} | } |