summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_fec.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2006-09-15 20:17:45 +0000
committerru <ru@FreeBSD.org>2006-09-15 20:17:45 +0000
commit8fdde09645830a0d52fe987157e4e4d8b9ece8f0 (patch)
treefff8e4e78345b5aafed26fee6aa4dd51c029c24e /sys/netgraph/ng_fec.c
parentfadf27a4e846ebe56c67dd0590ade418e434a414 (diff)
downloadFreeBSD-src-8fdde09645830a0d52fe987157e4e4d8b9ece8f0.zip
FreeBSD-src-8fdde09645830a0d52fe987157e4e4d8b9ece8f0.tar.gz
Fix input byte counting. Now the sum of the ipackets/ibytes counters
of individual interfaces should match the ipackets/ibytes counter of the aggregate (FEC) interface. PR: kern/82189 Submitted by: Stikheev Andrew <sand AT zunet DOT ru> MFC after: 3 days
Diffstat (limited to 'sys/netgraph/ng_fec.c')
-rw-r--r--sys/netgraph/ng_fec.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/netgraph/ng_fec.c b/sys/netgraph/ng_fec.c
index e47abab..ccd3c84 100644
--- a/sys/netgraph/ng_fec.c
+++ b/sys/netgraph/ng_fec.c
@@ -826,9 +826,15 @@ ng_fec_input(struct ifnet *ifp, struct mbuf *m0)
/* Convince the system that this is our frame. */
m0->m_pkthdr.rcvif = bifp;
- bifp->if_ipackets++;
- bifp->if_ibytes += m0->m_pkthdr.len + sizeof(struct ether_header);
+ /*
+ * Count bytes on an individual interface in a bundle.
+ * The bytes will also be added to the aggregate interface
+ * once we call ether_input().
+ */
+ ifp->if_ibytes += m0->m_pkthdr.len;
+
+ bifp->if_ipackets++;
(*bifp->if_input)(bifp, m0);
return;
OpenPOWER on IntegriCloud