summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2004-03-22 01:15:28 +0000
committerjulian <julian@FreeBSD.org>2004-03-22 01:15:28 +0000
commitbde1a9b0116b172353c74d156c19af2315c6c520 (patch)
tree3f57317c678ed6bd6f4d1fca16301d991d19d911
parent1741d64025406b0476af1f73b4c494bb1c7cf59b (diff)
downloadFreeBSD-src-bde1a9b0116b172353c74d156c19af2315c6c520.zip
FreeBSD-src-bde1a9b0116b172353c74d156c19af2315c6c520.tar.gz
Dont count bytes being sent to a disconnected hook.
MFC after: 3 days
-rw-r--r--sys/netgraph/ng_tee.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netgraph/ng_tee.c b/sys/netgraph/ng_tee.c
index f228813..1eb1ce2 100644
--- a/sys/netgraph/ng_tee.c
+++ b/sys/netgraph/ng_tee.c
@@ -351,11 +351,11 @@ ngt_rcvdata(hook_p hook, item_p item)
}
}
/* Deliver frame out destination hook */
- dest->stats.outOctets += m->m_pkthdr.len;
- dest->stats.outFrames++;
- if (dest->hook)
+ if (dest->hook) {
+ dest->stats.outOctets += m->m_pkthdr.len;
+ dest->stats.outFrames++;
NG_FWD_ITEM_HOOK(error, item, dest->hook);
- else
+ } else
NG_FREE_ITEM(item);
return (error);
}
OpenPOWER on IntegriCloud