diff options
author | ru <ru@FreeBSD.org> | 2006-09-15 20:17:45 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2006-09-15 20:17:45 +0000 |
commit | 8fdde09645830a0d52fe987157e4e4d8b9ece8f0 (patch) | |
tree | fff8e4e78345b5aafed26fee6aa4dd51c029c24e /sys/netgraph/ng_fec.c | |
parent | fadf27a4e846ebe56c67dd0590ade418e434a414 (diff) | |
download | FreeBSD-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.c | 10 |
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; |