diff options
| author | Julian Elischer <julian@FreeBSD.org> | 2001-01-08 05:34:06 +0000 |
|---|---|---|
| committer | Julian Elischer <julian@FreeBSD.org> | 2001-01-08 05:34:06 +0000 |
| commit | 30400f03aa3c764fffcb7d3158634778a035a183 (patch) | |
| tree | 352a3b87c6add8235d28b4fc2b6a24eace6f5459 /sys/netgraph/ng_echo.c | |
| parent | bf374e5b67fcc138f943ed301ed33f80f79ce043 (diff) | |
Notes
Diffstat (limited to 'sys/netgraph/ng_echo.c')
| -rw-r--r-- | sys/netgraph/ng_echo.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netgraph/ng_echo.c b/sys/netgraph/ng_echo.c index 337df726aec50..68a165d6eec1e 100644 --- a/sys/netgraph/ng_echo.c +++ b/sys/netgraph/ng_echo.c @@ -47,6 +47,7 @@ */ #include <sys/param.h> +#include <sys/systm.h> #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/mbuf.h> @@ -106,7 +107,7 @@ nge_rcvdata(hook_p hook, item_p item) { int error = 0; - NG_FWD_DATA(error, item, hook); + NG_FWD_ITEM_HOOK(error, item, hook); return (0); } @@ -116,9 +117,9 @@ nge_rcvdata(hook_p hook, item_p item) static int nge_disconnect(hook_p hook) { - if ((hook->node->numhooks == 0) - && ((hook->node->flags & NG_INVALID) == 0)) { - ng_rmnode_self(hook->node); + if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) + && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) { + ng_rmnode_self(NG_HOOK_NODE(hook)); } return (0); } |
