diff options
author | glebius <glebius@FreeBSD.org> | 2005-12-28 12:56:59 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2005-12-28 12:56:59 +0000 |
commit | f867a5733bf2a9c10ec78cccb466d398e89ce7b2 (patch) | |
tree | 78e148c80d5d6e6cdbf51d8d7f3142c995e70619 /sys/netgraph | |
parent | 9109f4fe316261b72c57402bff9dfa8c66b0d78f (diff) | |
download | FreeBSD-src-f867a5733bf2a9c10ec78cccb466d398e89ce7b2.zip FreeBSD-src-f867a5733bf2a9c10ec78cccb466d398e89ce7b2.tar.gz |
In ng_netflow_disconnect() check whether we are working with "iface"
or with "out" hook, and clear the right pointer.
Reported by: Vitaliy Ovsyannikov <V.Ovsyannikov kr.ru>
Diffstat (limited to 'sys/netgraph')
-rw-r--r-- | sys/netgraph/netflow/ng_netflow.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netgraph/netflow/ng_netflow.c b/sys/netgraph/netflow/ng_netflow.c index 134fafa..2b49cb0 100644 --- a/sys/netgraph/netflow/ng_netflow.c +++ b/sys/netgraph/netflow/ng_netflow.c @@ -614,8 +614,12 @@ ng_netflow_disconnect(hook_p hook) priv_p priv = NG_NODE_PRIVATE(node); iface_p iface = NG_HOOK_PRIVATE(hook); - if (iface != NULL) - iface->hook = NULL; + if (iface != NULL) { + if (iface->hook == hook) + iface->hook = NULL; + if (iface->out == hook) + iface->out = NULL; + } /* if export hook disconnected stop running expire(). */ if (hook == priv->export) { |